function shapetime(vhrs,vmin,vsec){
	if(vsec<=9) vsec="0"+vsec;
	if(vmin<=9) vmin="0"+vmin;
	if(vhrs<=9) vhrs="0"+vhrs;
	return vhrs+":"+vmin+":"+vsec
}
function shapemintime(vhrs,vmin){
	var str="";
	if(vmin<=9) vmin="0"+vmin;
	if(vhrs<12) 
	    str = " "+vhrs+":"+vmin+" am in Beijing";
	if(vhrs>=12){
	    if(vhrs>12)
   		vhrs=vhrs-12;
		str = " "+vhrs+":"+vmin+" pm in Beijing";
	}
	return str;
}
last0=t0;
function NewTick1(){
	noww=new Date();
	nhrs=noww.getHours();
    nmin=noww.getMinutes();
    nsec=noww.getSeconds();
	t1=noww.getTime(nhrs,nmin,nsec);
	if(t1<last0||((t1-last0)>300000&&last0!=t0)){
		t1=last0+500;
	}
	last0=t1;
	noww.setTime(t1+dectime);
	nhrs=noww.getHours();
	nmin=noww.getMinutes();
	nsec=noww.getSeconds();
}
function NewTick(){
	noww=new Date();
	t1=noww.getTime();
	if(t1<last0||((t1-last0)>300000&&last0!=t0)){
		t1=last0+500;
	}
	last0=t1;
	noww.setTime(t1+dectime);
	if(noww.getDate()!=nday){
		nyear=noww.getFullYear();
		nmonth=noww.getMonth()+1;
		nday=noww.getDate();
		nextday=true;
		}
		nhrs=noww.getHours();
		nmin=noww.getMinutes();
		nsec=noww.getSeconds();
}
dectime1=new Date(nhrs,nmin,nsec).getTime()-t0;
dectime=new Date(nyear,nmonth-1,nday,nhrs,nmin,nsec).getTime()-t0;
function getshortstr(){return shapetime(nhrs,nmin,nsec);}
function getminshortstr(){return shapemintime(nhrs,nmin);}