function checkValue() {
    oElements = document.forms[0];
    num_of_days = 0;
    for(i=0;i<12;i++) {
        currElement = oElements[i];
        temp_num = currElement.options[currElement.selectedIndex].value;
        num_of_days += temp_num;
    }
    //alert(num_of_days);
    if(num_of_days<=1) {
        alert("Please have at least 1 day trip");
        return false;
        exit;
    }
    return true;
}

function validateForm() {
        var docForm = document.forms[0];
        if(docForm.sender_name.value == "") {
                alert("You have to fill in your name!");
                docForm.sender_name.focus();
                return false;
        }
        if(docForm.sender_email.value == "") {
                alert("You have to fill in your email address!");
                docForm.sender_email.focus();
                return false;
        }
        txtMsg = docForm.sender_message.value;
        if(txtMsg.length == 0) {
                alert("Please fill in the message");
                docForm.sender_message.focus();
                return false;
        }

        return (validateEmail(docForm.sender_email));

}

function validateEmail(mailField)
{
   var sEmail= new Object;
   sEmail= mailField.value;
   if (sEmail=="") {
      alert("You have not entered an email address. \n Please enter it now.") 
      mailField.focus(); 
      mailField.select();
      return false;
   }
   if (sEmail.length > 0)
   {
      // Return false if e-mail field does not contain a '@' and '.' 
      var atPos = sEmail.indexOf('@', 0);
      if ( (atPos == -1) || (sEmail.indexOf('@',atPos+1) > 0) || (sEmail.indexOf ('.',0) == -1) ||
           (sEmail.indexOf('@.',0) > 0) || (sEmail.indexOf('.@', 0) > 0) ||
           (sEmail.indexOf('.',0) == sEmail.length-1) )
      {
         alert("You have entered an invalid email address. \n Please enter a correct email address now.")
         mailField.focus(); 
         mailField.select();
         return false;
      }
   }
   return true;
}

//-->

