function checkName (strng) {
var error="";
if (strng == "") {
   error = "Please enter a contact name\n";
	}
    return error;    
}

function checkEmail (strng) {
var error="";
if (strng == "") {
   error = "Please enter a valid e-mail address\n";
	}
    return error;    
}

// phone number - strip out delimiters and check for 10 digits

function checkPhone (strng) {
var stripped = strng.replace(/[\(\)\.\-\ ]/g, ''); //strip out acceptable non-numeric characters
    if (isNaN(parseInt(stripped))) {
       error = "The phone number contains illegal characters\n";
    }
var error = "";
if (strng == "") {
   error = "Please enter a contact phone number\n";
}

return error;
}

function checkPassengers(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please enter the number of passengers\n"
  }
return error;	  
}


// non-empty textbox

function checkFrom(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please enter where you will be travelling from\n"
  }
return error;	  
}

// non-empty textbox

function checkTo(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please enter where you will be travelling to\n"
  }
return error;	  
}

// exactly one radio button is chosen

function checkRadio(checkvalue) {
var error = "";
   if (!(checkvalue)) {
       error = "Please check a radio button.\n";
    }
return error;
}

// valid selector from dropdown list

function checkDropDate(choice) {
var error = "";
    if (choice == 0) {
    error = "Please select the date of travel\n";
    }    
return error;
}

function checkDropMonth(choice) {
var error = "";
    if (choice == 0) {
    error = "Please select the month of travel\n";
    }    
return error;
}

function checkTime(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please enter the departure time\n"
  }
return error;	  
}

function checkRetTime(strng) {
var error = "";
  if (strng.length == 0) {
     error = "Please enter the return time\n"
  }
return error;	  
}