
<!-- Begin
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
if (timeValue == "0") timeValue = 12;
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " P.M." : " A.M."
document.clock.face.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock() {
stopclock();
showtime();
}
// End -->

<!--
// wget http://www.wired.com/ly/wired/shared/js/global.js

// ----------------------------------------------
// Constants and Globals
// ----------------------------------------------

//set any globals here
var ordnum = "1";

// ----------------------------------------------
// Initialize
// ----------------------------------------------

function wnInit () {

	//set 8-digit random number to be used in ads
	for(var o=0;o < 7;o++) {
		ordnum = ordnum + Math.floor((Math.random()*10));
	}

}

//call init function to execute things when this page loads
wnInit();

// ----------------------------------------------
// Google Ad functions
// ----------------------------------------------

// function google_ad_request_done (google_ads) {

// function RenderGoogleAd (style) {

// function BuildGoogleFBUrl (google_ads) {

// ----------------------------------------------
// Window functions
// ----------------------------------------------

// ----------------------------------------------
// Date functions
// ----------------------------------------------

function isValidDay(iMonth, iDay, iYear) {

	//if selected exceeds max days in the month, returns max

	//set the days of the month array
	var aMonthDays = new Array(31,28,31,30,31,30,31,31,30,31,30,31);

	//if it's a leap year, add a day to feb
	if (iYear%4 == 0) {
		aMonthDays[1] = 29;
	}

	var iMonthIndex = iMonth-1;
	var iMaxDays = aMonthDays[iMonthIndex];
	
	//if the day exceeds the max, return the max
	if (iDay > iMaxDays) {
		return iMaxDays;
	} else {
		return iDay;
	}

}

function curDate() {
	var months = new Array(
		'January', 'February', 'March', 'April', 'May', 'June',
		'July', 'August', 'September', 'October', 'November', 'December'
	);

	var now   = new Date();
	var today = now.getDate();
	var month = now.getMonth();
	var year  = now.getFullYear();

	document.write(months[now.getMonth()] + ' ' + today + ', ' + year);
}

//-->
