<!--
function Terms() {
	var iWidth = 1000;
	var iHeight = screen.height - 140;
	var iLeft = (screen.width  - iWidth) / 2 ;
	var iTop  = 0;
	var sOptions = "toolbar=1,status=1,resizable=1,scrollbars=1";
	sOptions += ",width=" + iWidth;
	sOptions += ",height=" + iHeight;
	sOptions += ",left=" + iLeft;
	sOptions += ",top=" + iTop;
	
	var filename = ('page.asp?name=terms_conditions');
	var newwin=window.open(filename, 'mincalwin', sOptions);
	
	if (newwin != null) {
		if (newwin.opener == null)
		newwin.opener = self;
	}
}


function Validate()
{
  	var frm = document.theForm;

	if (frm.airline_code.options(frm.airline_code.selectedIndex).value == "")
	{
	   frm.airline_code.focus();
	   alert("Airline must be selected.")
       return (false)		
	}

	if (frm.position.value == "")
	{
	   frm.position.focus();
	   alert("Position can't be blank.")
       return (false)		
	}

	if (frm.airline_employee_id.value == "")
	{
	   frm.airline_employee_id.focus();
	   alert("Airline ID can't be blank.")
       return (false)		
	}

	if (frm.title.options(frm.title.selectedIndex).value == "")
	{
	   frm.title.focus();
	   alert("Title must be selected.")
       return (false)		
	}

	if (frm.first_name.value == "")
	{
	   frm.first_name.focus();
	   alert("First name can't be blank.")
       return (false)		
	}

	if (frm.last_name.value == "")
	{
	   frm.last_name.focus();
	   alert("Last name can't be blank.")
       return (false)		
	}

	if (frm.tel_num.value == "")
	{
	   frm.tel_num.focus();
	   alert("Phone No. can't be blank.")
       return (false)		
	}

	if (frm.email.value == "")
	{
	   frm.email.focus();
	   alert("Email can't be blank.")
       return (false)
	} else if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(frm.email.value))) {
		alert("Invalid Email Address");
		frm.email.focus();
		return( false );
	}

	if (frm.email.value != "")
	{
		if (frm.email.value != frm.email2.value) {
		alert("Your email addresses do not match.  Please make sure you enter the correct email.");
		frm.email.focus();
		return( false );
		}
	}

	if (frm.address.value == "")
	{
	   frm.address.focus();
	   alert("Address can't be blank.")
       return (false)		
	}

	if (frm.city.value == "")
	{
	   frm.city.focus();
	   alert("City can't be blank.")
       return (false)		
	}

	if (frm.state.value == "")
	{
	   frm.state.focus();
	   alert("State/Province can't be blank.")
       return (false)		
	}

	if (frm.city.value == "")
	{
	   frm.city.focus();
	   alert("City can't be blank.")
       return (false)		
	}

	if (frm.zip.value == "")
	{
	   frm.zip.focus();
	   alert("Zip can't be blank.")
       return (false)		
	}

	if (frm.country_code.options(frm.country_code.selectedIndex).value == "")
	{
	   frm.country_code.focus();
	   alert("Country must be selected.")
       return (false)		
	}

	if (!frm.agree.checked)
	{
	   frm.agree.focus();
	   alert("You must agree to AOG terms.")
       return (false)		
	}

    return (true)
} 



var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isDyn = (isDOM || isIE4 || isNS4);

function getRef(id) {
 if (isDOM) return document.getElementById(id);
 if (isIE4) return document.all[id];
 if (isNS4) return document.layers[id];
}

function getSty(id) {
 return (isNS4 ? getRef(id) : getRef(id).style);
}

function setOtherAirline(airline_code) {
	if (airline_code == "XXX") {
		getSty('other_airline').visibility = 'visible';
	} else {
		getSty('other_airline').visibility = 'hidden';
		document.theForm.other_airline.value = '';
	}
}
//-->

