Today = new Date();
id = new setTimeout();
function SDayName(D, A){
	var Ret
	var temp
	if (D == 0){return "Sunday"}
		else { if (D == 1){Ret = "Monday"}
		else { if (D == 2){Ret = "Tuesday"}
		else { if (D == 3){Ret = "Wednesday"}
		else { if (D == 4){Ret = "Thursday"}
		else { if (D == 5){Ret = "Friday"}
		else { if (D == 6){Ret = "Saturday"}}}}}}
	}
	if ( A != "A"){ return Ret}
	else { temp = Ret.charAt(0) + Ret.charAt(1) + Ret.charAt(2); return temp }
}
function SMonthName(M, A){
	var Ret
	var temp
	if (M == 0){Ret = "January"}
		else { if (M == 1){Ret = "February"}
		else { if (M == 2){Ret = "March"}
		else { if (M == 3){Ret = "April"}
		else { if (M == 4){Ret = "May"}
		else { if (M == 5){Ret = "June"}
		else { if (M == 6){Ret = "July"}
		else { if (M == 7){Ret = "August"}
		else { if (M == 8){Ret = "September"}
		else { if (M == 9){Ret = "October"}
		else { if (M == 10){Ret = "November"}
		else { if (M == 11){Ret = "December"}}}}}}}}}}}}
	if ( A != "A"){ return Ret}
	else { temp = Ret.charAt(0) + Ret.charAt(1) + Ret.charAt(2); return temp }
}
function SClock(M, S, AMPM){
	var temp;
	var Ret; //Return Value
	var Meridian //Meridian Flag
	Time = new Date();
	Hours = Time.getHours();
	Minutes = Time.getMinutes();
	Seconds = Time.getSeconds(); //End Variables	
	if (Hours < 10){Hours = " " + Hours}   //Add spacer for hours
	if (Minutes < 10){Minutes = "0" + Minutes}  //Add 0 spacer for minutes
	if (Seconds < 10){Seconds = "0" + Seconds} //Add 0 spacer for seconds
	if (M != "YES") {if (Hours > 12) { Hours -= 12 }} //Show Military time if the Parameter is set
	//Show the seconds if the parameter is set
	if (S == "YES") {temp =  Hours + ":" + Minutes + ":" + Seconds}
	else {temp =  Hours + ":" + Minutes}
	//Show Meridian if the flag is set to "YES"
	if (AMPM == "YES"){Hours = Time.getHours(); //Reset Time since it could have been changed by Military
			   if (Hours > 12) {Meridian = " PM"} 
			   else {Meridian = " AM"}
			   Ret = temp + Meridian
			  }
	else {Ret = temp}	
	return Ret;
}
function updateclock()
{
	clearTimeout(id);
	document.clockform.clockfield.value=SDayName(Today.getDay()) + ", " + SMonthName(Today.getMonth()) + " " + Today.getDate() + " " + Today.getYear() + " -- " + SClock("YES", "YES", "YES");	
	id = setTimeout("updateclock()",1000);
}
function SBDay(M,D){
	var Ret
	var temp
	temp = (M + 1) * 100 + (D + 1);  
	if (temp > 1215){Ret = "<b>Birthday Listings--<br></b>Ryan Kelly Dec 28<sup>th</sup>, 1998<br>Doug McDowell Jan 11<sup>th</sup>, 1944<br>Ted McDowell Jan 13<sup>th</sup>, 1969<br>"} // Dec 15 - Jan 15th
	else { if (temp > 1115){Ret = "<b>Birthday Listings--<br></b>Kelsey Wiegel Dec 5<sup>th</sup>, 2006<br>Grammie McDowell Dec 7<sup>th</sup>, 1919<br>"} // Nov 15 - Dec 14
	else { if (temp > 1015){Ret = "<b>Birthday Listings--<br></b>Trent McDowell Nov 11<sup>th</sup>, 1971<br>Susanne McDowell Oct 25<sup>th</sup>, 1978<br>"} // Oct 15 - Nov 14
	else { if (temp > 915){Ret = " "} // Sep 15 - Oct 14
	else { if (temp > 815){Ret = "<b>Birthday Listings--<br></b>Audrey Grace Kelly Sept 3<sup>th</sup>, 2002<br>Tom Kelly Sept 7<sup>th</sup>, 1966"} // Aug 15 - Sep 14
	else { if (temp > 715){Ret = "<b>Birthday Listings--<br></b>Russ Wiegel July 19<sup>th</sup>, 1974<br>Barb McDowell July 28<sup>th</sup>, 1945<br>"} // Jul 15 - Aug 14
	else { if (temp > 615){Ret = "<b>Birthday Listings--<br></b>Laurie McDowell June 23<sup>rd</sup>, 1976<br>"} // Jun 15 - Jul 14
	else { if (temp > 515){Ret = "<b>Birthday Listings--<br></b>Brandy Wiegel May 23<sup>rd</sup>, 1974<br>"} // May 15 - Jun 14
	else { if (temp > 415){Ret = "<b>Birthday Listings--<br></b>Sam McDowell Apr 20<sup>th</sup>, 2007<br>"} // Apr 15 - May 14
	else { if (temp > 315){Ret = "<b>Birthday Listings--<br></b>John McDowell Apr 2<sup>nd</sup>, 1977<br>Carrie Kelly Apr 18<sup>th</sup>, 1971<br>"} // March 15 - Apr 14
	else { if (temp > 215){Ret = "<b>Birthday Listings--<br></b>Logan Miller Feb 23<sup>rd</sup>, 1965<br>Kara Wiegel March 1<sup>st</sup>, 2003<br>"} // Feb 15 - March 14
	else { if (temp > 115){Ret = "<b>Birthday Listings--<br></b>Kelly McDowell Feb 12<sup>th</sup>, 1945<br>"} //Jan 15 - Feb 14
	else {Ret = "<b>Birthday Listings--<br></b>Doug McDowell Jan 11<sup>th</sup>, 1944<br>Ted McDowell Jan 13<sup>th</sup>, 1969<br>"}}}}}}}}}}}} //Jan
	return Ret;
}
function SXSuper(X){
	var temp
	var Ret
	var stl //Second To Last Digit
	var last //Last digit
	var ext //The extension if one is supposed to be there
	var LX //Length of X
	temp = X + ""; //Make X equal to Temp while also making it a String. 
	LX = temp.length - 1;
	last = temp.charAt(LX);
	stl = temp.charAt(LX-1);
	if (X == 0){Ret = X}
	else {if (last == 1) {if (stl == 1) {ext = "th"} else {ext = "st";} Ret = X + ext.sup()}
	else {if (last == 2) {if (stl == 1) {ext = "th"} else {ext = "nd";} Ret = X + ext.sup()}
	else {if (last == 3) {if (stl == 1) {ext = "th"} else {ext = "rd";} Ret = X + ext.sup()}
	else {ext = "th"; Ret = X + ext.sup()}}}}
	return Ret 
}
