function reset_page() { document.location = window.location; }

// check browser

var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

var stravel_IsIE = false;
var stravel_IsMoz = false;
var stravel_IsSafari = false;
var stravel_IsOpera = false;
var stravel_IsWindows = false;
var stravel_IsWebTV = false;
var stravel_IsOmniWeb = false;
var stravel_IsICab = false;
var stravel_IsKonqueror = false;
var stravel_IsMac = false;
var stravel_IsUnix = false;
var stravel_IsLinux = false;


if (checkIt('konqueror'))
{
	stravel_IsKonqueror = true;
	stravel_IsLinux = true;
}
else if (checkIt('safari')) stravel_IsSafari = true;
else if (checkIt('omniweb')) stravel_IsOmniWeb = true;
else if (checkIt('opera')) stravel_IsOpera = true;
else if (checkIt('webtv')) stravel_IsWebTV = true;
else if (checkIt('icab')) stravel_IsICab = true;
else if (checkIt('msie')) stravel_IsIE = true;
else if (!checkIt('compatible'))
{
	var stravel_IsMoz = true;
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS) {
	if (checkIt('linux')) stravel_IsLinux = true;
	else if (checkIt('x11')) stravel_IsUnix = true;
	else if (checkIt('mac')) stravel_IsMac = true;
	else if (checkIt('win')) stravel_IsWindows = true;
	else OS = "an unknown operating system";
}

function checkIt(string) {
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}


// done checking browser

// for targed links in the popup window

if (window.name != "travel_popup") {
	window.name = "travel_main";
	this.focus();
	}

// pop up window

var travel_popup;

// If the window already exists (but closed or in the background) bring it to the foreground.  Otherwise, open it.

function popup(url, name, w, h) {
	
	if (!name) {name = 'travel_popup';}
	if (!w) {w = 460;}
	if (!h) {h = 500;}
	temp = window.open(url, name, 'width=' + w + ',height=' + h + ',scrollbars,resizable');
	if (!temp) { 
		alert ('You are using popup blocker software which prevents us from showing you the page you requested. Please disable your popup blocker and try again.');
		} else {
		if (goodBrowser()) { temp.focus(); }
		}
	eval(name + ' = temp');
}

function goodBrowser() {

	if ( (navigator.appName == "Netscape" && (navigator.appVersion.substring(0,1) >= "3") ) || 
		(navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.substring(0,1) >= "4") ) ) {
		return true;
	} else {
		return false;
	}
}


// drop-downs

var DOCSMenu = null;
function menuOver(MenuID) {

	// old netscape browsers
	if (document.layers) {
		if (document.layers[MenuID]!=null) {
			// the window is already open
			if (DOCSMenu==document.layers[MenuID]){
				clearTimeout(Timeout_ID);
				} else{
				// opening a new menu, so close the old one
				if(DOCSMenu!=null){
					clearTimeout(Timeout_ID);
					hideNow();
					}
				}
			// show the menu
			DOCSMenu = document.layers[MenuID];
			if (DOCSMenu.visibility!=null) {
				DOCSMenu.visibility = 'visible';
				}
			}

	// newer browsers
		} else {
		
		if ((document.getElementById)&&(document.getElementById(MenuID)!=null)) {
		// the window is already open
			if (DOCSMenu==document.getElementById(MenuID)){
				clearTimeout(Timeout_ID);
				} else{
				// opening a new menu, so close the old one
				if(DOCSMenu!=null){
					clearTimeout(Timeout_ID);
					hideNow();
					}
				}
			// show the menu
			DOCSMenu = document.getElementById(MenuID);
			if ((DOCSMenu.style)&&(DOCSMenu.style.visibility!=null)) {
				DOCSMenu.style.visibility = 'visible';
				}
			}
		}
	
	
}


function menuOut(MenuID){

	// old netscape browsers
	if (document.layers) {
		
		if (document.layers[MenuID]!=null) {
			DOCSMenu = document.layers[MenuID];
			Timeout_ID = window.setTimeout('hideNow();',600);
			}

	// newer browsers
		} else {
		
		if ((document.getElementById)&&(document.getElementById(MenuID)!=null)) {
			DOCSMenu = document.getElementById(MenuID);
			Timeout_ID = window.setTimeout('hideNow();',600);
			}
		
		}
	
}

function hideNow() {

	// old netscape browsers
	if (document.layers) {
		
		DOCSMenu.visibility = 'hidden';

	// newer browsers
		} else {
		
		if ((DOCSMenu.style)&&(DOCSMenu.style.visibility)) {
			DOCSMenu.style.visibility = 'hidden';
			}
		
		}
		
}
	

		
function getInsideWindowHeight() {
	
    if (window.innerHeight) {
        return window.innerHeight;
        } else if (document.body && document.body.clientHeight) {
		return document.body.clientHeight;
		} else {
		return 600;
		}
}

		
function getInsideWindowWidth() {
	
    if (window.innerWidth) {
        return window.innerWidth;
        } else if (document.documentElement && document.documentElement.clientWidth) {
		return document.documentElement.clientWidth;
		 } else if (document.body) {
		return document.body.clientWidth;
		} else {
		return 800;
		}
}

