<!--

if (navigator.appName == "Netscape") {
	layerRef="document.layers";
  	styleSwitch="";
    } else {
    	layerRef="document.all";
    	styleSwitch=".style";
    }

function showLayer(layerName) {
	if(!is_nav6)
	{
		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
		}
	else{
	var comp_id=document.getElementById(layerName);
	comp_id.style.visibility="visible";
	}
}
  	
function hideLayer(layerName) {
	if(!is_nav6)
	{
		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
	}else{
	var comp_id=document.getElementById(layerName);
	comp_id.style.visibility="hidden";
	}
}

function setnav(navname, pic) {
	if (navname != "") {
		document.images[navname].src = "/images/" + pic + "_on.gif";
	}
}


function rollon(name, pic) {
	if (name != navname){
		document.images[name].src =  "/images/" + pic + "_on.gif";
	}
}

function rolloff(name, pic) {
	if (name != navname){
		document.images[name].src = "/images/" + pic + "_off.gif";
	}
}

function winpop(url){
	popupwin = window.open(url,'win','width=782,height=550,scrollbars=yes');
}


message     = "Welcome to leesengheng.com  ^"
scrollSpeed = 100
lineDelay   = 1500

// Do not change the text below //
txt         = ""  

function scrollText(pos) {
	if (message.charAt(pos) != '^') {
		txt    =  txt + message.charAt(pos) 
		status = customDateSpring(new Date()) + showtime() + "   " + txt
		pauze  = scrollSpeed
	}
	else {
		pauze = lineDelay
		txt   = "" 
		if (pos == message.length-1) pos = -1
	}
	pos++
	setTimeout("scrollText('"+pos+"')",pauze) 
}

function showtime (){
var now = new Date();
var hours= now.getHours();
var minutes= now.getMinutes();
var seconds= now.getSeconds();
var months= now.getMonth();
var dates= now.getDate();
var years= now.getYear();
var timeValue = ""
timeValue += ((months >9) ? "" : " ")
timeValue += ((dates >9) ? "" : " ")
timeValue = ( months +1)
timeValue +="/"+ dates
timeValue +="/"+  years
var ap="am"
if (hours == 12) {
ap = "pm"
}
if (hours == 0) {
hours = 12
}
if(hours >= 13){
hours -= 12;
ap="pm"
}
var timeValue2 = " " + hours
timeValue2 += ((minutes < 10) ? ":0":":") + minutes + " " + ap
return timeValue2;
}
function MakeArray(n) {
this.length = n
return this
}
mthArray = new MakeArray(12)
mthArray[1] = "January"
mthArray[2] = "February"
mthArray[3] = "March"
mthArray[4] = "April"
mthArray[5] = "May"
mthArray[6] = "June"
mthArray[7] = "July"
mthArray[8] = "August"
mthArray[9] = "September"
mthArray[10] = "October"
mthArray[11] = "November"
mthArray[12] = "December"
dayArray = new MakeArray(7)
dayArray[1] = "Sunday"
dayArray[2] = "Monday"
dayArray[3] = "Tuesday"
dayArray[4] = "Wednesday"
dayArray[5] = "Thursday"
dayArray[6] = "Friday"
dayArray[7] = "Saturday"

function customDateSpring(oneDate) {
	var theDay = dayArray[oneDate.getDay() +1]
	var theDate =oneDate.getDate()
	var theMonth = mthArray[oneDate.getMonth() +1]
	var dayth="th"
	if ((theDate == 1) || (theDate == 21) || (theDate == 31)) {
		dayth="st";
	}
	if ((theDate == 2) || (theDate ==22)) {
		dayth="nd";
	}
	if ((theDate== 3) || (theDate  == 23)) {
		dayth="rd";
	}
	return theDay + " " + theMonth + " " + theDate + dayth + ","
}

scrollText(0)

//-->