var timer=null;
var timerrun=false;
function stoptime() 
{
	if(timerrun)
	clearTimeout(timer);
	timerrun=false;
}
function starttime() 
{
	stoptime();
	showtime();
}
function showtime() 
{
var all=new Date();
var hours=all.getHours();
var minutes=all.getMinutes();
var seconds=all.getSeconds();
var timevalue=((hours<10) ? "0" : "") + hours 
timevalue += ((minutes<10) ? ":0" : ":") + minutes
timevalue += ((seconds<10) ? ":0" : ":") + seconds
var clock=document.getElementById('clock');
clock.innerHTML=timevalue;
timer=setTimeout('showtime()',1000);
timerrun=true;
}
function previewImage(url,width,height,title)
{
	height+=64;width+=64;
	var w=window.open(url,'prv','width='+width+',height='+height+',top='+(screen.height/2-height/2)+',left='+(screen.width/2-width/2)+',location=0,menubar=0,resizable=1,scrollbars=0,status=0,titlebar=0,toolbar=0,directories=0,hotkeys=0');
	setTimeout(function(){w.document.body.style.padding='32px';w.document.body.style.margin='0px';if(typeof(title)!='undefined')w.document.title=title;},0);
	w.focus();
}
