function Browser(){
  this.dom = document.getElementById?1:0;
  this.ie4 = (document.all && !this.dom)?1:0;
  this.ns4 = (document.layers && !this.dom)?1:0;
  this.ns6 = (this.dom && !document.all)?1:0;
  this.ie5 = (this.dom && document.all)?1:0;
  this.ok = this.dom || this.ie4 || this.ie5;
  this.platform = navigator.platform;
}
var browser = new Browser();

function div(nombre){

	if (browser.ns4){
  	var tmpLayer = document.layers[nombre];
	}
 	if (browser.dom || browser.ie4){
		var tmpLayer = browser.dom?document.getElementById(nombre):document.all(nombre);
	}  	
	this.containerLayer = tmpLayer;
	this.visible = visible;	
}

function visible(valor){
	if (browser.ie || browser.dom){
		divmenu = this.containerLayer.style
		switch(valor){
	 		case 0:
	 			nuevo_estado = "hidden";
	 			break;
	 		case 1:
	 			nuevo_estado = "visible";
		}	
	}else{
		if (browser.ns4){
		 	divmenu = this.containerLayer;
		 	switch(valor){
		 		case 0:
		 			nuevo_estado = "hide";
		 			break;
		 		case 1:
		 			nuevo_estado = "show";
			}			
		}		
	}			
	divmenu.visibility = nuevo_estado
}