/*******************************************************************************
 * SCHEDULE FORM SOLUTION
 * http://www.edsheatingandcooling.com/schedule.php
 * http://www.edsheatingandcooling.com/schedule/
 *
 * Copyright 2007 Tim Summers All Rights Reserved.
 *
 * Tim Summers hereby grants Eds Heating and Cooling a perpetual non-exclusive
 * license to install, use and modify the following code on their company
 * website. Intellectual property rights regarding this code shall at all times
 * remain the property of Tim Summers and the Licensee shall have no right,
 * title, or interest therein.  Resale of this code is expressly prohibited.
 ******************************************************************************/
<!-- CALENDAR POP-UP
function poppie(mypage, myname, w, h, scroll) {
   var winl = (screen.width - w) / 5;
   var wint = (screen.height - h) / 5;
   winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
   win = window.open(mypage, myname, winprops)
   if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//-->

<!-- FORM VALIDATION
function Schedule_Form_Validator(theForm) {

  if ((theForm.radio_button1[0].checked == false) && (theForm.radio_button1[1].checked == false)) {
    alert ( "Please specify the type of service you require." );
	theForm.radio_button1[0].focus();
    return (false);
    }

  if (theForm.date1.value.length < 8) {
    alert("Please enter at least one preferred date for your appointment preference.  Ex. mm/dd/yyyy");
    theForm.date1.focus();
    return (false);
  }

  if (theForm.date1.value.length > 10) {
    alert("Please enter at least one preferred date for your appointment preference.  Ex. mm/dd/yyyy");
    theForm.date1.focus();
    return (false);
  }
  
  if (theForm.date1.value == "") {
    alert("Please enter at least one preferred date for your appointment preference.  Ex. mm/dd/yyyy");
    theForm.date1.focus();
    return (false);
  }
 
  if (theForm.time1.value.length < 1) {
    alert("Please enter at least one preferred date and time for your appointment preference.");
    theForm.time1.focus();
    return (false);
  }
  
  if (theForm.time1.value == "") {
    alert("Please enter at least one preferred date and time for your appointment preference.");
    theForm.time1.focus();
    return (false);
  }

  if (theForm.customer_name.value == "") {
    alert("Please enter your Name before submitting this form.");
    theForm.customer_name.focus();
    return (false);
  }
  
  if (theForm.customer_name.value.length < 1) {
    alert("Please enter at least 1 characters in the Name field.");
    theForm.customer_name.focus();
    return (false);
  }

  if (theForm.street_address.value == "") {
    alert("Please enter your Street Address before submitting this form.");
    theForm.street_address.focus();
    return (false);
  }

  if (theForm.street_address.value.length < 1) {
    alert("Please enter at least 1 characters in the Street Address field.");
    theForm.street_address.focus();
    return (false);
  }
  
  if (theForm.city.value == "") {
    alert("Please enter your City before submitting this form.");
    theForm.city.focus();
    return (false);
  }

  if (theForm.city.value.length < 1) {
    alert("Please enter at least 1 characters in the City field.");
    theForm.city.focus();
    return (false);
  }
  
  if (theForm.state.value == "") {
    alert("Please enter your State before submitting this form.");
    theForm.state.focus();
    return (false);
  }

  if (theForm.state.value.length < 1) {
    alert("Please enter at least 1 characters in the State field.");
    theForm.state.focus();
    return (false);
  }
  
  if (theForm.zip_code.value == "") {
    alert("Please enter your Zip Code before submitting this form.");
    theForm.zip_code.focus();
    return (false);
  }

  if (theForm.zip_code.value.length < 1) {
    alert("Please enter at least 1 characters in the Zip Code field.");
    theForm.zip_code.focus();
    return (false);
  }

  if (theForm.home_phone.value == "") {
    alert("Please enter your Home Phone before submitting this form.");
    theForm.home_phone.focus();
    return (false);
  }

  if (theForm.home_phone.value.length < 7) {
    alert("Please enter at least 7 characters in the Home Phone field.");
    theForm.home_phone.focus();
    return (false);
  }

  if (theForm.home_phone.value.length > 14) {
    alert("Please enter no more than 14 characters in the Home Phone field.");
    theForm.home_phone.focus();
    return (false);
  }

  if (theForm.from.value.length < 1) {
    alert("Please enter your e-mail address.");
    theForm.from.focus();
    return (false);
  }
  
  if (theForm.from.value == "") {
    alert("Please enter your e-mail address.");
    theForm.from.focus();
    return (false);
  }
 
  return (true);
}
//-->