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(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(bgWhLeftOff.gif ) repeat-y right top"}else{a.style.background="#fff url(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(bgWhLeftOff.gif ) repeat-y right top"}else{a.style.background="#fff url(bgWhRtOff.gif ) repeat-y left top"}}}}

function displayMouseOver(divIdNum,prods){hMHovOn("hMain"+eval(divIdNum));if(lastMainLoad!=divIdNum+","+currentTabInGrp[divIdNum])
{nextToShow=divIdNum;if(prods!=null){setTimeout('doBigImageMouseOver("'+divIdNum+'", "'+prods+'")',whatsHotDelay)}else{}}}

function displayMouseOut(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(t5_paneTop_bg.gif) repeat-x left top";$("#hotProd"+divIdNum).hide();hMHovOn("hMain"+eval(divIdNum));$("#hotProd"+divIdNum).fadeIn(400);lastMainLoad=divIdNum+","+currentTabInGrp[divIdNum]}}


