//fungsi2 utk text ticker


lineText=""
timerID=null
timerRunning=false
spaces=""
charNo=0
charMax=0
charMiddle=0
lineNo=0
lineWait=0

function Line(text, url, frame, type, wait) 
{	this.text=text
	this.url=url
	this.frame=frame
	this.Display=type
	this.wait=wait
}
function StringFill(c, n) 
{	var s=""
	while (--n >= 0) 
	{	s+=c
	}
	return s
}
function getNewRandomInteger(oldnumber, max) 
{	var n=Math.floor(Math.random() * (max - 1) + 1)
	if (n >= oldnumber) 
	{	n++
	}
	return n
}
function getRandomInteger(max) 
{	var n=Math.floor(Math.random() * max + 1)
	return n
}
function GotoUrl(url, frame) 
{	if (frame != '') 
	{	if (frame == 'self') 
			self.location.href=url
		else if (frame == 'parent') 
			parent.location.href=url
		else if (frame == 'top') 
			top.location.href=url
		else 
		{	s=eval(top.frames[frame])
			if (s != null) 
				top.eval(frame).location.href=url
			else 
				window.open(url, frame, "toolbar=yes,status=yes,scrollbars=yes")
		}
	}
	else 
	window.location.href=url
}
function Static() 
{	document.getElementById('harsotext').innerHTML=this.text
	timerID=setTimeout("ShowNextLine()", this.wait)
}
function TypeWriter() 
{	lineText=this.text
	lineWait=this.wait
	charMax=lineText.length
	spaces=StringFill(" ", charMax)
	TextTypeWriter()
}
function TextTypeWriter() 
{	if (charNo <= charMax) 
	{	document.getElementById('harsotext').innerHTML=lineText.substring(0, charNo)+spaces.substring(0, charMax-charNo)
		charNo++
		timerID=setTimeout("TextTypeWriter()", typeWriterWait)
	}
	else 
	{	charNo=0
		timerID=setTimeout("ShowNextLine()", lineWait)
	}
}
function Blink() 
{	lineText=this.text
	charMax=lineText.length
	spaces=StringFill(" ", charMax)
	lineWait=this.wait
	TextBlink()
}
function TextBlink() 
{	if (charNo <= blinkMax * 2) 
	{	if ((charNo % 2) == 1) 
		{	document.getElementById('harsotext').innerHTML=lineText
			blinkWait=blinkTextWait
		}
		else 
		{	document.getElementById('harsotext').innerHTML=spaces
			blinkWait=blinkSpacesWait
		}
		charNo++
		timerID=setTimeout("TextBlink()", blinkWait)
	}
	else 
	{	charNo=0
		timerID=setTimeout("ShowNextLine()", lineWait)
	}
}
function Expand() 
{	lineText=this.text
	charMax=lineText.length
	charMiddle=Math.round(charMax / 2)
	lineWait=this.wait
	TextExpand()
}
function TextExpand() 
{	if (charNo <= charMiddle) 
	{	document.getElementById('harsotext').innerHTML=lineText.substring(charMiddle - charNo, charMiddle + charNo)
		charNo++
		timerID=setTimeout("TextExpand()", expandWait)
	}
	else 
	{	charNo=0
		timerID=setTimeout("ShowNextLine()", lineWait)
	}
}
function Scroll() 
{	spaces=StringFill(" ", scrollWidth)
	lineText=spaces+this.text
	charMax=lineText.length
	lineText+=spaces
	lineWait=this.wait
	TextScroll()
}
function TextScroll() 
{	if (charNo <= charMax) 
	{	document.getElementById('harsotext').innerHTML=lineText.substring(charNo, scrollWidth+charNo)
		charNo++
		timerID=setTimeout("TextScroll()", scrollWait)
	}
	else 
	{	charNo=0
		timerID=setTimeout("ShowNextLine()", lineWait)
	}
}
function StartHeadliner() 
{	StopHeadliner()
	timerID=setTimeout("ShowNextLine()", 2000)
	timerRunning=true
}
function StopHeadliner() 
{	if (timerRunning) 
	{ 	clearTimeout(timerID)
		timerRunning=false
	}
}
function ShowNextLine() 
{	if (randomLines) 
		lineNo=getNewRandomInteger(lineNo, lineMax)
	else 
		(lineNo < lineMax) ? lineNo++ : lineNo=1
	lines[lineNo].Display()
}
function LineClick(lineNo) 
{	//document.formDisplay.buttonFace.blur()
	if (lineNo > 0) 
		GotoUrl(lines[lineNo].url, lines[lineNo].frame)
}


