﻿<!--
// mouseover
function swap() {
	if (document.images) {
		for (var i=0; i<swap.arguments.length; i+=2) {
			document[swap.arguments[i]].src = eval(swap.arguments[i+1] + ".src");
		}
	}
}
//window width
function windowWidth() {
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }
	return myWidth;
}
function windowHeight() {
  var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
	return myHeight;
}

// popup basic
function popChart(url) {
	
	var winWidth = windowWidth();
    var winHeight = windowHeight();
    if(winWidth > 1024 && winHeight > 768)
	{
		sbars = 0;
	}
	else
	{
		sbars = 1;	
	}
	
	
	var winParameters = "width=1000"
					+ ",height=900"
					+ ",scrollbars=" + sbars;
	popupWin = window.open(url, "Seating" , winParameters);
	popupWin.focus();
}

// popup basic
function popSmallChart(url) {
	
	var winWidth = windowWidth();
	if(winWidth > 1024)
	{
		sbars = 0;
	}
	else
	{
		sbars = 1;	
	}
	
	
	var winParameters = "width=595"
					+ ",height=480"
					+ ",scrollbars=" + sbars;
	popupWin = window.open(url, "Seating" , winParameters);
	popupWin.focus();
}


// popup parking
function popPark(url) {
	var winParameters = "width=545"
					+ ",height=360"
					+ ",scrollbars=0";
	popupWin = window.open(url, "Parking" , winParameters);
	popupWin.focus();
}

// popup bequest 
function popBequest (url) {
	var winParameters = "width=600"
					+ ",height=660"
					+ ",scrollbars=0";
	popupWin = window.open(url, "SampleBequestLanguage" , winParameters);
	popupWin.focus();
}

// series pop 
function popHelp(url) {
	var winParameters = "width=600"
					+ ",height=800"
					+ ",scrollbars=yes";
	popupWin = window.open(url, "Help" , winParameters);
	popupWin.focus();
}

function popOnlineHelp(url) {
	var winParameters = "width=550"
					+ ",height=700"
					+ ",scrollbars=yes";
	popupWin = window.open(url, "Help" , winParameters);
	popupWin.focus();
}

// -->
<!--

var activeSub=0;
var SubNum=0;

//Define global variables
var timerID = null;
var timerOn = false;
var timecount = 1000;
var what = null;
var newbrowser = true;
var check = false;
var selectvisible = true;
var screenSize = 760;
var menuTop = 202;



function init() {

	if (document.layers) {
		layerRef="document.layers";
		styleSwitch="";
		visibleVar="show";
		screenSize = window.innerWidth;
		what ="ns4";
		menuTop = 116;
		//alert('you access by: document.layers!');
		
	} else if(document.all) {
		layerRef="document.all";
		styleSwitch=".style";
		visibleVar="visible";
		screenSize = document.body.clientWidth + 18;
		what ="ie";
		//alert('you access by: document.all!');
		
	} else if(document.getElementById) {
		layerRef="document.getElementByID";
		styleSwitch=".style";
		visibleVar="visible";
		what="moz";
		//alert('you access by: document.id!');
		
	} else {
		what="none";
		newbrowser = false;
		//alert('you              are false!');
	}

	if(newbrowser && (what!="ns4"))	{	
			
		
			positionLayer('nav-buy',-5);
			positionLayer('nav-meet',80);
			positionLayer('nav-support',202);
			positionLayer('nav-community',344);
			positionLayer('nav-join',490);
			positionLayer('nav-press',501);
			
		

		document.body.onmouseup = closeMenus;
	}
	check = true;
}

// set left and top for a layer
function positionLayer(layerName,leftOffset)
{
	if (what =="none") return;
	else if (what == "moz")
	{
		// alert(layerName);
		// alert();
		document.getElementById(layerName).style.top = menuTop;
		document.getElementById(layerName).style.left = (5+leftOffset + "px");
		
		//alert(document.getElementById(layerName).style.left);
	}
	else
	{
		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top="'+menuTop+'px"');
		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left="'+(5+leftOffset)+'px"');
	}	
}


// Makes the Sub-Category pulldown select box invisible
// should only be called on IE browsers
function hideSubCatSelect()
{
	if ((document.forms.length > 1)&&(document.forms[1].elements.length > 0)&&((document.forms[1].elements[0].name=="Category")||(document.forms[1].elements[0].name=="collection")))
	{
		eval(layerRef+'["subcat-select"]'+styleSwitch+'.visibility="hidden"');
		selectvisible = false;
	}
}


// Makes the Sub-Category pulldown select box visible
// should only be called on IE browsers
function showSubCatSelect()
{
	if ((document.forms.length > 1)&&(document.forms[1].elements.length > 0)&&((document.forms[1].elements[0].name=="Category")||(document.forms[1].elements[0].name=="collection")))
	{
		eval(layerRef+'["subcat-select"]'+styleSwitch+'.visibility="visible"');
		selectvisible = true;
	}
}


// Turns the layers on and off
function showLayer(layerName)
{
	if((check)&&(what!="ns4")) {
	
		hideAll();
		if (what =="none") return;
		else if (what == "moz")
		{
			document.getElementById(layerName).style.visibility="visible";
		}
		else
		{
			eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
			//if (  (what=="ie") && (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left').substring(0,eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left').length-2)>650) )
			if ( (what=="ie") && ((layerName=="nav-trellises")||(layerName=="nav-umbrellas")||(layerName=="nav-accessories")) )
				hideSubCatSelect();
		}
		
	} else {
		return;
	}
	stopTime();
}


function hideLayer(layerName)
{
	if((check)&&(what!="ns4"))
	{
		if (what =="none") return;
		else if (what == "moz") document.getElementById(layerName).style.visibility="hidden";
		else eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
		if (selectvisible==false) showSubCatSelect();
	}

	else
	{
		return;
	}

}


function hideAll() {

	
		hideLayer('nav-buy');
		hideLayer('nav-meet');
		hideLayer('nav-support');
		hideLayer('nav-community');
		hideLayer('nav-join');
		hideLayer('nav-press');
	
	
}


function closeMenus() {

	
	
		if(location.href.indexOf("/symphony/buy/") == -1)
			swap('buy','buy');
		if(location.href.indexOf("/symphony/meet/") == -1)
			swap('meet','meet');
		if(location.href.indexOf("/symphony/support/") == -1)
			swap('support','support'); 
		if(location.href.indexOf("/symphony/community/") == -1)
			swap('community','community'); 
		if(location.href.indexOf("/symphony/join/") == -1)
			swap('join','join'); 
		if(location.href.indexOf("/symphony/press/") == -1)
			swap('press','press');
	
	

	if(check) {
		hideAll();
	}
}


function startTime() {

	if (what=="ns4") {
		closeMenus();
	} else if (timerOn == false) {
		timerID=setTimeout( "closeMenus()" , timecount);
		timerOn = true;
	}
}


function stopTime() {
	if (timerOn) {
		clearTimeout(timerID);
		timerID = null;
		timerOn = false;
	}
}

function onLoad() {
	init();
}


			
// -->
