<!-- start hiding 
function holdgetSearchAsArray() {
   var minNav3 = (navigator.appName == "Netscape" && 
      parseInt(navigator.appVersion) >= 3)
   var minIE4 = (navigator.appName.indexOf("Microsoft") >= 0 && 
      parseInt(navigator.appVersion) >= 4)
   var minDOM = minNav3 || minIE4   // Baseline DOM required for this function
   var results = new Array()
   if (minDOM) {
      var input = unescape(location.search.substring(1))
	  if (input) { 
         var srchArray = input.split("&")
         var tempArray = new Array()
         for (i = 0; i < srchArray.length; i++) {
            tempArray = srchArray[i].split("=")
			results[tempArray[0]] = tempArray[1]
         }
      }
   }
   return results
}
function getSearchAsArray() {
   var searchQuery = new Array;
   var pair;
   var temp;
   var search = location.search;

   // replace all '+'s with ' 's because unescape() doesn't do it
   search = search.replace(/\+/g, ' ');
   
   // for each pair, separate, unescape and place into the associate array
   var split = 1;
   while (split > 0) {
      split = search.lastIndexOf('&');
      if (split == -1) split = 0;
      pair = search.substring(split + 1, search.length);
      // multiple select values should be placed in an array
      if (searchQuery[unescape(pair.substring(0, pair.indexOf('=')))] != null) {
         temp = searchQuery[unescape(pair.substring(0, pair.indexOf('=')))];
         searchQuery[unescape(pair.substring(0, pair.indexOf('=')))] = new Array(temp, unescape(pair.substring(pair.indexOf('=') + 1)));
      }
      
      // all other form elements have a one-to-one name and value relationship
      else searchQuery[unescape(pair.substring(0, pair.indexOf('=')))] = unescape(pair.substring(pair.indexOf('=') + 1));
      
      search = search.substring(0, split);
   }
   return searchQuery;
}

// Set delay to allow the applet ImageSlideShow.class to start, otherwise focus is lost
function setFocus(){
	window.setTimeout('placeFocus()',300);
}

function placeFocus() {
if (document.forms.length > 0) {
var field = document.forms[0];
for (i = 0; i < field.length; i++) {
if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
document.forms[0].elements[i].focus();
break;
         }
      }
   }
}

if( parseInt(navigator.appVersion)==4){
	if (navigator.appName == "Netscape") {
		document.write("<style type='text/javascript'>with(tags.BODY){marginTop='-20px'; marginLeft='-10px';}	</style>")
	}else{
		document.write("<style>	body { margin-top:0; margin-left:0;}</style>")
	}
}

// Start of checkForm functions
var aryRequired = new Array();    
var intArrayCount = 0;        
function defineRequired(strElementName, strDisplayMessage, blnIsEmail, blnIsArrivalDate, blnIsDepartureDate, blnIsTotalParty){
        var objRequired = new Object();
        objRequired.ElementName = strElementName;
		objRequired.DisplayMessage = strDisplayMessage;
		objRequired.IsEmail = blnIsEmail;
		objRequired.IsArrivalDate = blnIsArrivalDate;
		objRequired.IsDepartureDate = blnIsDepartureDate;
		objRequired.IsTotalParty = blnIsTotalParty;
		aryRequired[intArrayCount] = objRequired;
		intArrayCount++;    
}        
 // Change these to the inputs you want required 
//defineRequired("checks","The Check Box is required field. Please fill it in.");    
//defineRequired("blob","The Text Area is required field. Please fill it in.");
//defineRequired("selectBox","The Select Box is required field. Please fill it in."); 
defineRequired("email","Please enter an email address.", true); 
defineRequired("realname","Please enter your name.");       
//defineRequired("ArrivalDate","Please enter your estimated Arrival Date (mm/dd/yyyy).",false,true);    
//defineRequired("DepartureDate","Please enter your estimated Departure Date (mm/dd/yyyy).",false,false,true);     
//defineRequired("TotalParty","Invalid Number, Please enter a number.", false,false,false, true);    

//defineRequired("radioBox","The Radio Button is required field. Please fill it in.");    

