function getGreeting(){
	//Time of day message script- by javascriptkit.com
	//Visit JavaScript Kit (http://javascriptkit.com) for script
	//Credit must stay intact for use

	var Digital=new Date()
	var hours=Digital.getHours()

	//Configure message below to your own.
	if (hours>=5&&hours<=11) //MESSAGE FOR MORNING
		document.write('Welcome, Good morning.')
	else if (hours==12) //MESSAGE FOR NOON
		document.write('It is high noon. Thanks for dropping by!')
	else if (hours>=13&&hours<=17) //MESSAGE FOR AFTERNOON
		document.write('Good afternoon, and thanks for visiting.')
	else if (hours>=18&&hours<=20) //MESSAGE FOR EVENING (6pm-8pm)
		document.write('Good evening. . . ')
	else if (hours>=21&&hours<=24) //MESSAGE FOR NIGHT (9pm-11pm)
		document.write('Good evening, glad to see you this time of the night. . .')
	else if (hours>=0&&hours<=4)  //MESSAGE FOR LATE NIGHT, EARLY MORNING (12pm-4am)
		document.write('Wow, thanks for choosing to visit our site over sleep!')
}

function getTodaysDate(){
/*Current date script credit: 
JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
*/

	var mydate=new Date()
	var year=mydate.getYear()
	if (year < 1000)
		year+=1900
	var day=mydate.getDay()
	var month=mydate.getMonth()
	var daym=mydate.getDate()
	if (daym<10)
		daym="0"+daym
	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")
	document.write(dayarray[day]+", "+montharray[month]+" "+daym+", "+year)
}

function getSpecialDay(){
 	// Easter
 	if ((month == emonth) && (date == edate)) document.write("Easter Sunday (Western)   ");
 	// January
 	if ((month == 0) && (date == 1)) document.write("New Year's Day");
 	if ((month == 0) && (day == 1) && (date > 14) && (date< 22)) document.write("Martin Luther King's Birthday");
 	// February
 	if ((month == 1) && (date== 12)) document.write("Lincoln's Birthday");
 	if((month == 1) && (date == 14)) document.write("St. Valentine's Day");
 	if ((month == 1) && (date == 15)) document.write("Galileo Galilei born (1564)");
 	if ((month == 1) && (date == 22)) document.write("Washington's Birthday");
 	if ((month == 1) && (date == 29)) document.write("Leap Day");
 	// March
 	if ((month == 2) && (date == 3)) document.write("Girl's Day (Japan)");
 	if ((month == 2) && (date == 17)) document.write("St. Patrick's Day");
 	if ((month == 2) && (date == 21)) document.write("J.S. Bach born (1685)");
 	// April
 	if ((month == 3) && (day == 0) && (date > 0) && (date< 8)) document.write("Daylight Savings Time Begins");
 	// May
 	if ((month == 4) && (day == 0) && (date > 7) && (date< 16)) document.write("Mother's Day");
 	if ((month == 4) && (day == 1) && (date > 24)) document.write("Memorial Day");
 	// June
  	if ((month == 5) && (day == 0) && (date > 15) && (date< 24)) document.write("Father's Day");
 	// July
 	if ((month == 6) && (date == 4)) document.write("Independence Day (USA)");
 	// August
 	if ((month == 7) && (date == 15)) document.write("Independence Day (India)");
 	// September
 	if ((month == 8) && (day== 1)&& (date > 0) && (date< 8)) document.write("Labor Day (USA)");
 	// October
 	if ((month == 9) && (day == 1) && (date > 7) && (date< 16)) document.write("Columbus Day (USA)");
 	if ((month == 9) && (day == 0) && (date > 24) && (date< 31)) document.write("Daylight Savings Time Ends");
 	// November
  	if ((month == 10) && (date == 11)) document.write("Veteran's Day (USA),    Remembrance Day (Canada)");
 	if ((month == 10) && (day == 4) && (date > 23) && (date< 30)) document.write("Thanksgiving (USA)");
 	if ((month == 10) && (date == 30) && (day == 4)) document.write("Thanksgiving (USA)");
 	// December
 	if ((month == 11) && (date == 24)) document.write("Christmas Eve");
 	if ((month == 11) && (date == 25)) document.write("Christmas");
 	if ((month == 11) && (date == 31)) document.write("New Year's Eve");
	//-->
}

