function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  if(navigator.appName == 'Netscape'){MM_swapImgRestore();}
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}


var theDay = new Date("December 25, 2001")  //Date must be in the form Month Day, Year
var DayTill     //The string that is going to put all numbers together and make sense.

function countdown()	{
		var today = new Date()    //Create a variable with today's date
		var second = Math.floor((theDay.getTime() - today.getTime())/1000)  //Find the seconds
		var minute = Math.floor(second/60)  //Devide "second" into 60 to get the minutes
		var hour = Math.floor(minute/60)  //Devide "minute" into 60 to get the hours
		var day = Math.floor(hour/24)   //Devide "hour" into 60 to get the days
		CDay= day     //Correct day
		CHour= hour % 24    //Correct hour, after devide into 24, the remainder deposits here.
		CMinute= minute % 60    //Correct minute, after devide into 60, the remainder deposits here.
		CSecond= second % 60    //Correct second, after devide into 60, the remainder deposits here.
		if (CDay < 0 ) {CDay = "0"; CHour = "0"; CMinute = "0"; CSecond = "0";} //Stop at 0
		DayTill =  CDay + " days, " + CHour + " hours , " + CMinute + " minutes and " + CSecond + " seconds"
		document.clock.countdown.value = DayTill 
		var counter = setTimeout("countdown()", 1000)
		}


dayName = new Array("", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")
monName = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
now = new Date
var strDay;
var ampm;
var hour;
var minutes;

if ((now.getDate() == 1) || (now.getDate() != 11) && (now.getDate() % 10 == 1)) 		// Correction for 11th and 1st/21st/31st
	strDay = "st ";
else if ((now.getDate() == 2) || (now.getDate() != 12) && (now.getDate() % 10 == 2)) 	// Correction for 12th and 2nd/22nd/32nd
	strDay = "nd ";
else if ((now.getDate() == 3) || (now.getDate() != 13) && (now.getDate() % 10 == 3)) 	// Correction for 13th and 3rd/23rd/33rd
	strDay = "rd ";
else
	strDay = "th ";
	
if (now.getDate() <= 9)
	date = "0" + now.getDate();
else
	date = now.getDate();
	
if (now.getHours() == 0)
	hour = 12;
else if (now.getHours() > 12)
	hour = "0" + (now.getHours() - 12);
else 
	hour = now.getHours();
	
if (now.getHours() < 12)
	ampm = "AM";
else 
	ampm = "PM";
	
if (now.getMinutes() <= 9)
	minutes = "0" + now.getMinutes();
else
	minutes = now.getMinutes();
