<!--
function VF_DataEntry(){ //v2.5.1
<!--start_of_saved_settings-->
<!--type,radio-g,name,AppType,isChecked,errMsg,Field&space;&sright;Application&space;Type&sright;&space;is&space;required-->
<!--type,text,name,Passengers,required,true,inRange,1,99,errMsg,Field&space;&sright;&hash;&space;of&space;Passengers&sright;&space;is&space;required-->
<!--type,select,name,DepartureCountry,isDefault,errMsg,Field&space;&sright;Departure&space;Country&sright;&space;is&space;required-->
<!--type,text,name,DepartureCity,required,true,errMsg,Field&space;&sright;Departure&space;City&sright;&space;is&space;required-->
<!--type,text,name,ReturnDate,required,true,isDate,M/D/YYYY,errMsg,Field&space;&sright;Return&space;Date&sright;&space;is&space;required&space;in&space;the&space;format&space;M&fslash;D&fslash;YYYY-->
<!--type,select,name,DestinationCountry,isDefault,errMsg,Field&space;&sright;Destination&space;Country&sright;&space;is&space;required-->
<!--type,text,name,DestinationCity,required,true,errMsg,Field&space;&sright;Destination&space;City&sright;&space;is&space;required-->
<!--type,text,name,DepartureDate,required,true,isDate,M/D/YYYY,errMsg,Field&space;&sright;Departure&space;Date&sright;&space;is&space;required&space;in&space;the&space;format&space;M&fslash;D&fslash;YYYY-->
<!--type,text,name,Email,required,true,isEmail,errMsg,Field&space;&sright;Email&space;Address&sright;&space;must&space;contain&space;a&space;valid&space;email&space;address-->
<!--type,text,name,LastName,required,true,errMsg,Field&space;&sright;Last&space;Name&sright;&space;is&space;required-->
<!--type,text,name,FirstName,required,true,errMsg,Field&space;&sright;First&space;Name&sright;&space;is&space;required-->
<!--end_of_saved_settings-->
	var theForm = document.forms['DataEntry'];
	var emailRE = /(@\w[-._\w]*\w\.\w{2,4})$/;
	var dte_ReturnDateRE = /^(0[1-9]|1[012]|[1-9])\/(0[1-9]|[12][0-9]|3[01]|[1-9])\/(19|20)\d\d$/;
	var dte_DepartureDateRE = /^(0[1-9]|1[012]|[1-9])\/(0[1-9]|[12][0-9]|3[01]|[1-9])\/(19|20)\d\d$/;
	var rFlg_AppType = false;
	var sFlg_DepartureCountry = false;
	var sFlg_DestinationCountry = false;
	var errMsg = "";
	var setfocus = "";

	for(var r12=0;r12<theForm['AppType'].length;r12++){if(theForm['AppType'][r12].checked)rFlg_AppType=true;}
	for(var s10=0;s10<theForm['DepartureCountry'].length;s10++){if(theForm['DepartureCountry'].options[s10].selected){if(theForm['DepartureCountry'].options[s10].text==theForm['DepartureCountry'].options[0].text)sFlg_DepartureCountry=true;}}
	for(var s6=0;s6<theForm['DestinationCountry'].length;s6++){if(theForm['DestinationCountry'].options[s6].selected){if(theForm['DestinationCountry'].options[s6].text==theForm['DestinationCountry'].options[0].text)sFlg_DestinationCountry=true;}}

	if (!rFlg_AppType){
		errMsg = "Field \'Application Type\' is required";
		setfocus = "['AppType'][0]";
	}
	if (isNaN(theForm['Passengers'].value) || theForm['Passengers'].value == "" || (theForm['Passengers'].value.indexOf(".") != -1) || (parseInt(theForm['Passengers'].value) < 1 || parseInt(theForm['Passengers'].value) > 99)){
		errMsg = "Field \'# of Passengers\' is required";
		setfocus = "['Passengers']";
	}
	if (sFlg_DepartureCountry){
		errMsg = "Field \'Departure Country\' is required";
		setfocus = "['DepartureCountry']";
	}
	if (theForm['DepartureCity'].value == ""){
		errMsg = "Field \'Departure City\' is required";
		setfocus = "['DepartureCity']";
	}
	if (!dte_ReturnDateRE.test(theForm['ReturnDate'].value)){
		errMsg = "Field \'Return Date\' is required in the format M\/D\/YYYY";
		setfocus = "['ReturnDate']";
	}
	if (sFlg_DestinationCountry){
		errMsg = "Field \'Destination Country\' is required";
		setfocus = "['DestinationCountry']";
	}
	if (theForm['DestinationCity'].value == ""){
		errMsg = "Field \'Destination City\' is required";
		setfocus = "['DestinationCity']";
	}
	if (!dte_DepartureDateRE.test(theForm['DepartureDate'].value)){
		errMsg = "Field \'Departure Date\' is required in the format M\/D\/YYYY";
		setfocus = "['DepartureDate']";
	}

	if (!emailRE.test(theForm['Email'].value)){
		errMsg = "Field \'Email Address\' must contain a valid email address";
		setfocus = "['Email']";
	}
	if (theForm['LastName'].value == ""){
		errMsg = "Field \'Last Name\' is required";
		setfocus = "['LastName']";
	}
	if (theForm['FirstName'].value == ""){
		errMsg = "Field \'First Name\' is required";
		setfocus = "['FirstName']";
	}
	if (errMsg != ""){
		alert(errMsg);
		eval("theForm" + setfocus + ".focus()");
	}
	else theForm.submit();
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function calpopup(lnk) { 
window.open(lnk, "calendar","height=200,width=200,scrollbars=no,left=250,top=150") 
}
//-->