function rotateimage()
{
	if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length))))
	{
		curindex=curindex==0? 1 : curindex-1;
	}
	else
		curindex=tempindex;

	document.images.defaultimage.src=randomimages[curindex];
}

function getRandomImages(reqPath){
/*
Random image slideshow- By Tyler Clarke (tyler@ihatecoffee.com)
For this script and more, visit http://www.javascriptkit.com
*/
	var delay=5000 //set delay in miliseconds
	var curindex=0

	var randomimages=new Array()

	randomimages[0]= reqPath + "pic1.jpg";
	randomimages[1]= reqPath + "pic13.jpg";
	randomimages[2]= reqPath + "pic2.jpg";
	randomimages[3]= reqPath + "pic3.jpg";
	randomimages[4]= reqPath + "pic4.jpg";
	randomimages[5]= reqPath + "pic5.jpg";
	randomimages[6]= reqPath + "pic6.jpg";
	randomimages[7]= reqPath + "pic7.jpg";
	randomimages[8]= reqPath + "pic8.jpg";
	randomimages[9]= reqPath + "pic9.jpg";
	randomimages[10]= reqPath + "pic10.jpg";
	randomimages[11]= reqPath + "pic11.jpg";
	randomimages[12]= reqPath + "pic12.jpg";
	randomimages[13]= reqPath + "pic13.jpg";
	randomimages[14]= reqPath + "pic14.jpg";
	randomimages[15]= reqPath + "pic15.jpg";

	var preload=new Array();

	for (n=0;n<randomimages.length;n++)
	{
		preload[n]=new Image();
		preload[n].src=randomimages[n];
	}

	document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
					
	setInterval("rotateimage()", delay);
}






function timeOfDayMessage(){
//Time of day message script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use

	var Digital=new Date()
	var hours=Digital.getHours()

	//Configure message below to your own.
	if (hours>=5&&hours<=11) //MESSAGE FOR MORNING
	document.write('<b>Welcome to our site. Good morning visitor.</b>')
	else if (hours==12) //MESSAGE FOR NOON
	document.write('<b>It is high noon. Thanks for dropping by!</b>')
	else if (hours>=13&&hours<=17) //MESSAGE FOR AFTERNOON
	document.write('<b>Good afternoon, and thanks for visiting.</b>')
	else if (hours>=18&&hours<=20) //MESSAGE FOR EVENING (6pm-8pm)
	document.write('<b>Good evening. . . </b>')
	else if (hours>=21&&hours<=24) //MESSAGE FOR NIGHT (9pm-11pm)
	document.write('<b>Glad to see you this time of the night. . .</b>')
	else if (hours>=0&&hours<=4)  //MESSAGE FOR LATE NIGHT, EARLY MORNING (12pm-4am)
	document.write('<b>Wow, thanks for choosing to visit our site over sleep!</b>')
}

