/*******************************************************************

Title			Pop Up Window
------------	----------------------------------------------------
Description		Launches a popup window, centered in the screen. 
				Width and Height will be passed via javscript
------------	----------------------------------------------------
Usage			<a href="JavaScript:popUp('URL',0,0)">DET</a>
				<a href="#" onClick="JavaScript:popUp('URL',0,0)">DET</a>
				
*******************************************************************/
function popUp(win, w, h){
	var cl = (screen.width-w)/2;
	var ct = (screen.height-h)/2;
		
	newWindow = window.open(win,'PopUp','toolbar=no,location=no,status=yes,scrollbars=yes,resizable=no,width='+w+',height='+h+',left='+cl+',top='+ct);
	newWindow.focus();
}

/*******************************************************************

Title			Page Last Updated
------------	----------------------------------------------------
Description		Shows the date a specific file was last modified or
				Updated. Based on the files date properties.
------------	----------------------------------------------------
Usage			<script language="Javascript">pageLastUpdated()</script>
				
******************************************************************/
function pageLastUpdated(){

	var days = new Array(8);	
	days[1] = "Sunday";
	days[2] = "Monday";
	days[3] = "Tuesday";
	days[4] = "Wednesday";
	days[5] = "Thursday";
	days[6] = "Friday";
	days[7] = "Saturday";
	
	var months = new Array(13);
	months[1] = "January";
	months[2] = "February";
	months[3] = "March";
	months[4] = "April";
	months[5] = "May";
	months[6] = "June";
	months[7] = "July";
	months[8] = "August";
	months[9] = "September";
	months[10] = "October";
	months[11] = "November";
	months[12] = "December";
	
	var dateObj = new Date(document.lastModified)
	var wday = days[dateObj.getDay() + 1]
	var lmonth = months[dateObj.getMonth() + 1]
	var date = dateObj.getDate()
	var fyear = dateObj.getYear()
	
	if (fyear < 2000) {
		fyear = fyear + 1900
	}
	
	document.write("This page was last updated: " + lmonth + " " + date + ", " + fyear)

}

/*******************************************************************

Title			Header Functions
------------	----------------------------------------------------
Description		General functions to aid in header properties and
				Display (specifically the input field and date)
------------	----------------------------------------------------

				
******************************************************************/

// Clear input field data on focus
function clearValue(element) {
	if (element.defaultValue==element.value) element.value = ""
}

// Specify format and collect today's date
function getToday() {
	var d=new Date()
	var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
	var monthname=new Array("January","Februray","March","April","May","June","July","August","September","October","November","December")
	
	document.write("" + weekday[d.getDay()] + " " + d.getDate() + ", " + monthname[d.getMonth()] + " " + d.getFullYear() + "")
}
