function checkForm() {
	if (document.mf.realname.value.length <1) { alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your name."); document.mf.realname.focus(); return false;
	} else {
	if (document.mf.realname.value.length<4) { alert("Name should be at least 4 characters.\n");document.mf.realname.focus(); return false; 
		}
	}
	if (document.mf.email.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your email address."); document.mf.email.focus(); return false; 
	}	
	else { 
		dmn = document.mf.email.value.substr(document.mf.email.value.indexOf("@")+1,document.mf.email.value.length);
		if((document.mf.email.value.indexOf("@")<1) ||(dmn.indexOf("@")>-1) || (dmn.indexOf(".")<1) || (dmn.indexOf(".")>dmn.length-2)) {
			alert("Please type a valid email address.\nEx : (email@domainname.com)."); document.mf.email.focus(); return false; 
		}
	}
	if (document.mf.comment.value.length <1) { alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your comment."); document.mf.comment.focus(); return false; }
	document.mf.submit();
}

function validate_form ( )
{
    if (document.booking_form.name.value == "") { 
    	alert("Sorry, but you haven\'t filled out fields required.\nPlease enter your name."); 
    	document.booking_form.name.focus(); 
    	return false;
	  }
	  
	  if (document.booking_form.email.value == "") { 
		  alert("Sorry, but you haven\'t filled out fields required.\nPlease enter your email address."); 
		  document.booking_form.email.focus(); 
		  return false; 
	  }	else { 
		  dmn = document.booking_form.email.value.substr(document.booking_form.email.value.indexOf("@")+1,document.booking_form.email.value.length);
		  if((document.booking_form.email.value.indexOf("@")<1) ||(dmn.indexOf("@")>-1) || (dmn.indexOf(".")<1) || (dmn.indexOf(".")>dmn.length-2)) {
			  alert("Please type a valid email address.\nEx : (email@domainname.com)."); 
			  document.booking_form.email.focus(); 
			  return false; 
		  }
	  }
	  
	  if (document.booking_form.telephone.value == "") { 
    	alert("Sorry, but you haven\'t filled out fields required.\nPlease enter your telephone number."); 
    	document.booking_form.telephone.focus(); 
    	return false;
	  }
	  
	  if (document.booking_form.nationality.value == "") { 
    	alert("Sorry, but you haven\'t filled out fields required.\nPlease enter your nationality."); 
    	document.booking_form.nationality.focus(); 
    	return false;
	  }
	  
	  if (document.booking_form.programme.value == "") { 
    	alert("Sorry, but you haven\'t filled out fields required.\nPlease enter your programme."); 
    	document.booking_form.programme.focus(); 
    	return false;
	  }
    
    if (document.booking_form.requirements.value == "") { 
    	alert("Sorry, but you haven\'t filled out fields required.\nPlease enter your requirements."); 
    	document.booking_form.requirements.focus(); 
    	return false;
	  }
	  
	  if (document.booking_form.flight.value == "") { 
    	alert("Sorry, but you haven\'t filled out fields required.\nPlease enter your flight number."); 
    	document.booking_form.flight.focus(); 
    	return false;
	  }
}

function MM_displayStatusMsg(msgStr) { //v1.0
  window.status=msgStr;
  document.MM_returnValue = true;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}