// JavaScript document

// Functions 
function SetDirty() {
  return
}

function CreateAppointment() {
	var FrameName = 2
	var JumpToString = "InsertAppointment.asp"
	//alert("JumpToString = " + JumpToString)
	parent.location.href = JumpToString
//	parent.frames[FrameName].location.href = JumpToString
}

function VerifyData() {
//	var Flag; 
	var ErrorCount = 0;
	
//	ResetErrorFlags();

	// Check for data in Required fields
	if (document.DataPage.fstname.value == 0)			//  First name
	{
		alert("First Name is required, please correct!");
		return false;
	}
	else
		stringFilterSpecial(document.DataPage.fstname);

	if (document.DataPage.lstname.value == 0)			//  last name
	{
		alert("Last Name is required, please correct!");
		return false;
	}
	else
		stringFilterSpecial(document.DataPage.lstname);

	if (document.DataPage.contactnbr.value != "")		//  Phone
	{
		stringFilterPhone(document.DataPage.contactnbr)
		if (document.DataPage.contactnbr.value.length != 10)
		{
			alert("Phone number should be 10 characters in length, please correct!");
			return false;
		}
		if (!validateInteger(document.DataPage.contactnbr.value))
		{
			alert("Phone number contains non-number characters, please correct!");
			return false;
		}
		else
		   formatPhone(document.DataPage.contactnbr);
	}
	else
	{
		alert("Please enter a contact phone number");
		return false;
	}
	
	if (document.DataPage.vehmake.value == 0)			//  Vehicle Make
	{
		alert("Please select a vehicle make");
		return false;
	}
		
	if (document.DataPage.vehmodel.value == 0)			//  Vehicle Model
	{
		alert("Please enter a vehicle model");
		return false;
	}
	else
		stringFilterSpecial(document.DataPage.vehmodel);
		
	if (document.DataPage.servdesc.value == 0)			//  Service Description
	{
		alert("Please enter a description of the service you require.");
		return false;
	}
	else
		stringFilterSpecial(document.DataPage.servdesc);

}


