//Funtions for popups, site navigation, and panel showing

function showLayerHideOthers(option) {
	var theLayer = document.getElementById(option);
	hideLayer('about2053Travel');
	hideLayer('activitiesTravel');
	hideLayer('photosTravel');
	hideLayer('formembersTravel');
	theLayer.style.display = "block";
}
function hideLayer(option) {
	var theLayer = document.getElementById(option);
	theLayer.style.display = "none";
}

/* popup - Pops up a window.
 * @parm url  url of the page to popup.
 * @parm name  popup window's name.
 * @parm height  height of popup window in pixels.
 * @parm width  width of popup windo in pixels.
 * @parm scrollbars  (currently not used, always yes) either yes or no.    */
function popup(url, name, height, width, scrollbars) {
	var newwindow;
	newwindow=window.open(url, name, "height="+height+",width="+width+",scrollbars=yes");
	if(window.focus) {newwindow.focus()}
}

function setWindowToolbarsOn(windowName) {
	windowName.toolbar.visible=true;
	windowName.scrollbar.visible=true;
	windowName.personalbar.visible=true;
	windowName.locationbar.visible=true;
	windowName.menubar.visible=true;
	windowName.statusbar.visible=true;
	alert("done!");
}

/* travelOffSite - Pops up a warning when someone is going to travel off
 *                 the TigerTronics site.
 * @parm siteToGoTo  the url of the site to travel to.                   */
function travelOffSite(siteToGoTo) {
	var windowWidth = screen.width/2;
	var windowHeight = screen.height/2;
	if(windowHeight < 150) {
		windowHeight = 150;
	}
	if(windowWidth < 350) {
		windowWidth = 350;
	}
	
	popup("/cgi-bin/leaveSiteConfirm.sh?offSiteUrl="+siteToGoTo, "LeavingTigerTronicsWarningWindow", windowHeight, windowWidth, "yes");
}
