addLoadListener(init);


function init(){
  
	
    var url = this.location.href;	
    var menu = document.getElementById('nav').getElementsByTagName("a");   
    for( var x = 0; x < menu.length ; x++ ){
         
        if (menu[x].href == url) {
            menu[x].className = 'active';
        }
      }
	  
	  
	
	  
	  
	  var home_menu = document.getElementById('header-top-nav').getElementsByTagName("a");
	 
	 
	 for( var x = 0; x < home_menu.length ; x++ ){
         
		
        if (home_menu[x].href == url) {
            home_menu[x].className = 'active';
        }
      }
	  
}







function addLoadListener(fn)
{
  if (typeof window.addEventListener != 'undefined')
  {
    window.addEventListener('load', fn, false);
  }
  else if (typeof document.addEventListener != 'undefined')
  {
    document.addEventListener('load', fn, false);
  }
  else if (typeof window.attachEvent != 'undefined')
  {
    window.attachEvent('onload', fn);
  }
  else
  {
    var oldfn = window.onload;
    if (typeof window.onload != 'function')
    {
      window.onload = fn;
    }
    else
    {
      window.onload = function()
      {
        oldfn();
        fn();
      };
    }
  }
};
