﻿

function initScollLeft(marqueesDiv,templayerDiv,spaceBetween){
	var marqueesTmp,templayerTmp;
	marqueesWidth=spaceBetween; 
	stopscrollLeft=false; 
	marqueesTmp = document.all.item(marqueesDiv);
	templayerTmp = document.all.item(templayerDiv);
	templayerTmp.style.width=200;
	var html="<table><tr>";
    

	with(marqueesTmp){
	noWrap=true;
	style.width=marqueesWidth; 
	//style.height=0;
	style.overflowX="hidden"; 
	style.display="";
	onmouseover=new Function("stopscrollLeft=true"); 
	onmouseout=new Function("stopscrollLeft=false"); 
	}
	var i =0;
	while(templayerTmp.offsetWidth<marqueesWidth && i<5){
	    html+="<td>";
	    html += marqueesTmp.innerHTML;
	    html += "</td>";
		templayerTmp.innerHTML+=marqueesTmp.innerHTML;
		i++;
	} 
	
//	marqueesTmp.innerHTML=templayerTmp.innerHTML+templayerTmp.innerHTML;
    html = html+"</tr></table>"
    marqueesTmp.innerHTML=html;
	setInterval("scrollLeft('"+marqueesDiv+"','"+templayerDiv+"')",80);
}

preLeft=0; 
function scrollLeft(marqueesDiv,templayerDiv){ 
	var marqueesTmp,templayerTmp;
	marqueesTmp = document.all.item(marqueesDiv);
	templayerTmp = document.all.item(templayerDiv);
	if(stopscrollLeft==true) return; 
	preLeft=marqueesTmp.scrollLeft; 
	marqueesTmp.scrollLeft+=1; 
	if(preLeft==marqueesTmp.scrollLeft){
	marqueesTmp.scrollLeft=templayerTmp.offsetWidth-marqueesWidth+1;
	}
}

initScollLeft('marqueesWJImage','templayerWJImage',570);

//<div id="marqueesWJImage" style="display: none">
    
//</div>
//<div id="templayerWJImage" style="z-index: 1; visibility: hidden; top: -1000px; position: absolute">
//</div>

//<script language="javascript" src="../JS/ImageMove.js" type="text/javascript"></script>
