var isIE = document.all;
var isNS = document.layers;

var cMB_myOffset = 0;
var cMB_myHeight = 150;
var cMB_TotalCoolSites = 11;
	
function cMB_Scroll(){
 if (isIE){
  cMB_myInterval = window.setInterval("cMB_Scroller(1)",5000);
 }
}

function cMB_Scroller(cMB_Direction){
 if (isIE){
  clearInterval(cMB_myInterval);
  if (cMB_myOffset >= cMB_myHeight*cMB_TotalCoolSites){
	cMB_myOffset=0;
	cMB_myInterval = window.setInterval("cMB_Scroller("+cMB_Direction+")",1);
  }
	else {
	  if ((cMB_myOffset==0) && (cMB_Direction==-1)){
		cMB_myOffset = cMB_myHeight * cMB_TotalCoolSites;
	  }
	  cMB_myInterval=window.setInterval("cMB_Scroll_It("+cMB_Direction+")",2);
	}
  }
  else cMB_ScrollerNS(cMB_Direction);
}
	
function cMB_Scroll_It(cMB_Direction){
 cMB_myOffset+=(5*cMB_Direction);
 if (cMB_myOffset % cMB_myHeight == 0){
  clearInterval(cMB_myInterval);
  cMB_myInterval = window.setInterval("cMB_Scroller(1)",5000);
 }
 cMB_UpdateWindow();
}
	
function cMB_UpdateWindow(){
 if (isIE){
  document.all['cMB_CoolSite'].style.top = (0 - cMB_myOffset);
  document.all['cMB_CoolSite'].style.cliptop = cMB_myOffset;
  document.all['cMB_CoolSite'].style.clipbottom = cMB_myOffset + cMB_myHeight;
 }
//13/07/00
 if (isNS){
  document.layers[cMB_CSWindow[winnum].containerName].pageY = (0 - cMB_CSWindow[winnum].scrollOffset);
  document.layers[cMB_CSWindow[winnum].containerName].clip.top = (cMB_CSWindow[winnum].scrollOffset);
  document.layers[cMB_CSWindow[winnum].containerName].clip.bottom = (cMB_CSWindow[winnum].height + cMB_CSWindow[blocknum].scrollOffset-1);
 }
}

