//ÇÑÁÙ¸Þ¸ð
var Utimeout = false;

// Main function
function Ultimate(Utype,Umsgs,Ucursor,Uwidth,Uheight,Ubgcolor,Ubackground,Uspeed,Udelay,Ufirst) {

	document.writeln('<div id="Ubox" style="position:relative;cursor:'+Ucursor+';width:'+Uwidth+';height:'+Uheight+';overflow:hidden;background-color:'+Ubgcolor+' ;background-image:url('+Ubackground+')" onmouseover="Ustop(\'Utxt\');" onmouseout="Uresume();">')
	document.writeln('live.<a href=# onclick="window.open(\'eboard.php\',\'eboard\',\'width=365,height=500,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0\')">memo</a><div style="position:absolute;width:'+Uwidth+';height:'+Uheight+';clip:rect(0 '+Uwidth+' '+Uheight+' 0);left:60;top:0">')

	if (Utype==0) {
		document.writeln('<div id="Utxt" style="position:absolute;width:'+Uwidth+';left:0;top:'+Uheight+';text-align:left;">')
		document.write(Umsgs[Ufirst]);
		Uscroll("Utxt",Umsgs,Uheight,Uspeed,Udelay,Ufirst);
	}
      
	document.writeln('</div>')
	document.writeln('</div>')
	document.writeln('</div>')
}

// Moves
function Uscroll(IDdiv,Umsgs,Uheight,Uspeed,Udelay,Ufirst){
	ttxt=document.getElementById(IDdiv);
	Ustep=eval(Ufirst);
         
		ttxtTop = ttxt.style.top;
		ttxtTop = ttxtTop.substring(0,ttxtTop.length - 2);
         
	if (ttxtTop>0 && ttxtTop<=5){
		ttxt.style.top=0;
		Utimeout = setTimeout("Uscroll('Utxt',Umsgs,Uheight,Uspeed,Udelay,Ustep)",Udelay);
		return;
	}
	else {
		if (ttxtTop >= Uheight*-1){
			ttxt.style.top = ttxtTop - 5;
			Utimeout = setTimeout("Uscroll('Utxt',Umsgs,Uheight,Uspeed,Udelay,Ustep)",Uspeed);
			return;
		}
		else {
			ttxt.style.top=Uheight;
			if (Ustep>=Umsgs.length-1)
				Ustep=0;
				else      
				Ustep++;
			ttxt.innerHTML=Umsgs[Ustep];
			Uscroll("Utxt",Umsgs,Uheight,Uspeed,Udelay,Ustep);
		}
	}
}
   
// ¸ØÃã
function Ustop(IDdiv) {
		if (Utimeout) {
			clearTimeout(Utimeout);
		}
         
		ttxt = document.getElementById(IDdiv);
		ttxt.style.top = 0;
	}
     
// ´Ù½Ã ½ÃÀÛ
function Uresume() {
	Utimeout = setTimeout("Uscroll('Utxt',Umsgs,Uheight,Uspeed,Udelay,Ustep)",Udelay);
}