
function toggle(myString){
	for(i=0;i<helpArray.length;i++){
		if(helpArray[i]==myString){
			showIt(helpArray[i]);
			}else{
			hideIt(helpArray[i]);
		}
	}
}


var dimitri;
var dups;
var agios;

function isEmail(string) {

   if (!string) return false;
   var iChars = "*|,\"<:>[]{}`\';()&$#%";

   for (var i = 0; i < string.length; i++) {
      if (iChars.indexOf(string.charAt(i)) != -1)
         return false;
   }
   return true;
}          

function isProper(string) {

   if (!string) return false;
   var iChars = "*|,\"<:>[]{}`\';()@&$#%";

   for (var i = 0; i < string.length; i++) {
      if (iChars.indexOf(string.charAt(i)) != -1)
         return false;
   }
   return true;
}                      
function isReady(resform) {
    if (isEmail(resform.Email.value) == false) {
        alert("Please enter a valid email address.");
        resform.Email.focus();
        return false;
    }
    if (isProper(resform.Firstname.value) == false) {
        alert("Please enter a valid firstname.");
        resform.Firstname.focus();
        return false;
    }
    if (isProper(resform.Lastname.value) == false) {
        alert("Please enter a valid lastname.");
        resform.Lastname.focus();
        return false;
    }
	
	
	if (dups==true) {
	document.resform.action="/hotels/sendreservationGlb.asp";}
	else if (dimitri==true) {
	document.resform.action="/hotels/sendreservationVD.asp";}
	else if (agios==true) {
	document.resform.action="/hotels/sendreservation2.asp";}
	else 
	document.resform.action="/hotels/sendreservation2.asp";
	return true;
	
	
}

