var gbIsIE;
var gDoc;
var gFrm;

function body_onLoad()
{		
	if (document.all != null)
	{
		gbIsIE = true;
		gDoc = document.all;
	}
	else
	{
		gbIsIE = false;
		gDoc = document;
	}
	if (gDoc.frmFormEmail != null)
		gFrm = gDoc.frmFormEmail;
}
function btnSubmitSO_onClick(pintForm)
{	

	if (document["form" + pintForm].hidNoPax.value == "0")
	{
		alert("Please select number of passengers.");
		document["form" + pintForm].hidNoPax.focus();
		return (false);
	}		
			
	return true;
}
		
function verify(x){
 if (x.hidRoute1.value == ""){
 		alert("Please select an Outward route.");
 		document.frmform.hidRoute1.focus ()
 		return false;
 }
 if (x.hidRoute2.value == "select"){
 		alert("Please select a return route or click the single trip box.");
 		document.frmform.hidRoute2.focus ()
 		return false;
 }

 if (x.hidNoPax.value == ""){
  	alert("Please select the number of passengers");
  	document.frmform.hidNoPax.focus ()
  	return false;
 }
	return true;
}

function make_return(x){
	arr = x.hidRoute1.value.split(" - ");
	x.hidRoute2.value = arr[1]+" - "+arr[0];
}
function delRoute(id){
	id.selectedIndex = 0;
	return;
} 
function oneway_onchange()
{
	if(!document.frmform.oneway.checked)
	{
		document.frmform.hidRoute2.value="select";
	}
	else //oneway wird aktiviert - Rückfahrtroute wird dekativiert, Datum wird gespeichert dann aus Textfeld gelöscht
	{
		document.frmform.hidRoute2.value="";
	}
}
