// skitown_main.js
function clearText(thefield) {
	if (thefield.defaultValue == thefield.value)
		thefield.value = "";
}

//airform search banner
	//manage other input field activated from dropdown
	function checkOther(val){//currently checking the title of the option boxes
		if(val){
			if(val == "Other"){
				document.getElementById('st_To_Other').style.display='';
			}else if(val.indexOf('Packages')>=0){
				document.getElementById('st_Type').value=4;
			}else{
				document.getElementById('st_To_Other').style.display='none';
			}
		}
	}
	//validates date format.
	function checkDate(sDate) {
		 var re = /^\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}$/
			if	(sDate.value.match(re) || !sDate.value.length) {
				return true;
		 }
		 else {
				alert('ERROR!\n\rPlease check your date format (mm/dd/yy or mm-dd-yy)');
				sDate.focus();
				sDate.select();
				return false;
		 }
	}

