/********************************************************************/
/* This file writes the date from the client's computer time.		*/
/* By Tanner Naeher, Coyote6 GraphX, coyote6graphx.com.				*/
/********************************************************************/

// Start once the document is ready.
$(document).ready(function(){
		// Write the date into the date field.
		write_date ('#date');
});

// Write date function.
function write_date (id) {
	// Days of the Week.
	var day_names = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	// Months of the Year.
	var month_names = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	// Gets the Current Date.
	var now = new Date();
	// Creates the Date According to Users Computer's Time.
	var date_string = day_names[now.getDay()] + " - " + month_names[now.getMonth()] + " " + now.getDate() + ", " + now.getFullYear();
	// Writes the Date into the Element with the Date ID.
	$(id).html(date_string);
}