function checkForm(objForm){ 
	for (var i = 0; i < aryRequired.length; i++) {     
		var blnFail = true;
		var noMsg = true;         
		var objElement = eval("objForm." + aryRequired[i].ElementName); 

		if (objElement.length && !objElement.type && document.images) {              //looping through element array              
			for (var x = 0; x < objElement.length; x++) {        
				if (objElement[x].checked && objElement[x].value != ""){
					blnFail = false;
				} 
			}             
		}             
		else { 
			if (objElement.value != "") {
				if (aryRequired[i].IsEmail) {
		    		if (emailCheck(objElement.value)){
					 	objElement.style.background = "white";
						blnFail = false;
						noMsg = true;
					}
					else{
						noMsg = false
					}
				}               
				else if (aryRequired[i].IsArrivalDate){
 					if (isDate(objElement.value)){
						objElement.style.background = "white";
						blnFail = false;
						noMsg = true;
					}
					else{
						noMsg = false
					}
				}
				else if (aryRequired[i].IsDepartureDate){
 					if (isDate(objElement.value)){
						objElement.style.background = "white";
						blnFail = false;
						noMsg = true;
					}
					else{alert("Line 109");
						noMsg = false
					}
				}
				else if (aryRequired[i].IsTotalParty) {
 					if (!isNaN(objElement.value)){
						objElement.style.background = "white";
						blnFail = false;
					} 
 				}
				else{
					noMsg = false
					blnFail = false;                          
				}
 			}
			
 		}  

 		if (blnFail) {
   			if (noMsg){

				alert(aryRequired[i].DisplayMessage);  
			}            
   			if (objElement.length && !objElement.type){
				objElement[0].focus()              
		   	}
			else{
				
				objElement.style.background = "yellow";

				objElement.focus();              
	  			return false;            
		   	}           
		}
		else{
			objElement.style.background = "white";
		}
   	}        // all elements passed, submit form        
    
 if(confirm("Have you checked over the form? \n\nCancel if you need to edit the form before sending")){
	return true;
 }
 else{
 	placeFocus()
 	return false;
 }    
}
//****************************** end of checkForm functions


// start of tabOnEnter functions

function tabOnEnter (field, evt) {
// this function is disabled
	var keyCode = document.layers ? evt.which : document.all ? 
	evt.keyCode : evt.keyCode;
	if (keyCode == 13) return true;
	if (keyCode != 9 && keyCode != 0 ) return true;
	if (keyCode == 0){
		 field.style.background = "white";
	 	 return true;
	}
	if(keyCode == 0 && field.value == "" && field.style.background == "yellow" ){
	   
	}
	/*else if(keyCode == 0  && field.style.background != "yellow" && field.value == "") {
	 	return true;
	}*/
	else if(keyCode == 0 && field.style.background == "yellow" && field.value != ""){
		field.style.background = "white";
		//var doIt = CheckIt(field);
	 	//return doIt;
		return true;
	}
	else if(keyCode == 0 && field.value != ""){
		field.style.background = "white";
		//var doIt = CheckIt(field);
	 	//return doIt;
		return true;
	}
	
}

