/**
 * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){
_16.push(key+"="+_18[key]);}
return _16;
},getSWFHTML:function(){
var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
_19+="/>";
}else{
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();
return true;
}else{
if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
var _25=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
for(var i=3;axo!=null;i++){
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
_25=new deconcept.PlayerVersion([i,0,0]);}}
catch(e){}
if(_23&&_25.major>_23.major){return _25;}
if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
catch(e){}}}
return _25;};
deconcept.PlayerVersion=function(_29){
this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
this.minor=parseInt(_29[1])||0;
this.rev=parseInt(_29[2])||0;};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}return true;};
deconcept.util={getRequestParameter:function(_2b){
var q=document.location.search||document.location.hash;
if(q){
var _2d=q.indexOf(_2b+"=");
var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
if(q.length>1&&_2d>-1){
return q.substring(q.indexOf("=",_2d)+1,_2e);
}}return "";}};
if(Array.prototype.push==null){
Array.prototype.push=function(_2f){
this[this.length]=_2f;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject; // for backwards compatibility
var SWFObject=deconcept.SWFObject;




function __showAlternateText(texto){
	document.all['__layerAlternateText'].innerHTML=texto;
	document.all['__layerAlternateText'].style.visibility='visible';
	document.all['__layerAlternateText'].style.posLeft=window.event.clientX;
	document.all['__layerAlternateText'].style.posTop=window.event.clientY+20+document.documentElement.scrollTop;
	document.all['__layerAlternateText'].style.width = texto.length*5;
		if ((document.all['__layerAlternateText'].offsetLeft)<=15)		
			document.all['__layerAlternateText'].style.posLeft=document.all['__layerAlternateText'].style.posLeft+15+((document.all['__layerAlternateText'].offsetLeft)*(-1))
		if ((document.all['__layerAlternateText'].offsetWidth + document.all['__layerAlternateText'].style.posLeft) > document.body.offsetWidth)
			document.all['__layerAlternateText'].style.posLeft= document.body.offsetWidth - document.all['__layerAlternateText'].offsetWidth  -5
}

function __hiddeAlternateText(){
	document.all['__layerAlternateText'].style.visibility='hidden';
}


function __RaisePostBackEventIFKeyCode13(_PostBackEventReference){

		var k = window.event.keyCode;
		if (k == 13){
			eval(_PostBackEventReference);
			return false;
		}else			
			return k;
}

function showNewsletter(ID){

	var w = 518;
	var h = 600;
	var x = (screen.width==1024)? 0 : (screen.width-w)/2;
	var y = (screen.width==1024)? 0 : (screen.height-h)/2;
	var win_id = open('PopUp.aspx?id='+Encode(ID),"win_id","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width="+w+",height="+h+",left="+x+",top="+y);
	win_id.focus();
}

function DisplayParrilla(layerNameMostrar,layerNameOcultar1,layerNameOcultar2){
    /*var oItems = document.getElementsByTagName("div"); 
    for(i=0;i<oItems.length;i++){
        if (oItems[i].name==layerNameMostrar)
            oItems[i].style.display="block";
        if ((oItems[i].name==layerNameOcultar1)||(oItems[i].name==layerNameOcultar2))
            oItems[i].style.display="none";
    }*/
    
    var oItem1 = document.getElementById("ctl00_CPContenido_ctl00_LayerParrilla"); 
    var oItem2 = document.getElementById("ctl00_CPContenido_ctl01_LayerParrilla"); 
    var oItem3 = document.getElementById("ctl00_CPContenido_ctl02_LayerParrilla"); 
    
    switch (layerNameMostrar){
    case "parrilla_1":
        oItem1.style.display = "block";
        oItem2.style.display = "none";
        oItem3.style.display = "none";
    break;				
    case "parrilla_2":
        oItem1.style.display = "none";
        oItem2.style.display = "block";
        oItem3.style.display = "none";        
    break;
    case "parrilla_3":
        oItem1.style.display = "none";
        oItem2.style.display = "none";
        oItem3.style.display = "block";        
    break;
    }
    
}

    var __moveScroll=false;
	function moveScrollToBottom(){
	    if (__moveScroll){
		window.scrollTo(0,document.all['cBody'].offsetHeight);
		}
	}

	function cerrar(){
		window.close();
	}

	function CapturarOnKeyPressBusquedaGeneral(idBotonBuscar,idTxtBuscar){
		var k = window.event.keyCode;
		
		if (k == 13)
		{	
		
		
			var btn = document.getElementById(idBotonBuscar);
			var txt = document.getElementById(idTxtBuscar);	
			if (txt.value.length<3)
			{					
				alert('Introduzce al menos 3 caracteres');
				txt.focus();
				return false;
			}
			btn.focus();
			btn.click();	
			
			return false;					
		}
		else			
			return k;
	}
	function verificarSiEsGoogle(palabra,opcion){
		var txtPalabra = document.getElementById(palabra);
		var lOpcion = document.getElementById(opcion);					
		if (lOpcion != null){
			if (txtPalabra.value.length>2){ 
				if (lOpcion.value=='-1'){
					var a=window.open('http://www.google.com/search?q='+txtPalabra.value+'&ie=UTF-8&oe=UTF-8&hl=es&btnG=B%C3%BAsqueda+en+Google&meta=','a','');
					a.focus();
					return false;
				}else{
					return true;
				}
			}else{
				alert('Introduzce al menos 3 caracteres');
				txtPalabra.focus();
				return false;
			}
		}
    }



