var counter=1;function moveR(){if(counter>=max){counter=0}counter++;makeAjahCAll()}function moveL(){if(counter==1){counter=max+1}counter--;makeAjahCAll()}function makeAjahCAll(){AIcons=function(a){$("#icons").hide();$("#icons").fadeIn(500)};afterCall=function(a){off("icons");document.getElementById("icons").innerHTML=a.responseText;on("icons")};makeAJAHRequest("POST","/SBB_AJAX","AJAX=1&PG="+counter,document.getElementById("icons"),AIcons)}var currentTabInGrp=new Array();for(i=0;i<10;i++){currentTabInGrp[i]=0}function hMHovOn(a){document.getElementById(a).style.background="#fff url(bb/whatsHot/bgWhOn.gif ) no-repeat left top"}function hotStuffOff(){document.getElementById("hMktMsg").style.display="none";for(var b=0;b<10;b++){if(document.getElementById("hotProd"+b)){document.getElementById("hotProd"+b).style.display="none"}var a=document.getElementById("hMain"+b);if(a){if((("hMain"+b)=="hMain0")||(("hMain"+b)=="hMain1")||(("hMain"+b)=="hMain2")||(("hMain"+b)=="hMain3")||(("hMain"+b)=="hMain4")){a.style.background="#fff url(bb/whatsHot/bgWhLeftOff.gif ) repeat-y right top"}else{a.style.background="#fff url(bb/whatsHot/bgWhRtOff.gif ) repeat-y left top"}}}}var currentMktMsg=true;var callbackWaiting=false;var lastMainLoad;var nextToShow=-1;var nextToShowInner=-1;var whatsHotDelay=200;var currentDivWHOn=null;function hideAllWHBorders(){for(var b=0;b<10;b++){var a=document.getElementById("hMain"+b);if(a){if((("hMain"+b)=="hMain0")||(("hMain"+b)=="hMain1")||(("hMain"+b)=="hMain2")||(("hMain"+b)=="hMain3")||(("hMain"+b)=="hMain4")){a.style.background="#fff url(bb/whatsHot/bgWhLeftOff.gif ) repeat-y right top"}else{a.style.background="#fff url(bb/whatsHot/bgWhRtOff.gif ) repeat-y left top"}}}}function bigImageMouseOver(divIdNum,prods){hMHovOn("hMain"+eval(divIdNum));if(lastMainLoad!=divIdNum+","+currentTabInGrp[divIdNum]){nextToShow=divIdNum;if(prods!=null){setTimeout('doBigImageMouseOver("'+divIdNum+'", "'+prods+'")',whatsHotDelay)}else{}}}function bigImageMouseOut(divIdNum){if(lastMainLoad!=divIdNum+","+currentTabInGrp[divIdNum]){lastMainLoad=null;nextToShow=-1;hideAllWHBorders();if(currentDivWHOn!=null){hMHovOn("hMain"+eval(currentDivWHOn))}}}function doBigImageMouseOver(divIdNum,prods){if(lastMainLoad!=divIdNum+","+currentTabInGrp[divIdNum]&&nextToShow==divIdNum){$.get("/ajaxWhatsHotBottomBB",{whatsHotGrp:divIdNum,whatsHotGrpProds:prods},function(data){currentBIDivWHOn=null;currentDivWHOn=divIdNum;$("#hotBtmTbl"+divIdNum).html(data);if(debugAJAX){var fullURI="/ajaxWhatsHotBottomBB?whatsHotGrp="+divIdNum+"&whatsHotGrpProds="+prods;$("hotBtmTbl"+divIdNum).html('<div class="debugAJAXBox"><div class="debugAJAXPath">AJAX content: <a class="debugAJAXAnchor" href="'+fullURI+'">'+fullURI+"</a></div><br />"+$("#hotBtmTbl"+divIdNum).html()+"</div>")}hBtmItemsOff(divIdNum);hotBtmItemsOn(divIdNum,currentTabInGrp[divIdNum]);currentMktMsg=false},"text");hotStuffOff();on("hotProd"+divIdNum);document.getElementById("hotProd"+divIdNum).style.background="transparent url(home/t5_paneTop_bg.gif) repeat-x left top";$("#hotProd"+divIdNum).hide();hMHovOn("hMain"+eval(divIdNum));$("#hotProd"+divIdNum).fadeIn(400);lastMainLoad=divIdNum+","+currentTabInGrp[divIdNum]}}function hBtmItemsOff(a){for(j=0;j<5;j++){$("#hBtmGrp"+a+"Prod"+j).css("background","transparent");$("#hNumGrp"+a+"Prod"+j).css("color","#999")}}function hotBtmItemsOn(b,a){document.getElementById("hBtmGrp"+b+"Prod"+a).style.background="transparent url(home/t5_tabActive.gif ) no-repeat left top";document.getElementById("hNumGrp"+b+"Prod"+a).style.color="#333"}var lastBottomTabLoad;var currentBIDivWHOn=null;function smallInnerImageMouseOver(c,b,a){hotBtmItemsOn(c,b);if(lastBottomTabLoad!=c+","+b+","+a){nextToShowInner=c+","+b+","+a;setTimeout('doSmallInnerImageMouseOver("'+c+'","'+b+'","'+a+'")',whatsHotDelay)}}function doSmallInnerImageMouseOver(c,b,a){if(lastBottomTabLoad!=c+","+b+","+a&&nextToShowInner==c+","+b+","+a){$.get("/ajaxWhatsHotContentBB",{productId:a,groupIndex:c,productIndex:b},function(e){currentBIDivWHOn=b;$("#hotUpperItem"+c).html(e);if(debugAJAX){var d="/whatsHotContentBB?productId="+a+"&groupIndex="+c+"&productIndex="+b;$("#hotUpperItem"+c).html('<div class="debugAJAXBox"><div class="debugAJAXPath">AJAX content: <a class="debugAJAXAnchor" href="'+d+'">'+d+"</a></div><br />"+$("#hotUpperItem"+c).html()+"</div>")}$("#hotUpperItem"+c).hide();$("#hotUpperItem"+c).fadeIn("400")},"text");hBtmItemsOff(c);hotBtmItemsOn(c,b);currentTabInGrp[c]=b;lastBottomTabLoad=c+","+b+","+a}}function smallInnerImageMouseOut(c,b,a){if(lastBottomTabLoad!=c+","+b+","+a){lastBottomTabLoad=null;nextToShowInner=-1;hBtmItemsOff(c);if(currentBIDivWHOn!=null){hotBtmItemsOn(c,currentBIDivWHOn)}else{hotBtmItemsOn(c,0)}}};
