  function menu_jump(path) {
    window.location.href = path.options[path.selectedIndex].value;
  }


function SymError()
{
  return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
  return (new Object());
}

window.open = SymWinOpen;


	var pel = null;
	var pbg = null;
	var mthset = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ];

	// Writes a line to the end of a debug console window it.
	// if the window isn't open then open it
    var dbgnbr = 0;

	function dbg(msg)
	{
		if (window.logger == null)
		{
			log = window.open("#", "DbgLog", "width=290 height=250 scrollbars resizable", false);
			window.logger = log;
		}
		try
		{
			++dbgnbr;
			doc = window.logger.document;
			line = doc.createTextNode("" + dbgnbr + ": " + msg);
			doc.body.appendChild(line);
			doc.body.appendChild(doc.createElement("BR"));
			window.logger.scroll(0, 9999999);
		}
		catch (e)
		{
			// swallow the error that happens the first time
		}
	}
	// 

	// datetime parsing and formatting routimes. modify them if you wish other datetime format
	function str2dt (strin) 
	{
		var dts;

		try
		{
			dts = strin;
			dts = dts.replace(" ", "");
			dts = dts.replace("\t", "");
			var s1 = dts.indexOf("/");
			var s2 = dts.indexOf("/", s1 + 1);

			var mo = Number(dts.slice(0, s1)) - 1;
			var dy = Number(dts.slice(s1 + 1, s2));
			var yr = Number(dts.substring(s2 + 1));

			return (new Date (yr, mo, dy));
		}
		catch (e)
		{
			return (new Date ());
			return alert("Invalid Date: "+ strin + " - Should be in MM/DD/YYYY form");
		}
	}

	function dt2str (dtin) 
	{
		return (new String ("" + (dtin.getMonth()+1) + "/" + dtin.getDate() + "/" + dtin.getFullYear()));
	}


	function elx(el)
	{
		var x = el.offsetLeft;

		while (el.offsetParent != null)
		{
			el = el.offsetParent;
			x += el.offsetLeft;
		}
		return x;
	}

	function ely(el)
	{
		var y = el.offsetTop;

		while (el.offsetParent != null)
		{
			el = el.offsetParent;
			y += el.offsetTop;
		}
		return y;
	}


	function pickDate(calMode, xp, yp, dfld, rfld)
	{
		top.calShell = caltbl;
		top.depFld = dfld;
		top.retFld = rfld;
		caltbl.style.zIndex = 10000;
		caltbl.style.left = xp;
		caltbl.style.top = yp;
		caltbl.style.visibility = 'visible';

		if (calMode == "D")
			calName = "Depart&nbsp;On";
		else
			calName = "Return&nbsp;On";

		var calurl = "pickdate.html?m=" + calMode + "&t=" + calName + "&d=" + dfld.value + "&r=" + rfld.value;
		calframe.document.location.replace(calurl);
		top.box = calbox;
	}

	function showCal(mode)
	{
		var xp = 350;
		var yp = 350;

		try 
		{
			el = window.event.srcElement;
			xp = elx(el);
			yp = ely(el) + el.offsetHeight;
		}
		catch (e)
		{
			alert("netscape???");
		}
		pickDate(mode, xp, yp, document.RequestAirForm.depDate, document.RequestAirForm.retDate);
	}


	function monthStr(dt)
	{
		return mthset[dt.getMonth()]; 
	}

	function setDepMD()
	{
		try
		{
			var dep = new Date(document.RequestAirForm.depDate.value);
			document.RequestAirForm.depMonth.value = monthStr(dep).toUpperCase();
			document.RequestAirForm.depDay.value = dep.getDate();		
		}
		catch (e)
		{
		}
	}

	function setRetMD()
	{
		try
		{
			var ret = new Date(document.RequestAirForm.retDate.value);
			document.RequestAirForm.retMonth.value = monthStr(ret).toUpperCase();
			document.RequestAirForm.retDay.value = ret.getDate();
		}
		catch (e)
		{
		}
	}




