// Current Server Time script (SSI or PHP)- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use.

//Depending on whether your page supports SSI (.shtml) or PHP (.php), UNCOMMENT the line below your page supports and COMMENT the one it does not:
//Default is that SSI method is uncommented, and PHP is commented:

//var currenttime = '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' //SSI method of getting server date
//var currenttime = '<? print date("F d, Y H:i:s", time())?>' //PHP method of getting server date

///////////Stop editting here/////////////////////////////////

var serverdate = new Date(currenttime);

function padlength(what){
	var output=(what.toString().length==1)? "0"+what : what

	return output;
}

function jsUra() {
	if (serverdate.getHours() == 8 && serverdate.getMinutes() == 5 && serverdate.getSeconds() == 1){
		location.reload(true);
	}
	else if(serverdate.getHours() == 14 && serverdate.getMinutes() == 0 && serverdate.getSeconds() == 1) {
		location.reload(true);
	}
	else if(serverdate.getHours() == 9 && serverdate.getMinutes() == 30 && serverdate.getSeconds() == 1) {
		location.reload(true);
	}
	serverdate.setSeconds(serverdate.getSeconds()+1);
	var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds());
	document.getElementById('jsClock').innerHTML = timestring;
}
