/* webSubmit.js
	-> functions for "websubmit" form in contact.html
	-> input validation
	-> subject line customization, autonumbering

	Last updated: 3/7/08 by gfoster

*/

function formSubmit(form) {
	// Call with onClick="formSubmit(this.form)"


	// Add more info to the "email_subject"
	today = new Date() ;
	mailIdentifier = "" ;

	// add sender's e-mail address
	mailIdentifier += form.email_from.value ;

	// prepare to add date
	mailIdentifier += ' on ' ;

	// add date
	mailIdentifier += today.getFullYear() + '/' + today.getMonth() + '/' + today.getDate() ;

	// prepare to add time
	mailIdentifier += ' at ' ;

	// add time
	mailIdentifier += today.getHours() + ':' + today.getMinutes() + ':' + today.getSeconds() ;

	// append identifier to hidden subject field in form
	form.email_subject.value += mailIdentifier ;

	// Once all important actions are done, submit the form
	form.submit() ;
}