function getOcassionCountdownMessage(){
/*
Annual Occasions Count Down script- By JavaScript Kit
For this and over 400+ free scripts, visit http://www.javascriptkit.com
This notice must stay intact
*/

	var today=new Date()

	//Enter the occasion's MONTH (1-12) and DAY (1-31):
	var theoccasion=new Date(today.getFullYear(), 06, 17)

	//Customize text to show before and on occasion. Follow grammer below:
	var beforeOccasionText="left until Game Day"
	var onOccasiontext="Game Day!!! First game at 3:30pm!"

	var monthtext=new Array("Jan","Feb","Mar","April","May","June","July","Aug","Sep","Oct","Nov","Dec")
	theoccasion.setMonth(theoccasion.getMonth()-1) //change to 0-11 month format
	var showdate="("+monthtext[theoccasion.getMonth()]+" "+theoccasion.getDate()+")" //show date of occasion

	var one_day=1000*60*60*24
	var calculatediff=""

	calculatediff=Math.ceil((theoccasion.getTime()-today.getTime())/(one_day))
	if (calculatediff<0){ //if bday already passed
	var nextyeartoday=new Date()
	nextyeartoday.setFullYear(today.getFullYear()+1)
	calculatediff=Math.ceil((nextyeartoday.getTime()-today.getTime())/(one_day)+calculatediff)
	}

	//Display message accordingly
	var pluraldayornot=(calculatediff==1)? "day" : "days"
	if (calculatediff>0)
	document.write("<b>"+calculatediff+" "+pluraldayornot+" "+beforeOccasionText+" "+showdate+"!</b>")
	else if (calculatediff==0)
	document.write("<b>"+onOccasiontext+" "+showdate+"!</b>")
}


function openRecSiteMapWindow()
{
    var recSiteUrl = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Family+Recreation+Complex&sll=28.049826,-82.375016&sspn=0.007404,0.014012&gl=us&g=6610+Whiteway+Dr,+Tampa,+FL+33617&ie=UTF8&hq=Family+Recreation+Complex&hnear=6610+Whiteway+Dr,+Tampa,+FL+33617&ll=28.049599,-82.375016&spn=0.007878,0.014012&t=h&z=16";
	window.open(recSiteUrl,"new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width=950, height=750, top=100, left=100");
}


function openDraftResultWindow()
{
 	var draftUrl = "http://www.fdbl.org/fdbl/pages/DraftResult2007.html";

	window.open(draftUrl,"new_window","toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=yes, resizable=yes, copyhistory=yes, width=828, height=480, top=100, left=100");

}



function openDownloadsWindow()
{
 	var draftUrl = "http://www.fdbl.org/fdbl/pages/Downloads.html";

	window.open(draftUrl,"new_window","toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=yes, resizable=yes, copyhistory=yes, width=370, height=275, top=100, left=100");

}



function openStars1Window()
{
 	var draftUrl = "http://www.fdbl.org/fdbl/pages/fdbl360_01.html#W1";

	window.open(draftUrl,"new_window","toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=yes, resizable=yes, copyhistory=yes, width=300, height=630, top=100, left=100");

}


function openStars2Window()
{
 	var draftUrl = "http://www.fdbl.org/fdbl/pages/fdbl360_01.html#W2";

	window.open(draftUrl,"new_window","toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=yes, resizable=yes, copyhistory=yes, width=300, height=630, top=100, left=100");

}


function openStars3Window()
{
 	var draftUrl = "http://www.fdbl.org/fdbl/pages/fdbl360_01.html#W3";

	window.open(draftUrl,"new_window","toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=yes, resizable=yes, copyhistory=yes, width=300, height=630, top=100, left=100");

}



function openVideosWindow()
{
 	var draftUrl = "http://www.fdbl.org/fdbl/pages/fdbl360_02.html#W3";

	window.open(draftUrl,"new_window","toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=yes, resizable=yes, copyhistory=yes, width=200, height=410, top=100, left=100");

}

function openregformWindow()
{
 	var draftUrl = "http://www.fdbl.org/fdbl/pages/regform.html";

	window.open(draftUrl,"new_window","toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=no, resizable=yes, copyhistory=yes, width=550, height=610, top=100, left=100");

}

function openregformPWindow()
{
 	var draftUrl = "http://www.fdbl.org/fdbl/pages/regformP.html";

	window.open(draftUrl,"new_window","toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=yes, resizable=yes, copyhistory=yes, width=550, height=610, top=100, left=100");

}


// Tick (countdownId, eventDate)
function CD_T(id, e) {
	var n = new Date();
	CD_D(+n, id, e);
	setTimeout("if(typeof CD_T=='function'){CD_T('" + id + "'," + e + ")}", 1100-n.getMilliseconds()); // We offset from 1100 so that our clock ticks every second (the millisecond correction each loop sees to that), but updates 0.1s after every whole second so that we don't accidentally read the same Date() twice in the same second
};

