// JavaScript Document

function startTime() {
	var today=new Date();
	var h=today.getHours();
	var m=today.getMinutes();
	var s=today.getSeconds();
	// add a zero in front of numbers<10
	m=checkTime(m);
	s=checkTime(s);
	document.getElementById('txtTime').innerHTML=h+":"+m+":"+s;
	t = setTimeout('startTime()',500);
}

function checkTime(i) {
	if (i<10) i="0" + i;
	return i;
}

function setHomepage(url) {
	bName = navigator.appName;
	if (bName == "Microsoft Internet Explorer") {
		this.style.behavior='url(#default#homepage)'; 
		this.setHomePage(url);
	} else {
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
  		prefs.setCharPref('browser.startup.homepage', url);
	}
	
}

function openpopup(url, width, height, rs, sc){
	var popurl = url
	winpops = window.open(popurl,"","width=" + width + ",height=" + height + ",resizable=" + rs + ",scrollbars=" + sc)
}