var lockBar=0;var aOffset = new Array(40,160,281,464,596); var aIFrmHt = new Array()


/* Funciones del Menu desplegable */
function mDsp(menuId) {
  var tmpWidth = 0; lockBar = menuId
  for (ii=1; ii<6;ii++) {
    if (document.body.clientWidth-782 > 0) {tmpWidth = document.body.clientWidth-781} else {tmpWidth = 1}
    if (menuId == ii) {
      document.getElementById("tpMnu"+ii).style.display = "block";document.getElementById("tpMnu"+ii).style.left=aOffset[ii-1]+tmpWidth/2+"px"
      if (navigator.userAgent.indexOf("Opera") < 0) {document.getElementById("navIFrm"+ii).style.display = "block";document.getElementById("navIFrm"+ii).style.left=aOffset[ii-1]+tmpWidth/2+"px"}
      document.getElementById("mnSpn"+ii).style.backgroundImage = "url(/img/bgNavSlct.gif)";document.getElementById("mnSpn"+ii).style.backgroundRepeat = "repeat";
    }
    else {document.getElementById("tpMnu"+ii).style.display = "none";document.getElementById("navIFrm"+ii).style.display = "none";document.getElementById("mnSpn"+ii).style.backgroundImage = "none";}
  }
}

function mOff(menuId) {lockBar=0;setTimeout("mHide("+menuId+")",700)}

function mHide(menuId) {if (menuId != lockBar) {document.getElementById("tpMnu"+menuId).style.display = "none";document.getElementById("navIFrm"+menuId).style.display = "none";document.getElementById("mnSpn"+menuId).style.backgroundImage = "none";}}










// Abrir Ventana

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//PopUps
var ventana;
function popUp(fichero,ancho,alto){

	if (typeof(ventana)!="undefined")
		if (!ventana.closed)
			ventana.close();
	ventana=window.open('','ventana','width='+(parseInt(ancho)+10)+',height='+(parseInt(alto)+10)+',status=yes')
	var texto = "<html><head><title>TopMovil :: Ampliar Detalle</title>";
	texto = texto +"</head><body bgcolor='#FFFFFF' text='#666666' leftmargin='5' topmargin='5' marginwidth='5' marginheight='5' onClick='javascript:window.close();'>";
	texto = texto + "<img src='"+fichero+"' width='"+ancho+"' height='"+alto+"'></body></html>"	
	//Abrimos la ventana
	ventana.document.open("text/html","replace");
	ventana.document.write(texto);
	ventana.focus();
}