// Calculate time and update display (dateNow, countdownId, eventDate)
function CD_D(n, id, e) {
	var ms = e - n;
	if (ms <= 0) ms *= -1;
	var d = Math.floor(ms/864E5);
	ms -= d*864E5;
	var h = Math.floor(ms/36E5);
	ms -= h*36E5;
	var m = Math.floor(ms/6E4);
	ms -= m*6E4;
	var s = Math.floor(ms/1E3);

	// If you want to manually customise the counter display, then edit this line:
	if (CD_OBJS[id]) {
		CD_OBJS[id].innerHTML = d + " day" + (d == 1 ? " " : "s ") + CD_ZP(h) + "h " + CD_ZP(m) + "m " + CD_ZP(s) + "s";
	}
};

// Prefix single integers with a zero
function CD_ZP(i) {
	return (i<10 ? "0" + i : i);
};

// Initialisation
function CD_Init() {
	var pref = "countdown";
	var objH = 1; // temp boolean true value
	if (document.getElementById || document.all) {
		for (var i=1; objH; ++i) {
			var id	= pref + i;
			objH	= document.getElementById ? document.getElementById(id) : document.all[id];

			if (objH && (typeof objH.innerHTML) != 'undefined') {
				var s	= objH.innerHTML;
				var dt	= CD_Parse(s);
				if (!isNaN(dt)) {
					CD_OBJS[id] = objH; // Store global reference to countdown element object
					CD_T(id, dt.valueOf());
					if (objH.style) {
						objH.style.visibility = "visible";
					}
				}
				else {
					objH.innerHTML = s + "<a href=\"http://andrewu.co.uk/clj/countdown/\" title=\"Countdown Error: Invalid date format used, check documentation (see link)\">*</a>";
				}
			}
		}
	}
};

// Get Date() object from 2006-01-01 00:00:00 GMT+00:00 date format
function CD_Parse(strDate) {
	// Pattern match to a countdown date
	var objReDte = /(\d{4})\-(\d{1,2})\-(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{0,2})\s+GMT([+\-])(\d{1,2}):?(\d{1,2})?/;

	if (strDate.match(objReDte)) {
		// Start with a default date and build it up into the countdown date through Date setter methods
		var d = new Date(0);

		d.setUTCFullYear(+RegExp.$1,+RegExp.$2-1,+RegExp.$3); // Set YYYY-MM-DD directly as UTC
		d.setUTCHours(+RegExp.$4,+RegExp.$5,+RegExp.$6); // Set HH:MM:SS directly as UTC

		// If there is a timezone offset specified then we need to compensate for the offset from UTC
		var tzs	= (RegExp.$7 == "-" ? -1 : 1); // Timezone sign
		var tzh = +RegExp.$8; // Get requested timezone offset HH (offset ahead of UTC - may be negative)
		var tzm = +RegExp.$9; // Get requested timezone offset MM (offset ahead of UTC - always positive)
		if (tzh) {
			d.setUTCHours(d.getUTCHours() - tzh*tzs); // Compensate for timezone HH offset from UTC
		}
		if (tzm) {
			d.setUTCMinutes(d.getUTCMinutes() - tzm*tzs); // Compensate for timezone MM offset, depending on whether the requested MM offset is ahead or behind of UTC
		}
		return d; // Date now correctly parsed into a Date object correctly offset from UTC internally regardless of users current timezone.
	}
	else {
		return NaN; // Didn't match required date format
	};
};

var CD_OBJS = new Object();

// Try not to commandeer the default onload handler if possible
if (window.attachEvent) {
	window.attachEvent('onload', CD_Init);
}
else if (window.addEventListener) {
	window.addEventListener("load", CD_Init, false);
}
else {
	window.onload = CD_Init;
}
