var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")

function getthedate(){
	var mydate=new Date()
	var hours=mydate.getHours()
	var minutes=mydate.getMinutes()
	var seconds=mydate.getSeconds()
	var dn="AM"
	if (hours>=12){
		dn="PM"
		if (hours>12){
			hours=hours-12
		}
	}
	
	if (hours==0)
	hours=12
	if (minutes<=9)
		minutes="0"+minutes
	if (seconds<=9)
		seconds="0"+seconds
	//change font size here
	var cdate=dayarray[mydate.getDay()]+", "+montharray[mydate.getMonth()]+" "+mydate.getDate()+" "+mydate.getFullYear()+" - "+hours+":"+minutes+":"+seconds+" "+dn+""
	if (document.all)
		document.all.clock.innerHTML=cdate
	else if (document.getElementById)
		document.getElementById("clock").innerHTML=cdate
	else
		document.write(cdate)
}

function goforit(elementName){
	//document.searchform.q.focus();
	//setInterval("getthedate()",1000);
	document.getElementById(elementName).focus();
}

function openWin(url) {
	var w_left = Math.ceil(screen.width/2-300);
	var openWin = window.open(url,"VoteWin","left="+w_left+",top=30,scrollbars=no,menubar=no,height=450,width=600,resizable=yes,toolbar=no,location=no,status=no"); 
	openWin.focus();
}

function loadWeather() {
	/* Locations can be edited manually by updating 'wx_locID' below.  Please also update */
	/* the location name and link in the above div (wx_module) to reflect any changes made. */
	var wx_locID = 'USAL0540';
	
	/* If you are editing locations manually and are adding multiple modules to one page, each */
	/* module must have a unique div id.  Please append a unique # to the div above, as well */
	/* as the one referenced just below.  If you use the builder to create individual modules  */
	/* you will not need to edit these parameters. */
	var wx_targetDiv = 'wx_module_8438';  /* var wx_targetDiv = 'wx_module_3576'; */
	
	/* Please do not change the configuration value [wx_config] manually - your module */
	/* will no longer function if you do.  If at any time you wish to modify this */
	/* configuration please use the graphical configuration tool found at */
	/* https://registration.weather.com/ursa/wow/step2 */
	var wx_config='SZ=160x600*WX=HWC*LNK=SSNL*UNT=F*BGI=seasonal2*MAP=CSC|null*DN=troycable.net*TIER=0*PID=1002912372*MD5=5f1ee2e5547cb9fa628eadbde3782c49';
	
	document.write('<script src="'+document.location.protocol+'//wow.weather.com/weather/wow/module/'+wx_locID+'?config='+wx_config+'&proto='+document.location.protocol+'&target='+wx_targetDiv+'"></script>');  
}