// download.js
// Functions in this file are used by download.aspx pages on the web site. 
// Place the following code in the <head> section of the web page to include code in a web page:
// <script src="/download.js" type="text/javascript"></script>
//
// Add the following body tag to call the UpdateData function when the page is loaded:
// <body onload="UpdateDate()">
//
// Include the following hidden field in the download form to receive the data
// <input type="hidden" name="date" size="35">
//
	function UpdateDate()	
	{
	 	// Save the client computer's date and time in a hidden filed name data on a web form
		var date = new Date();
		var mm = date.getMonth();
		mm++;
		var dd = date.getDate(); 
		yyyy = date.getFullYear();
		hh = date.getHours();
		min = date.getMinutes();
		ss = date.getSeconds();
		zzzz = date.getTimezoneOffset()/60 * -1; 
		mm += '';									// convert to string
		dd += '';
		hh += '';
		min += '';
		ss += '';
		if (mm.length == 1) mm = "0" + mm;
		if (dd.length == 1) dd = "0" + dd;
		if (hh.length == 1) hh = "0" + hh;
		if (min.length == 1) min = "0" + min;
		if (ss.length == 1) ss = "0" + ss;
	   document.forms[0].date.value = (mm + "/" + dd + "/" + yyyy + "  " + 	
	   						hh + ":" + min + ":" + ss + " GMT " + zzzz + 
	   						"  (from client)");		
	}