//functions for navigation
var selectedMenu = null ;
var selectedSubMenu = null;
var navTimeout = [];


function showSub(obj)
{	
	
  clearTimeout(navTimeout[obj]);

  
  // hide selected subnav
	
	if (selectedSubMenu != null) document.getElementById(selectedSubMenu).className = 'subnav';
  
	var subNav = obj + 'Lvl2';		
	document.getElementById(subNav).className = 'subnavShow';
	
	var nav = obj;
	document.getElementById(nav).className = 'selected';
  
  //window.status = this.href.indexOf('://') > -1 ? this.href : (location.protocol + '//' + location.host) + this.href;

}

function hideSub(obj) {
	// hide active sub nav
  var subNav = obj + 'Lvl2';		
  document.getElementById(subNav).className = 'subnav';
	
  var nav = obj;
  document.getElementById(nav).className = 'normal';
  

	//show selected subnav
	//var subNav = obj + 'Lvl2';		
	//if (selectedSubMenu != null) document.getElementById(selectedSubMenu).className = 'subnavShow';		
		
}

/*function setSelected(menu,subMenu)
{


}*/


function timeHideSub (obj) {
  navTimeout[obj] = setTimeout('hideSub("' + obj + '");',[100]);
  }

  
  
function external() {
 if (document.getElementsByTagName) {
  var i, a;
  a = document.getElementsByTagName('a');
  for (i in a) {
   if (a[i].getAttribute('href') && 
       a[i].getAttribute('rel') == 'external') a[i].target = '_blank';
  }
 }
}







