function EBI(sID) {
	if (document.getElementById(sID)) {
		return document.getElementById(sID);
	} else {
		return false;
	}
}
function updateTime(sFld) {
	if (EBI("hr") && EBI("min")) {
		if (EBI(sFld)) {
			EBI(sFld).value = EBI("hr").value + ":" + EBI("min").value;
		}
	}
}
function selectTime(sTime) {
	if (sTime!="") {
		tArray = sTime.split(":");
		if (EBI("hr") && EBI("min")) {
			EBI("hr").value = tArray[0];
			EBI("min").value = tArray[1];
		}
	}
}
// remove leading whitespace
String.prototype.lTrim = function () {
	return this.replace(/^\s*/, "");
}
// remove trailing whitespace
String.prototype.rTrim = function () {
	return this.replace(/\s*$/, "");
}
// remove leading and trailing whitespace
String.prototype.trim = function () {
	return this.rTrim().lTrim();
}
// removes unwanted characters from a string
String.prototype.clean = function() {
	strQuote = /'/g;
	strDQuote= /"/g;
	strLT=/</g;
	strGT=/>/g;
	myString = this.replace(strQuote, "`");			// Single Quote
	myString = myString.replace(strDQuote, "`");	// Double Quote
	myString = myString.replace(strLT, "[");		// lt HTML
	myString = myString.replace(strGT, "]");		// gt HTML
	myString = myString.trim();
	return myString;
}
function cleanThis(targ) {
	targ.value = targ.value.clean();
}
function rowOver(targ) {
	targ.style.backgroundColor = "#f5f5f5";
}
function rowOut(targ) {
	targ.style.backgroundColor = "";
}
function rowClick(fn,sts) {
	if (sts>0) {
		document.location = "FlightBooking.asp?fn=" + fn;
	} else {
		alert("Sorry! There are no more seats available on this flight.\nPlease choose another one...");
	}
}
