
// If not IE6 then notify user to upgrade browser
//if(is_ie && !is_ie6up) { document.location = 'browser-upgrade.aspx'; }

// Swaps menu classes
function changeNavClass(element, action) {		

	//###				
	if (action == 'on') {
		
		// turn off all child divs
		var oDiv = document.getElementById('navigationList');
		if(oDiv.firstChild) { // check for children
		   var oChild = oDiv.firstChild;
		   while(oChild) { // run over them
			if(element.id != oChild.id) {
				//document.getElementById(oChild.id).style.display = 'none'
				if(oChild.id == 'item1') { 
					document.getElementById(oChild.id).className = "x";
				} else {
					document.getElementById(oChild.id).className = "";
				}
			}
			oChild = oChild.nextSibling;
		   }
		}				
		
		// turn on current item
		element.className = "current";		
		if(element.id == 'item1') { element.className = "currentx"; }
		return true;
	}
	
	//###
	if (action == 'off') {	
		element.className = "";
		if(element.id == 'item1') {
			element.className = "x";
		}
		return true;
	}			
	
}	

// Include Client Sniffer
// ##########################################################################################

function changeMenuClass(Elem) {
	var elem;
	if(document.getElementById) {
		var elem = document.getElementById(Elem);
	} else if (document.all){ var elem = document.all[Elem]; }
	if(document.getElementById(Elem).className == 'HideMenu') { 
		elem.className = 'ShowMenu';
	}
	else 
	elem.className = 'HideMenu';
}

// Open Centered Window
// ##########################################################################################

function launchCenter(url, name, height, width, winoptions) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
	var ah = screen.availHeight - 30;
	var aw = screen.availWidth - 10;

	var xc = (aw - width) / 2;
	var yc = (ah - height) / 2;

	str += ",left=" + xc + ",screenX=" + xc;
	str += ",top=" + yc + ",screenY=" + yc;
	str += "," + winoptions;
  }
  return window.open(url, name, str);
}
