var DHTML = (document.getElementById || document.all || document.layers);
var x;

function getObj(name){
  if (document.getElementById){
	this.obj = document.getElementById(name);
  if(this.obj != null){
	this.style = document.getElementById(name).style;
	}else{
	return;
	}
  }
  else if (document.all){
	this.obj = document.all[name];
  if(this.obj != null){
	this.style = document.all[name].style;
}else{
	return;
	}

  }
  else if (document.layers){
   	this.obj = document.layers[name];
  if(this.obj != null){
   	this.style = document.layers[name];
}else{
	return;
	}

  }
}

function setSubMenu(id){
  if (DHTML){
    x= new getObj(id);
    if (x.style!=undefined || x.style!=null) {
      x.style.color="#000000";
    } else {
      return;
    }
  } else {
    return;
  }
}


function setMenu(id){
  if (DHTML){
    x= new getObj(id);
    if (x.style!=undefined || x.style!=null) {
      x.style.color="#000000";
      x.style.backgroundColor="#FFFFFF";
    } else {
      return;
    }
  } else {
    return;
  }
}

function GetSection(id) {
  var query = window.location.href;
  var pairs = query.split("/");
  var lengte = pairs.length;
  var section = pairs[lengte-1].split(".");
  if(section!=null){
    var section2 = section[0].split("_");
    if (section2!=null){
      return section2[id];
    }else{
    return false;
    }
  }else{
    return false;
  }
}

function showActive() {
  s1=GetSection(0);
  s2=GetSection(1);
  if (s1!=null && s1!="") {
    setMenu(s1);
    if (s2!=null && s2!="") {
      setSubMenu(s2);
    }
  } else{
    setMenu('home');
  }
}