function right(mainStr,lngLen) { 
// alert(mainStr.length) 
if (mainStr.length-lngLen>=0 && mainStr.length>=0 && mainStr.length-lngLen<=mainStr.length) { 
return mainStr.substring(mainStr.length-lngLen,mainStr.length)} 
else{return null} 
} 
function curTime(){
//2009-5-14 10:49:43
	var now = new Date();
	return now.getFullYear()+"-"+right(("0"+(now.getMonth()+1)),2)+"-"+right(("0"+now.getDate()),2)+" "+now.getHours()+":"+right(("0"+now.getMinutes()),2)+":"+right(("0"+now.getSeconds()),2);
	return now.getFullYear()+"-"+(now.getMonth()+1)+"-"+now.getDate()+" "+now.getHours()+":"+right(("0"+now.getMinutes()),2)+":"+right(("0"+now.getSeconds()),2);
}
function Tick(){
	document.getElementById("tick").innerText=curTime();
}
function Initial(){
	document.getElementById("tick").innerText=curTime();
	Tick();
	setInterval(Tick,1000);
}
