<!--
/*------------------------------------------------------------------------*/
// contactus JavaScript Document
/*------------------------------------------------------------------------*/
function Validate_ContactForm()
{
	var aUserName;
	var aUserPhone;
	var aUserEmail;
	var aSubject; 
	var aComments; 
	var aMessage; 
	var FormIsValid = new Boolean(true); 
	var AlertMessage = new String("The form you submitted could not be accepted. \nYou should correct the following errors:\n\n"); 
	
	aUserName = document.Contact_Form.Contact_Name.value; 
	aUserPhone = document.Contact_Form.Contact_Phone.value; 
	aUserEmail = document.Contact_Form.Contact_Email.value; 
	aSubject = document.Contact_Form.Contact_Subject.value;
	aComments = document.Contact_Form.Contact_Comments.value;
	
	if (aUserName == "")
	{
		document.Contact_Form.Contact_Name.value = "Anonymous"; 
	}
	if (aUserPhone == "")
	{
		document.Contact_Form.Contact_Email.value = "(000) 000-0000"; 
	}
	if (aUserEmail == "")
	{
		document.Contact_Form.Contact_Email.value = "NoName@NoDomain.com"; 
	}
	if (aSubject == "")
	{
		AlertMessage += ("Please enter a valid Subject value.\n"); 
		FormIsValid = false; 
	}
	if (aComments == "")
	{
		AlertMessage += ("Please enter a valid Comments value.\n"); 
		FormIsValid = false; 
	}
	
	if (!FormIsValid)
	{
		alert(AlertMessage);
		return FormIsValid;
	}

	document.Contact_Form.Contact_ReplyTo.value = aUserEmail; 
	
	document.Contact_Form.Contact_CCSender.value = (document.Contact_Form.Contact_CopySender.checked? document.Contact_Form.Contact_Email.value:""); 
/*	
	var temp = ""; 
	temp += "aUserName:\t" + document.Contact_Form.Contact_Name.value + "\n"; 
	temp += "aUserPhone:\t" + document.Contact_Form.Contact_Phone.value + "\n"; 
	temp += "aUserEmail:\t" + document.Contact_Form.Contact_Email.value + "\n"; 
	temp += "Subject:\t" + document.Contact_Form.Contact_Subject.value + "\n"; 
	temp += "Recipient:\t" + document.Contact_Form.Contact_To.value + "\n"; 
	temp += "From:\t" + document.Contact_Form.Contact_From.value + "\n"; 
	temp += "ReplyTo:\t" + document.Contact_Form.Contact_ReplyTo.value + "\n"; 
	temp += "Comments:\n" + document.Contact_Form.Contact_Comments.value + "\n"; 
	alert(temp); 
*/	
	aMessage = "";
	if (document.Contact_Form.Contact_Comments.value != "")
	{
		aMessage += "Message From:\t" + document.Contact_Form.Contact_Name.value + "\n"; 
		aMessage += "Phone:\t\t" + document.Contact_Form.Contact_Phone.value + "\n"; 
		aMessage += "Email:\t\t" + document.Contact_Form.Contact_Email.value + "\n"; 
		aMessage += "\nSubject:\t" + document.Contact_Form.Contact_Subject.value + "\n"; 
		aMessage += "\n\nComments:\n" + document.Contact_Form.Contact_Comments.value + "\n"; 
		aMessage += "\n\Thank You\n"; 
	//	alert(aMessage); 
	}
	else 
	{
	//	alert("Empty Message"); 
	}
	document.Contact_Form.Contact_Message.value = aMessage; 

	return FormIsValid; 
}
/*------------------------------------------------------------------------*/
-->