//fungsi2 utk dropdown menu

function hrs_start_menu()
{	beginSTM("uueoehr","static","0","0","left","false","true","310","0","0","0","","blank.gif");
}
function hrs_finish_menu()
{	endSTM();
}

function hrs_begin_menu()
{	beginSTMB("auto","0","0","horizontally","blank.gif","0","0","3","0","transparent","","tiled","#000000","0","none","0","Normal","50","0","0","0","0","0","0","0","#000000","false","#000000","#000000","#000000","none");
}
function hrs_begin_popmenu()
{	beginSTMB("auto","0","5","vertically","","0","0","0","4","#c987ce","","tiled","#9c649f","1","solid","0","Fade","23","0","0","0","0","0","0","3","#999999","false","#9c649f","#9c649f","#9c649f","complex");
}
function hrs_begin_popmenu2()
{	beginSTMB("auto","-1","-2","vertically","arrow_r.gif","0","0","0","4","#c987ce","","tiled","#9c649f","1","solid","0","Fade","23","0","0","0","0","0","0","3","#999999","false","#9c649f","#9c649f","#9c649f","complex");
}
function hrs_end_menu()
{	endSTMB();
}

function hrs_append_menu(str111, str444, str555)
{	str222 = "&nbsp;";
	str222 += str111;
	str222 += "&nbsp;";
	
	str333 = "javascript:hrsdochange(\'";
	str333 += str444;
	str333 += "\',\'";
	str333 += str555;
	str333 += "\')";
	
	appendSTMI("false",str222,"left","middle","","","-1","-1","0","normal","transparent","transparent","","1","-1","-1","blank.gif","blank.gif","0","0","0","",str333,"_self","Verdana, Arial, Helvetica, sans-serif","10pt","#ffffff","bold","normal","none","Verdana, Arial, Helvetica, sans-serif","10pt","#ffffff","bold","normal","none","0","none","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000",str333,"","","tiled","tiled");
}
function hrs_append_submenu(str111, str444, str555)
{	str111a = "&#9674;&nbsp;";
	str111a += str111;
	
	str222 = "javascript:hrsdochange(\'";
	str222 += str444;
	str222 += "\',\'";
	str222 += str555;
	str222 += "\')";
	
	appendSTMI("false",str111a,"left","middle","","","-1","-1","0","normal","#c987ce","#a51a97","","1","-1","-1","blank.gif","blank.gif","6","-1","0","",str222,"_self","Verdana, Arial, Helvetica, sans-serif","10pt","#000000","normal","normal","none","Verdana, Arial, Helvetica, sans-serif","10pt","#ffffff","normal","normal","none","0","none","#fffff7","#fffff7","#000000","#000000","#fffff7","#fffff7","#000000","#000000",str222,"","","tiled","tiled");
}
function hrs_append_submenu2(str111, str444, str555)
{	str111a = "&#9674;&nbsp;";
	str111a += str111;
	
	str222 = "javascript:hrsdochange(\'";
	str222 += str444;
	str222 += "\',\'";
	str222 += str555;
	str222 += "\')";
	
	appendSTMI("false",str111a,"left","middle","","","-1","-1","0","normal","#c987ce","#a51a97","","1","-1","-1","blank.gif","blank.gif","-1","-1","0","",str222,"_self","Verdana, Arial, Helvetica, sans-serif","10pt","#000000","normal","normal","none","Verdana, Arial, Helvetica, sans-serif","10pt","#ffffff","normal","normal","none","0","none","#fffff7","#fffff7","#000000","#000000","#fffff7","#fffff7","#000000","#000000",str222,"","","tiled","tiled");
}
function hrs_append_separator()
{	appendSTMI("false","Menu&nbsp;Item&nbsp;1","left","middle","","","-1","-1","0","sepline","#9c649f","#c0c0c0","blank.gif","1","-1","-1","","","-1","-1","0","","","_self","Arial","9pt","#0000ff","normal","normal","none","Arial","9pt","#000099","normal","normal","none","1","solid","#c0c0c0","#c0c0c0","#ffffff","#000000","#c0c0c0","#c0c0c0","#000000","#ffffff","","","","tiled","tiled");
}




