
function popup(x,h,w) {
	self.name="main";
	var popup_popup = window.open(x, "popup", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+h+",height="+w);
	popup_popup.focus();
}

function application(x,h,w) {
	self.name="main";
	var application_popup = window.open(x, "application", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+h+",height="+w);
	application_popup.focus();
}


function verifyPlanTrip() {
	var themessage = "Please note the following errors: ";

	if (document.form.Name.value=="") {themessage = themessage + "\n - field \"Name\" is required";}
	if (document.form.Email.value=="") {themessage = themessage + "\n - field \"Email\" is required";}
	if (document.form.Phone.value=="") {themessage = themessage + "\n - field \"Phone\" is required";}
	if (document.form.Street.value=="") {themessage = themessage + "\n - field \"Street\" is required";}
	if (document.form.City.value=="") {themessage = themessage + "\n - field \"City\" is required";}
	if (document.form.State.value=="") {themessage = themessage + "\n - field \"State\" is required";}
	if (document.form.Zip.value=="") {themessage = themessage + "\n - field \"Zip\" is required";}

	//alert if fields are empty and cancel form submit
	if (themessage == "Please note the following errors: ") {
		document.form.submit();
	} else {
		alert(themessage);
		return false;
	}
}

function hideshow(which,arrow){
	if (!document.getElementById)
	return
	if (which.style.display=="block") {
		which.style.display="none"
		arrow.src = "graphics/arrow_closed.gif"
	} else {
		which.style.display="block"
		arrow.src = "graphics/arrow_open.gif"
	}
}