function CheckIt(theField){
if (theField.name=="email"){
		if(theField.value==""){
		      alert("Please enter an email address.");
			  theField.focus();
			  theField.style.background = "yellow";
			  theField.select
		      return (false);
		}
		else{
			 if(emailCheck(theField.value)==false)			 {
	  			theField.style.background = "yellow";
	  			theField.focus();
	     			return (false);
			}
			else{
				theField.style.background = "white";
			}
		}
	}
	
	if (theField.name=="realname"){
	    if (theField.value==""){
	      alert("Please enter your name.");
		  theField.focus();
		  theField.style.background = "yellow";
	      return (false);
	    }
		else{
		  theField.style.background = "white";
		}
	}
	
	if (theField.name=="ArrivalDate"){
		if (theField.value == ""){
		   alert("Please enter your estimated Arrival Date (mm/dd/yy).");
		theField.style.background = "yellow";
		 	theField.focus();
		   return (false);
		 }
		 else{
		   var dt=document.CheckAll.ArrivalDate
		if(isDate(dt.value)==false){
		  theField.style.background = "yellow";
		  theField.focus();
		     return (false);
		}
		theField.style.background = "white";
		 }
	}
	
	if (theField.name=="DepartureDate"){
		 if (theField.value == "")
		 {
		   	alert("Please enter your estimated Departure Date (mm/dd/yy).");
			theField.style.background = "yellow";
		 	theField.focus();
		   return (false);
		 }
		 else{
		   var dt=document.CheckAll.DepartureDate
		if(isDate(dt.value)==false){
		  theField.style.background = "yellow";
		  theField.focus();
		     return (false);
		}
		theField.style.background = "white";
		 }
	}
	if (theField.name=="TotalParty"){
		 if (isNaN(theField.value) || theField.value==""){
		   	alert("Please the total number in your party.");
			theField.style.background = "yellow";
		   	theField.focus();
			theField.select();
		   	return (false);
		 }
		 else{
		   theField.style.background = "white";
		 }
	}

	if(theField.name =="CheckAll"){
		return true
	}
	else{								
		if(getNextElement(theField).name != "Send"){
			getNextElement(theField).focus();
		    //getNextElement(theField).select();
		    return false; 
		}
		else{
			checkForm(this.form)
		}
	}	
}

function getNextElement(field) {
  var fieldFound = false;
  var form = field.form;
  for (var e = 0; e < form.elements.length; e++) {
    if (fieldFound && form.elements[e].type != 'hidden')
      break;
    if (field == form.elements[e])
      fieldFound = true;
  }
  return form.elements[e % form.elements.length];
}
//********************* end of tabOnEnter functions

// start of address check function
function emailCheck (emailStr) {
var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" + specialChars + "\]"
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom=validChars + '+'
var word="(" + atom + "|" + quotedUser + ")"
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
  	alert("Email address seems incorrect (check @ and .'s)")
	return false
}
var user=matchArray[1]
var domain=matchArray[2]
if (user.match(userPat)==null) {
    alert("The email username doesn't seem to be valid.")
    return false
}
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
	  for (var i=1;i<=4;i++) {
	    if (IPArray[i]>255) {
	        alert("The Email Destination IP address is invalid!")
		return false
	    }
    }
    return true
}
var domainArray=domain.match(domainPat)
if (domainArray==null) {
	alert("The Email domain name doesn't seem to be valid.")
    return false
}
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 ||
	domArr[domArr.length-1].length>4) {
   alert("The Email address must end in a four-letter domain, or two letter country.")
   return false
}

if (len<2) {
   var errStr="This Email address is missing a hostname!"
   alert(errStr)
   return false
}

return true;
}
//*******************end of address check functions


// start of date check functions
/*
 * DHTML date validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */
// Declaring valid date character, minimum year and maximum year
<!--
var dtCh= "/";
var minYear=04;
var maxYear=06;

function isInteger(s){
	var i;
    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function daysInFebruary (year){
	// February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.
    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
function DaysArray(n) {
	for (var i = 1; i <= n; i++) {
		this[i] = 31
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
		if (i==2) {this[i] = 29}
   } 
   return this
}

function isDate(dtStr){
	var daysInMonth = DaysArray(12)
	var pos1=dtStr.indexOf(dtCh)
	var pos2=dtStr.indexOf(dtCh,pos1+1)
	var strMonth=dtStr.substring(0,pos1)
	var strDay=dtStr.substring(pos1+1,pos2)
	var strYear=dtStr.substring(pos2+1)
	strYr=strYear
	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
	}
	month=parseInt(strMonth)
	day=parseInt(strDay)
	year=parseInt(strYr)
	if (pos1==-1 || pos2==-1){
		alert("The date format should be : mm/dd/yy")
		return false
	}
	if (strMonth.length<1 || month<1 || month>12){
		alert("Please enter a valid month")
		return false
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
		alert("Please enter a valid day")
		return false
	}
	if (strYear.length != 2 || year==0 || year<minYear || year>maxYear){
		alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
		return false
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
		alert("Please enter a valid date")
		return false
	}
return true
}

//********************end of check date functions

// end hiding -->