function openVTDest(url, destCity, errorUrl, language){


var nonFlex = true;var nonFlexDisabled = false;var semiFlex = true;var semiFlexDisabled = false;var flex = true;var flexDisabled = false;var lightweight = false;var lightweightDisabled = true;

        
        var dt = new Date();
        var x = dt.getTime();
        var openUrl;
        var searchType;
        var openPopupWindow = true;
        var agencyDefinedUrl = window.location.protocol + "//" + window.location.host + errorUrl.replace(/&amp;/gi,"&")+"&timestamp="+x;
        var vtoUrl = url+"?destCity="+escape(destCity)+"&url="+ window.location.protocol + "//" + window.location.host + errorUrl.replace(/&/gi,"%26") + "&lang="+language;
        
        for(var i = 0; i < document.RequestAirForm.actionType.length; i++)
        {
                if(document.RequestAirForm.actionType[i].checked)
                {
                        searchType = document.RequestAirForm.actionType[i].value;
                }
        }
        
        if(searchType == "nonFlex")
        {
                if(nonFlex)
                        openUrl = agencyDefinedUrl ;
                else if(nonFlexDisabled)
                        openPopupWindow = false;
                else
                        openUrl = vtoUrl ;
        }
        else if(searchType == "semiFlex")
        {
                if(semiFlex)
                        openUrl = agencyDefinedUrl ;
                else if(semiFlexDisabled)
                        openPopupWindow = false;
                else
                        openUrl = vtoUrl ;
        }
        else if(searchType == "flex")
        {
                if(flex)
                        openUrl = agencyDefinedUrl ;
                else if(flexDisabled)
                        openPopupWindow = false;
                else
                        openUrl = vtoUrl ;
        }
        else if(searchType == "flexSimple")
        {
                if(flex)
                        openUrl = agencyDefinedUrl ;
                else if(flexDisabled)
                        openPopupWindow = false;
                else
                        openUrl = vtoUrl ;
        }
        else if(searchType == "lightweight")
        {
                if(lightweight)
                        openUrl = agencyDefinedUrl ;
                else if(lightweightDisabled)
                        openPopupWindow = false;
                else
                        openUrl = vtoUrl ;
        }
        
        if(openPopupWindow)
        {
                win = window.open(openUrl , 'VTO', "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=670,height=350,alwaysRaised=yes,dependent=yes,screenX=200,screenY=200");
                win.focus();
        }
        
}