// Menu
function showchilds(li,show){
    if (show){
		if((li.className.indexOf(' showchilds'))<0)
			li.className += ' showchilds';
    }else{
		li.className = replaceChars(li.className," showchilds","");
        //li.className = replaceChars(li.className," activo","");
    }    
}

function removeimage(el){
	/*el.className = replaceChars(el.className,"activo","");*/
}
function addimage(el){
	/*el.className += 'activo';*/
}



//Permite limitar la longitud de campos de tipo textarea 
//Incluir en onkeyup y onblur del textarea
function Limite(it,max)
{
	if (it.value.length > max) 
		it.value=it.value.substr(0,max);	
}

//Esta función permite verificar si el valor recibido es
//un número entero
function esEntero(valor)
{  
  var s = Math.abs(valor);
  var filter=/(^\d+$)/;
  if (s.length == 0 ) return true;
  if (filter.test(s))  
       return true;
  else  
       return false
}

//Esta función verifica si el valor que recibe es numérico
function esNumero(valor)
{
  var s = valor;     
  if (isNaN(Math.abs(valor)) && (s.charAt(0) != '#'))
  {
    var ds = new String()
     
    for (var i=0; (i <= s.length && s.charAt(i) != ','); )
    {
        if (((s.charAt(i) >= 0) && (s.charAt(i) <= 9)) ||
            (s.charAt(i) == '.' && i != 0 && i != s.length-1) || (s.charAt(i) == ',') )
            i++; 
        else            
            return false;            
    } 
    if (s.charAt(i) == ',') 
    { 
	    for (i++;i <= s.length; ) 
        { 
			if (((s.charAt(i) >= 0) && (s.charAt(i) <= 9))) 
				i++; 
			else             
				return false;            
        } 
    }        
  } 
  return true;
}

