//create and set email variables
var user = "texans";
var site = "elsweb.net";
var emailaddress = user + "@" + site;
var dtDate = new Date;
var iMonth = dtDate.getMonth() + 1;
var iDay = dtDate.getDate();
var iCurrentYear = dtDate.getFullYear()

//determines the current month and changes the linked style sheet for the current season
//(the link tag is only accessible in IE)
/*if (navigator.appName == "Microsoft Internet Explorer") {
	if (iMonth == 11) {
		//fall
		document.all.lkCSS.href = "style/elsweb_fall.css";
	} else if (iMonth == 12) {
		//christmas
		document.all.lkCSS.href = "style/elsweb_xmas.css";
	} else {
		//all other seasons
		document.all.lkCSS.href = "style/elsweb.css";
	}
}*/

//write the greeting that appears at the top of the home page
function writeGreeting() {
	if (iMonth == 1) {
		document.write("<h1>Happy New Year Y'all!</h1>");
	} else if (iMonth == 2 && iDay == 14) {
		document.write("<h1>Happy Valentine's Day Y'all!</h1>");
	} else if (iMonth == 7 && iDay == 4) {
		document.write("<h1>Happy 4th of July Y'all!</h1>");
	} else if (iMonth == 10 && iDay == 31) {
		document.write("<h1>Happy Halloween Y'all!</h1>");
	} else if (iMonth == 12) {
		document.write("<h1>Merry Christmas Y'all!</h1>");
	} else if (iMonth == 9 && iDay == 11) {
		document.write("<h1>Our Thoughts Are With The Victims Of September 11, 2001</h1>");
	} else {
		document.write("<h1>Howdy Y'all!</h1>");
	} 
}

//write a special, regular announcement based on date
function writeAnnouncement() {
	if (iMonth == 2 && iDay == 21) {
		document.write("<p align='center' class='notice'>Today is John's birthday. Happy Birthday!</p>");
	} else if (iMonth == 3 && iDay == 11) {
		document.write("<p align='center' class='notice'>Today is Michael's birthday. Happy Birthday!</p>");
	} else if (iMonth == 6 && iDay == 23) {
		document.write("<p align='center' class='notice'>Today is Esm&eacute;'s birthday. Happy Birthday!</p>");
	} else if (iMonth == 6 && iDay == 26) {
		document.write("<p align='center' class='notice'>Today is Johnny's birthday. Happy Birthday!</p>");
	} else if (iMonth == 9) {
		if (iDay == 5) {
			document.write("<p align='center' class='notice'>Today is our " + (iCurrentYear - 1996) + "th anniversary living in the US!</p>");
		} else {
			document.write("<p align='center' class='notice'>This month we celebrate our " + (iCurrentYear - 1996) + "th year in the US!</p>");
		}
	}
}

//set the search text box width according to browser type
function setSearchBoxSize() {
	if (navigator.appName == "Netscape") {
		//netscape
		document.SearchForm.Keywords.size = 7;
	} else {
		//other browsers
		document.SearchForm.Keywords.size = 12;
	}
}

function showMemorialText() {
	var sText = "";
	sText += "This candle serves as a remembrance to all the victims of the terrorist attacks in America on September 11, 2001.\n";
	sText += "- May we never forget them -\n\n"
	sText += "This candle symbolizes the hope that is in America today as a result of the unity and spirit of the American people.\n";
	sText += "- May that spirit never die -";
	alert(sText);
}

function GoToSite(sSite) {
	location.href = "http://" + sSite;
}

function GetIMGsource(sSource) {
	return sSource;
}

//var tToday = new Date;
		//var tArrival = new Date;
		//var iDays, difference
		//tArrival.setFullYear(2001);
		//tArrival.setMonth(8);	months go from 0 to 11
		//tArrival.setDate(5);
		//difference = tToday.getTime() - tArrival.getTime();
		//iDays = Math.floor(difference/(1000*60*60*24));
		
		//function writeDays() {
		//	document.write(iDays);
		//}