function openVT(language){
var lang=language;
var  win = window.open('https://www.virtuallythere.com/cgi-bin/nph-newlogin?pnr=&name=&language='+lang+'&host=&pcc=&clocktype=12&error=&nosub=N','VTO',
    'width=670,height=350,screenX=200,screenY=200,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
    win.focus();
}



function show_wait()
{
	caltbl.style.visibility = 'visible';
}

function submit_with_wait()
{
	calframe.document.location.replace("waiting.html");
	caltbl.style.left = 1;
	caltbl.style.top = 1;
	caltbl.border = 0;
		
	try
	{
		calbox.width = document.body.clientWidth;
		calbox.height = document.body.clientHeight;
	}
	catch (e1)
	{
		try
		{
			calbox.width = window.innerWidth;
			calbox.height = window.innerHeight;
		}
		catch (e2)
		{
		}
	}
	RequestAirForm.submit();
}

function newWindow(curr)
{
currWindow = window.open(curr, 'CurrConverter', 'width=460,height=310');
currWindow.focus;
}

browser_version= parseInt(navigator.appVersion);
browser_type = navigator.appName;
platform = navigator.platform;
platform_slice=platform.slice(0, 3);

if (browser_type == "Microsoft Internet Explorer" && (browser_version >= 4)) {
document.write("<link REL='stylesheet' HREF='http://www.internettravelspecials.com/styles/its.css' TYPE='text/css'>");
} 

else if (browser_type == "Netscape" && (platform_slice == "Mac") && (browser_version != 5)) {
document.write("<link REL='stylesheet' HREF='http://www.internettravelspecials.com/styles/its.css' TYPE='text/css'>");
}

else if (browser_type == "Netscape" && (browser_version >= 4)) {
document.write("<link REL='stylesheet' HREF='http://www.internettravelspecials.com/styles/its.css' TYPE='text/css'>");
}


function IsNumeric(strString)
{
                //  check for valid numeric strings
                var strValidChars = "0123456789.-";
                var strChar;
                var blnResult = true;
 
                if (strString.length == 0) return false;

                //  test strString consists of valid characters listed above
                for (i = 0; i < strString.length && blnResult == true; i++)
                {
                                strChar = strString.charAt(i);
                                if (strValidChars.indexOf(strChar) == -1)
                                {
                                                blnResult = false;
                                }
                }
   return blnResult;
}
 
function GetDowStart() {return 0;}function GetDateFmt() {return "mmddyy";}function GetDateSep() {return "/";}
function ShowCalendar(otherDate, eP,eD,eDP)
{
                dtNow = new Date();
                if ( (eP.id == "retDate") && (!(isNaN(Date.parse(otherDate.value)))) )
                {
					dtNow.setTime(Date.parse(otherDate.value));
                }
                
                var month = dtNow.getMonth() + 1;
                var day = dtNow.getDate();
                var year = dtNow.getFullYear();
                var dmin = month + "/" + day + "/" + year;
                var dmax = month + "/" + day + "/" + (year + 1);
 
                SCal(eP,eD,eDP,dmin,dmax);
}
/*
function ShowCalSimp(fm,eD,eDP,dmin,dmax){
 if(!dmin)dmin='6/29/2006';if(!dmax)dmax='5/25/2007';
 if(fm){SetNextFocus(objNext(fm,eD));SetPrevFocus(objPrev(fm,eD));}
 SCal(eD,eD,eDP,dmin,dmax);
}
function ShowCalSimpTab(eD,eDP,dmin,dmax){
 SetKeyPress(eD);
 SCal(eD,eD,eDP,dmin,dmax);
}
*/
var zz, zv, d, fTSR;
d = new Date();
fTSR=0;
zv = d.getTime();
zz = "&zz="+zv;
 
var gBF=false;
function GoTo(u){window.top.location = u + zz;}
function Go(u){window.top.location = u;} 
 
function BF(){gBF=true;}
 
function Foci(o){if(!gBF && IsVis(o)){o.focus();}}
 
function IsVis(o)
{
                if(!o || o.type=="hidden")
                return false;
                
                while(o && o.style && o.style.display!='none')
                {
                o = o.parentNode; 
                }

                return !o || !o.style;
}
function TEK(a,evt){              
                var keycode;
                if (window.event){ keycode = window.event.keyCode; evt = window.event;}
                else if(evt) {keycode = evt.which;}
                else {return true;}
                if(13==keycode){evt.cancelBubble = true; evt.returnValue = false; eval(a);}
                }
 
function getObj(objID)
                {
                if (document.getElementById) {return document.getElementById(objID);}
                else if (document.all) {return document.all[objID];}
                else if (document.layers) {return document.layers[objID];}
                }
                
function objNext(f,d)
{
                var fFnd=false,el=f.elements,i=0;
                for(;i < el.length;i++)
                {
                if('hidden'!=el[i].type && false==el[i].disabled && IsVis(el[i]) && fFnd)return el[i];
                if((d.id&&d.id==el[i].id)||(d.name&&d.name==el[i].name))fFnd=true;
                }
                return null;
}
function objPrev(f,d)
{
                var fFnd=false,el=f.elements,i=el.length - 1;
                for(;i >= 0;i--)
                {
                if('hidden'!=el[i].type && false==el[i].disabled && IsVis(el[i]) && fFnd)return el[i];
                if((d.id&&d.id==el[i].id)||(d.name&&d.name==el[i].name))fFnd=true;
                }
                return null;
}
 