// VALIDATE THE FORM

var colorMenuOver = '#F4F3EE'
var colorMenuOut = '#D2E6F5'
var InputFormTextBoxHighight = "#FEFFC7";
var InputFormTextBoxInitialState = "#FFFFFF";
var InputFormTextBoxDisabledState = "#CCCCCC"

function ValidateForm() {
    document.myForm.custname.style.backgroundColor = InputFormTextBoxInitialState
    document.myForm.address.style.backgroundColor = InputFormTextBoxInitialState
    document.myForm.city.style.backgroundColor = InputFormTextBoxInitialState
	document.myForm.state.style.backgroundColor = InputFormTextBoxInitialState
	document.myForm.zipcode.style.backgroundColor = InputFormTextBoxInitialState
	document.myForm.phone.style.backgroundColor = InputFormTextBoxInitialState	
	document.myForm.email.style.backgroundColor = InputFormTextBoxInitialState

	document.myForm.EventType.style.backgroundColor = InputFormTextBoxInitialState
	document.myForm.EventLocation.style.backgroundColor = InputFormTextBoxInitialState


// VALIDATE Customer Name
  if (isWhitespace(document.myForm.custname.value)==true) {
    alert("Contact Name can not be blank.  Please enter your name.")
    document.myForm.custname.style.backgroundColor = InputFormTextBoxHighight
    document.myForm.custname.focus()
    return false
  }
  
// VALIDATE Address
  if (isWhitespace(document.myForm.address.value)==true) {
    alert("Address can not be blank.  Please enter your address information.")
    document.myForm.address.style.backgroundColor = InputFormTextBoxHighight
    document.myForm.address.focus()
    return false
  }

// VALIDATE City
  if (isWhitespace(document.myForm.city.value)==true) {
    alert("City can not be blank.  Please enter your city.")
    document.myForm.city.style.backgroundColor = InputFormTextBoxHighight
    document.myForm.city.focus()
    return false
  }

// VALIDATE State
  if (isWhitespace(document.myForm.state.value)==true) {
    alert("State can not be blank.  Please enter your state.")
    document.myForm.state.style.backgroundColor = InputFormTextBoxHighight
    document.myForm.state.focus()
    return false
  }

// VALIDATE Zip Code
  if (isWhitespace(document.myForm.zipcode.value)==true) {
    alert("Zip Code can not be blank.  Please enter your zip code.")
    document.myForm.zipcode.style.backgroundColor = InputFormTextBoxHighight
    document.myForm.zipcode.focus()
    return false
  }
	
// VALIDATE Phone
  if (isWhitespace(document.myForm.phone.value)==true) {
    alert("Phone Number can not be blank.  Please enter your phone number.")
    document.myForm.phone.style.backgroundColor = InputFormTextBoxHighight
    document.myForm.phone.focus()
    return false
  }
  
// VALIDATE EMAIL
  if (isEmail(document.myForm.email.value)==false) {
    document.myForm.email.style.backgroundColor = InputFormTextBoxHighight
    alert("Email Address is invalid.  Please enter a valid Email Address.")
    document.myForm.email.focus()
    return false
  }



// VALIDATE Event type
  if (isWhitespace(document.myForm.EventType.value)==true) {
    alert("Event Type can not be blank.  What type of Event are you hosting?  Birthday, School Dance, Wedding, etc")
    document.myForm.EventType.style.backgroundColor = InputFormTextBoxHighight
    document.myForm.EventType.focus()
    return false
  }
  
  
  // VALIDATE Event Location
  if (isWhitespace(document.myForm.EventLocation.value)==true) {
    alert("Event Location can not be blank.  Please enter where you will hsot the event.")
    document.myForm.EventLocation.style.backgroundColor = InputFormTextBoxHighight
    document.myForm.EventLocation.focus()
    return false
  }

}

function ClearTextBox () {
	
	if (document.myForm.EventMusic.value == "Describe the type of music you want to hear") {
		document.myForm.EventMusic.value = ""	
	}
}
