var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0, myclose=0;
var globalY = 82;
var menuactiv = new Array();
function DHTML_init() {

 if (window.opera) {
     OP = 1;
 }
 if(document.getElementById) {
   DHTML = 1;
   DOM = 1;
 }
 if(document.all && !OP) {
   DHTML = 1;
   MS = 1;
 }
if(document.layers && !OP) {
   DHTML = 1;
   NS = 1;
 }
}

function getElem(p1,p2,p3) {
var Elem;
if(DOM) {
   if(p1.toLowerCase()=="id") {
     if (typeof document.getElementById(p2) == "object")
     Elem = document.getElementById(p2);
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="name") {
     if (typeof document.getElementsByName(p2) == "object")
     Elem = document.getElementsByName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="tagname") {
     if (typeof document.getElementsByTagName(p2) == "object" ||
        (OP && typeof document.getElementsByTagName(p2) == "function"))
     Elem = document.getElementsByTagName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
 else if(MS) {
   if(p1.toLowerCase()=="id") {
     if (typeof document.all[p2] == "object")
     Elem = document.all[p2];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="tagname") {
     if (typeof document.all.tags(p2) == "object")
     Elem = document.all.tags(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="name") {
     if (typeof document[p2] == "object")
     Elem = document[p2];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
 else if(NS) {
   if(p1.toLowerCase()=="id" || p1.toLowerCase()=="name") {
   if (typeof document[p2] == "object")
     Elem = document[p2];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="index") {
    if (typeof document.layers[p2] == "object")
     Elem = document.layers[p2];
    else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
}

function setVisibility(myVisibility,myid)
{

  if (e = getElem("id", myid, ""))
  {
    e.style.visibility = myVisibility;
  }
}

function makeunvis(myid)
{
setVisibility('hidden',myid)
}


function prepareClose(myid)
	{
	 
	}

DHTML_init();

function doTop(id,x)
	{ 
	menuactiv[id] = 2;
	if (GL_isObjCss(id))
		{
		setVisibility('visible',id)
		var mymenue = document.getElementById(id);
//		mymenue.style.left = x + "px";
		mymenue.style.top = globalY - 1 + "px";	 	
		}
	}

function GL_isObjCss(obj)
	{								
	flag = bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;
	if (flag)	return true;
	};

function GL_checkBrowser(){
	this.dom= (document.getElementById);
	this.op=this.opera= (navigator.userAgent.indexOf("Opera")>-1);
	this.konq=  (navigator.userAgent.indexOf("Konq")>-1);
	this.ie4= (document.all && !this.dom && !this.op && !this.konq);
	this.ie5= (document.all && this.dom && !this.op && !this.konq);
	this.ns4= (document.layers && !this.dom && !this.konq);
	this.ns5= (!document.all && this.dom && !this.op && !this.konq);
	this.ns6= (this.ns5);
	this.bw=  (this.ie4 || this.ie5 || this.ns4 || this.ns6 || this.op || this.konq);
	return this;
}
bw= new GL_checkBrowser();

function myhide(id)
	{
//	alert("---" + menuactiv[id]);
	if (menuactiv[id] != 1)
		{
		setVisibility('hidden',id)	
		menuactiv[id] = 0;
		}
	}
function myhide2(id)
	{
	if (menuactiv[id] != 2 && menuactiv[id] != 1)
		{
//		setVisibility('hidden',id)	
		menuactiv[id] = 0;
		}
	}
function makemenuactive(id)
	{
	menuactiv[id] = 1;
//	alert(menuactiv[id]);
	}
	
function GL_doTop(id,x)
	{ 
	menuactiv[id] = 2;
	if (GL_isObjCss(id))
		{
		setVisibility('visible',id)
		var mymenue = document.getElementById(id);
//		mymenue.style.left = x + "px";
		mymenue.style.top = globalY - 1 + "px";	 	
		}
	}

function GL_stopMove(id)
	{ 
	}

function GL_hideAll(id)
	{ 
	}

function GL_resetAll(id)
	{ 
	}

function blurLink(id)
	{ 
	}