//Esta función permite verificar si el valor introducido en un campo de fecha es correcto
/* Devuelve:
0  --> Fecha correcta o cadena de fecha vacia
-1 --> Fecha incorrecta. El formato de la fecha no es valido. El formato correcto es: dd/mm/aaaa
-2 --> Fecha incorrecta. El año introducido no es válido. Debe ser mayor de 1753 y menor de 9999
-3 --> Fecha incorrecta. El mes introducido no es valido
-4 --> Fecha incorrecta. El dia introducido no es valido
-5 --> Cadena vacia
*/
function fechaCorrecta(valor,permitirvacio)
{
 var fechacorrecta = false;
 var DayArray = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
 var MonthArray = new Array ("01","02","03","04","05","06","07","08","09","10","11","12");
 var MonthArray1 = new Array("1","2","3","4","5","6","7","8","9","10","11","12");
 var thisYear = null;
 var thisMon = null;
 var thisDay = null;
 var today = null;
 inpDate = valor;
 

 //Verificar si la fecha es vacia
 if ((inpDate.length == 0) && (permitirvacio==true)) 
	return 0;
 else if ((inpDate.length == 0) && (permitirvacio==false)) 
    return -5;
    
 var object = inpDate.split("/"); 
 thisDay = object[0];
 thisMonth = object[1];
 thisYear = object[2];
 
 /*Validación del formato de la fecha*/
 var filterformat1=/^[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{4}$/;
  
 if (! filterformat1.test(inpDate)) return -1; 
 
 var anyocorrecto=false;
 var anyo=Number(thisYear);
      
 
 /*Validación del formato del mes*/
 var ctrmes=0;
 var mescorrecto=false;
 while((ctrmes<=11) && (mescorrecto==false))
 {
   if ((MonthArray[ctrmes]==thisMonth) || (MonthArray1[ctrmes]==thisMonth))
   {
      mescorrecto=true; 
   }
   else
   {
    ctrmes ++;
   }
 }

 if (mescorrecto==false)    return -3; 
  
 /*Verificar años bisiestos*/
 N=Number(thisYear);
 if ( ( N%4==0 && N%100 !=0)  || (N%400==0 ) ) 
 {
    DayArray[1]=29;   
 }
 /*Verificar los dias válidos del mes*/
 for(var ctr=0; ctr<=11; ctr++)
 {
   if ((MonthArray[ctr]==thisMonth) || (MonthArray1[ctr]==thisMonth))
   {
      if (thisDay<= DayArray[ctr] && thisDay >0 )
           return 0;
       else
           return -4;        
    }
 }

}

// Se usa en la función que comprueba si la hora es correcta
function hnumero(car)
{
   return (hnumeros.indexOf(car)>=0)
}

//***********************************************************   
// 			Comprueba si una hora es correcta
//***********************************************************   
  /*
  0  --> Hora correcta
  -1 --> Carácter ilegal en una hora
  -2 --> Campo vacio no contiene ningún valor
  -3 --> Faltan los dos puntos
  -4 --> Hora incorrecta en una hora
  -5 --> Minutos incorrectos en una hora
  -6 --> Segundos incorrectos en una hora
  */
function compruebahora(contenido,permitirvacio,verifsegundos)
{
   hnumeros="0123456789";
   var separadorhora=":";
   
   if ((contenido.length==0) && (permitirvacio==false))
   {      
      return -2;
   } 
   var nsep=0; 
   // Comprobación de la sintáxis de una hora 
   for (var i=0; i<contenido.length; ++i)
   {
      var car=contenido.charAt(i);

      if (!hnumero(car) && car!=separadorhora)
      {         
         return -1;
      } 
   	  if (car==separadorhora)
         nsep++ 
   }

   if (nsep!=1)
   {    
	     return -3;
   }
     	  
   // Comprobación de la semántica de una hora 
   var pos1=contenido.indexOf(separadorhora);
   var horas=contenido.substring(0,pos1);
   var pos2=contenido.indexOf(separadorhora,pos1+1);
   var minutos=contenido.substring(pos1+1,5); 
   var segundos=contenido.substring(pos2+1,10);

   if (horas>23||horas.length>2)
   {
      return -4;
   } 
   if (minutos>59||minutos.length>2)
   {      
      return -5;
   }
   if ((segundos>59||segundos.length>2) && (verifsegundos==true))
   {      
      return -6;
   } 
   
   return 0;
   
}

//***********************************************************   
// 			           Compara fechas
//***********************************************************   
  /*
  0  --> Comparación correcta
  -1 --> Año incorrecto. Año mayor en fecha1.
  -2 --> Mes incorrecto. Mes mayor en fecha1.
  -3 --> Día incorrecto. Día mayor en fecha1.
  */ 
function comparaFechas(fecha1,fecha2,fecha1name,fecha2name)
{
 var fechamenor=false;
 var thisYear1 = null;
 var thisMon1 = null;
 var thisDay1 = null;
 var thisYear2 = null;
 var thisMon2 = null;
 var thisDay3 = null;
 inpDate1 = fecha1.value;
 if (inpDate1.length == 0 ) return 0;
 var object1 = inpDate1.split("/"); 
 thisDay1 = Number(object1[0]);
 thisMonth1 = Number(object1[1]);
 thisYear1 = Number(object1[2]);

 inpDate2 = fecha2.value;
 if (inpDate2.length == 0 ) return 0;
 var object2 = inpDate2.split("/"); 
 thisDay2 = Number(object2[0]);
 thisMonth2 = Number(object2[1]);
 thisYear2 = Number(object2[2]);
 
 if(thisYear1 > thisYear2)
 {  
  fecha1.focus();
  fecha1.select();
  return -1;
 }
 else
 { 
  if (thisYear1 == thisYear2)
  {
	if (thisMonth1 > thisMonth2)
 	{  	 
  	 fecha1.focus();
  	 fecha1.select();
  	 return -2;
  	}
	else
	{
	 if (thisMonth1 == thisMonth2)
	 {
		if (thisDay1 > thisDay2)
		{
  		 fecha1.focus();
  		 fecha1.select();
  		 return -3;
		}
		else 
		 return 0;
	 }
	 else 
		return 0;
   }
  }
  else 
   return 0;
 }
}


function Encode(url){
	return replaceChars(escape(url),"+","%2b");
}	
function replaceChars(entry, out, add) {
	temp = "" + entry; // temporary holder
		while (temp.indexOf(out)>-1) {
			pos= temp.indexOf(out);
			temp = "" + (temp.substring(0, pos) + add + temp.substring((pos + out.length), temp.length));
		}
	return temp;
}	

function EvitarDobleEscape(uerreele)
{
 var url = uerreele;
 var sw = 0;
 if(uerreele.indexOf('?')==-1) return url;
 url = Encode(uerreele.substring(0, uerreele.indexOf('?') + 1));
 var arrParams = uerreele.split('?')[1].split('&');
 if (arrParams) 
 {           
  for (i=0;i<arrParams.length;i++) 
  {                   
   var param=arrParams[i].split('=');
   url += (sw == 1 ? Encode('&') : '');
   url += param[0] + Encode('=');
   if (unescape(param[1]) == param[1])
    url += Encode(param[1]);    
   else
    url += param[1];
   if (param.length == 3) url += Encode('=');
   sw = 1;
  }
 }
 return url;
}

//Esta función permite reemplazar todas las instancias
//de una cadena determinada en una cadena por otra
function ReplaceAll(s,c1,c2)
{
	var n = new String();	
	for (var i=0;i<s.length;i++)
	{
		if (s.substr(i,c1.length) != c1)
			n += s.substr(i,c1.length);
		else
			n += c2;		
	}	
	return n;
}

//Rellena una cadena por la izquierda
function PadLeft(String,Length,PadChar)
{ 
 String += ""       
 Length += ""       
 PadChar += ""      
 if((PadChar == "") || (!(PadChar.length == 1)))
  PadChar = " "
 var Count = 0
 var PadLength = 0
 Length = parseInt(0 + Length,10)
 if(Length <= String.length)
  return(String)
 PadLength = Length - String.length
 for(Count = 0; Count < PadLength; Count++)
  String = PadChar + String
 return(String)
}

//Esta función limpia los espacios en blanco de una cadena
function Trim(TRIM_VALUE)
{
 if(TRIM_VALUE.length < 1) 
  return ""; 
 TRIM_VALUE = RTrim(TRIM_VALUE);
 TRIM_VALUE = LTrim(TRIM_VALUE);
 if(TRIM_VALUE=="") 
  return ""; 
 else 
  return TRIM_VALUE;  
} 

//Esta función limpia los espacios en blanco de una cadena solo por la derecha
function RTrim(VALUE)
{
 var w_space = String.fromCharCode(32);
 var v_length = VALUE.length;
 var strTemp = "";
 if(v_length < 0)
  return"";
 var iTemp = v_length -1;
 while(iTemp > -1)
 {
  if(VALUE.charAt(iTemp) == w_space)
  {
  }
  else
  {
   strTemp = VALUE.substring(0,iTemp +1);
   break;
  }
  iTemp = iTemp-1;
 }
 return strTemp;
} 

//Esta función limpia los espacios en blanco de una cadena solo por la izquierda
function LTrim(VALUE)
{
 var w_space = String.fromCharCode(32);
 if(v_length < 1)
  return"";
 var v_length = VALUE.length;
 var strTemp = "";
 var iTemp = 0;
 while(iTemp < v_length)
 {
  if(VALUE.charAt(iTemp) == w_space)
  {
  }
  else
  {
   strTemp = VALUE.substring(iTemp,v_length);
   break;
  }
  iTemp = iTemp + 1;
 }
 return strTemp;
}

function ImagenElementoMenu(elemento,iconoPlegado,iconoDesplegado)
{
   var oImg;
   var oDD;
  
   oImg=document.getElementById("img"+elemento);
 
   if (oImg!=null)
   {
      //Obtener el elemento del menú 
      oDD=document.getElementById(elemento);
     
      if (oDD.id!='menuGenerico')
      {
          //Mostrar imagen según estado capa
          if (oDD.style.display=='none')
          {
           if (iconoPlegado!="")
             oImg.src=iconoPlegado;
          }
          else
          {
           if (iconoDesplegado!="")
            oImg.src=iconoDesplegado;
          }
      }
     
   }

}

function ActivarSeccionMenu(nivel,value,padre,iconoPlegado1,iconoDesplegado1,iconoPlegado2,iconoDesplegado2,nodoNivel1,estiloNivel1)
{

   var iPMP;
   var nodoPMP;
   var iPMPadre;
   var oDD;
   var iDD;

   //Construcción del elemento del menú 
   if (nivel==1)
   {
     iPMP= 'pms' + value;
   }
   else
   {
     iPMP= 'pmt' + value;
     iPMPadre='pms'+padre;
   }

   
   //Obtención de los elementos ul 
   oDD = document.getElementById('navegacion').getElementsByTagName('ul');
   
   //Obtención del elemento en curso
   iPMP = document.getElementById(iPMP);
   
   if (nivel==2)
    iPMPadre=document.getElementById(iPMPadre);
   

   for(i=0;i<oDD.length;i++)
   {
	 //Plegar o desplegar menú	
     if(oDD[i]==iPMP)
     {
       if (oDD[i].style.display=='block')
       {
         oDD[i].style.display = 'none';

         nodoPMP=document.getElementById('pmp'+nodoNivel1);
         if (nodoPMP!=null)
          if (nodoPMP.className==estiloNivel1+'Destacado')
           nodoPMP.className=estiloNivel1+'Destacado';
          else
           nodoPMP.className=estiloNivel1;
       }
       else
       {
         oDD[i].style.display = 'block';
    
          nodoPMP=document.getElementById('pmp'+nodoNivel1);
          if (nodoPMP!=null)
           if (nodoPMP.className==estiloNivel1+'Destacado')
                nodoPMP.className=estiloNivel1+'Destacado';
           else
                nodoPMP.className=estiloNivel1+'Activo';
         }
     }
     else
     {
       if (oDD[i].id!='menuGenerico')
       {
         oDD[i].style.display = 'none';
         nodoPMP=document.getElementById('pmp'+i);
          if (nodoPMP!=null)
           if (nodoPMP.className==estiloNivel1+'Destacado')
            nodoPMP.className=estiloNivel1+'Destacado';
           else
            nodoPMP.className=estiloNivel1;
       }
     }
     
     //Plegar o desplegar capas padre
     if (nivel==2)
     {
         if (oDD[i]==iPMPadre)
         {
           if (oDD[i].style.display=='block')
           {
             oDD[i].style.display = 'none';
           }
           else
           {
             oDD[i].style.display = 'block';
           }
         }
     }
     
     //Imagen asociada al elemento
     cadena=oDD[i].id.toString();
     cadena=cadena.substring(0,3); 
     
     if (cadena=='pms')
       ImagenElementoMenu(oDD[i].id,iconoPlegado1,iconoDesplegado1);
     else
       ImagenElementoMenu(oDD[i].id,iconoPlegado2,iconoDesplegado2);
     
   }


}	


function abrirPopup(ventana){
        switch (ventana){
	        case 1:
                window.open('../Popups/AvisoLegal.aspx','AvisoLegal','top=10,left=10,width=425,height=500,scrollbars=yes'); 
	        break;				
	        case 2:
                window.open('../Popups/PoliticaPrivacidad.aspx','PoliticiaPrivacidad','top=10,left=10,width=425,height=500,scrollbars=yes');     
	        break;
	        case 3:
                window.open('../Popups/Contacta.aspx','Contacta','top=10,left=10,width=425,height=200,scrollbars=no');     
	        break;
	    }
    }