<!--
// Página actual.
var msPagAct;

// Contenido del menú lateral.
var aMenuLateral = new Array();
// Contenido del menú lateral de administración.
var aAdmin = new Array();    			
  // Comprueba si el navegador es NetScape.
var mnNetScape = (navigator.appName == "Netscape");

// Contenido del menu lateral ==> ("Orden", "Identificador", "Descripción", "Enlace").
aMenuLateral[0] =  new Array("", "Id0", "Principal", "principal.php")
aMenuLateral[1] =  new Array("1", "Id1", "Fundación", "")
aMenuLateral[2] =  new Array("1.1", "Id2", "Presentación", "presenta.php")
aMenuLateral[3] =  new Array("1.2", "Id3", "Patronato", "patronato.php")
aMenuLateral[4] =  new Array("1.3", "Id4", "Estatutos", "estatutos.php")

aMenuLateral[5] =  new Array("2", "Id5", "Rafael Escolá", "")
aMenuLateral[6] =  new Array("2.1", "Id6", "Biografía", "biografia.php")
aMenuLateral[7] =  new Array("2.2", "Id7", "Bibliografía", "bibliografia.php")

aMenuLateral[8] =  new Array("3", "Id8", "Memoria de Actividades", "mem_actividades.php")

//aMenuLateral[5] =  new Array("1.4", "Id5", "Objetivos", "objetivos.php")

//aMenuLateral[6] =  new Array("2", "Id6", "Rafael Escolá", "")
//aMenuLateral[7] =  new Array("2.1", "Id7", "Biografía", "biografia.php")
//aMenuLateral[8] =  new Array("2.2", "Id8", "Bibliografía", "bibliografia.php")

//aMenuLateral[9] =   new Array("3", "Id9", "Premios y Becas", "")

//aMenuLateral[10] =  new Array("3.1", "Id10", "Premio<BR>Fundación<BR>Rafael Escolá<BR>a la Excelencia Universitaria", "")
//aMenuLateral[11] =  new Array("3.1.1", "Id11", "Presentación", "presen_pfunda.php")
//aMenuLateral[12] =  new Array("3.1.2", "Id12", "Tercera Edición", "convo_pfunda.php")
//aMenuLateral[13] =  new Array("3.1.3", "Id13", "Ediciones Anteriores", "edant_pfunda.php")

//aMenuLateral[14] =  new Array("3.2", "Id14", "Premio<BR/>Rafael Escolá<BR/>al Mejor Proyecto de Ingeniería", "")
//aMenuLateral[15] =  new Array("3.2.1", "Id15", "Presentación", "presen_prafael.php")
//aMenuLateral[16] =  new Array("3.2.2", "Id16", "Ediciones Anteriores", "edant_prafael.php")

//aMenuLateral[17] =  new Array("3.3", "Id17", "Beca Doctoral<BR>Fundación<BR>Rafael Escolá", "")
//aMenuLateral[18] =  new Array("3.3.1", "Id18", "Presentación", "presen_beca.php")
//aMenuLateral[19] =  new Array("3.3.2", "Id19", "Ediciones Anteriores", "edant_beca.php")

//aMenuLateral[20] =  new Array("3.4", "Id20", "Becas I+D", "")
//aMenuLateral[21] =  new Array("3.4.1", "Id21", "Presentación", "presen_bid.php")
//aMenuLateral[22] =  new Array("3.4.2", "Id22", "Patrocinadores y Colaboradores", "colabora_bid.php")
//aMenuLateral[23] =  new Array("3.4.3", "Id23", "Convocatoria 2009-2010", "convo_bid0910.php")
//aMenuLateral[24] =  new Array("3.4.4", "Id24", "Ediciones Anteriores", "edant_bid.php")
//aMenuLateral[25] =  new Array("3.4.5", "Id25", "Mapa de Investigaciones", "mapa_bid.php")
//aMenuLateral[26] =  new Array("3.4.6", "Id26", "Equipos I+D", "equipos_bid.php")

//aMenuLateral[27] =  new Array("3.5", "Id27", "Becas en<BR/>Colaboración", "")
//aMenuLateral[28] =  new Array("3.5.1", "Id28", "Beca Guardian<BR/>Rafael Escolá<BR/>2003-2005", "convo_bco.php")
//aMenuLateral[29] =  new Array("3.5.2", "Id29", "Beca EHAS<BR/>Rafael Escolá<BR/>2004-2005", "convo_bco_2.php")

//aMenuLateral[30] =  new Array("4", "Id30", "Cátedras", "")
//aMenuLateral[31] =  new Array("4.1", "Id31", "Cátedra<BR/>Rafael Escolá<BR/>de Ética Profesional<BR/>TECNUN", "")
//aMenuLateral[32] =  new Array("4.1.1", "Id32", "Presentación", "presen_catedra_1.php")
//aMenuLateral[33] =  new Array("4.1.2", "Id33", "Lecciones Conmemorativas", "lecciones_catedra_1.php")

//aMenuLateral[34] =  new Array("5", "Id34", "Seminarios", "")
//aMenuLateral[35] =  new Array("5.1", "Id35", "Seminarios I+D", "seminarios_i+d.php")

//aMenuLateral[36] =  new Array("6", "Id36", "Conferencias", "")
//aMenuLateral[37] =  new Array("6.1", "Id37", "Ciclo Ciencia Tecnología y Sociedad", "ciencia_tecnologia.php")
//aMenuLateral[38] =  new Array("6.2", "Id38", "Charlas Investigación", "charlas_investigacion.php")

//aMenuLateral[39] =  new Array("7", "Id39", "Noticias", "list_noticias.php")

//aMenuLateral[40] =  new Array("8", "Id40", "Memoria de Actividades", "mem_actividades.php")

//aMenuLateral[41] =  new Array("9", "Id41", "Eventos", "list_eventos.php")

//aMenuLateral[42] =  new Array("10", "Id42", "Convocatoria Becas I+D 2009-2010", "convo_bid0910.php")

// Contenido del menu lateral de Administración ==> ("Orden", "Identificador", "Descripción", "Enlace").
aAdmin[0] =  new Array("", "Id0", "Administración", "admin.php")

aAdmin[1] =  new Array("1", "Id1", "Seminarios", "")
aAdmin[2] =  new Array("1.1", "Id2", "Nuevo", "ges_sem.php")
aAdmin[3] =  new Array("1.2", "Id3", "Listado", "list_seminarios.php")

aAdmin[4] =  new Array("2", "Id4", "Noticias", "")
aAdmin[5] =  new Array("2.1", "Id5", "Nueva", "ges_noticias.php")
aAdmin[6] =  new Array("2.2", "Id6", "Listado", "list_noticias_admin.php")

aAdmin[7] =  new Array("3", "Id4", "Eventos", "")
// No tiene el uno para que no aparezca el logo de aeipro
aAdmin[8] =  new Array("3.2", "Id5", "Nuevo", "ges_eventos.php")
aAdmin[9] =  new Array("3.3", "Id6", "Listado", "list_eventos_admin.php")

aAdmin[10] =  new Array("4", "Id7", "Congresos", "")
aAdmin[11] =  new Array("4.1", "Id8", "Nuevo", "ges_congresos.php")
aAdmin[12] =  new Array("4.2", "Id9", "Listado", "list_congresos.php")

aAdmin[13] =  new Array("5", "Id10", "Enlaces", "")
aAdmin[14] =  new Array("5.1", "Id11", "Nuevo", "ges_enlaces.php")
aAdmin[15] =  new Array("5.2", "Id12", "Listado", "list_enlaces_admin.php")

aAdmin[16] =  new Array("6", "Id113", "Sugerencias", "list_sugerencias_admin.php")

function mObtieneFechaActual()
{
  var sMeses = new Array ("enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre");
  var objFecha = new Date();
  var nDia = objFecha.getDate();
  var nMes = objFecha.getMonth();
  var nAno = objFecha.getUTCFullYear();

  var sFecha = "" + nDia + " de " + sMeses[nMes] + " de " + nAno;
  return  sFecha;
}

function mHabilitaEvento(sEvento)
//==========================
//==  Habilita un evento  ==
//==========================
{
  if (document.layers) { document.captureEvents(Event.KEYPRESS); }
  eval("document.onkeypress = " + sEvento);
}

function mMuestra()
{
  if(mnNetScape)
	{
		document.lyrCabecera.visibility="show";
	}
}

function mMenuNs()
{
  if(mnNetScape)  // Navegador ==> NetScape.
	{
	document.writeln ("<DIV ID='lyrCabecera' CLASS='lyrCabecera'>");
	document.writeln ("<TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0'>");
	document.writeln ("<TR>");
	document.writeln ("<TD BGCOLOR='black'>");
	document.writeln ("<A CLASS='MenuPie' HREF='principal.php' ONMOUSEMOVE='mInsFraseBarraEstado();'><IMG SRC='images/logo_home.gif' WIDTH='21' HEIGHT='16' BORDER='0' VALIGN='Bottom' ALT='Fundaci&oacute;n Rafael Escol&aacute;'>Inicio</A>");
	document.writeln ("</TD>");
	document.writeln ("<TD ALIGN='center' CLASS='stlSeparador' WIDTH='10'>|</TD>");
	document.writeln ("<TD>");
	document.writeln ("<IMG SRC='images/spacer.gif' WIDTH='30' HEIGHT='1' BORDER='0' ALT=''>");
	document.writeln ("</TD>");
	document.writeln ("</TR>");
	document.writeln ("<TR>");
	document.writeln ("<TD BGCOLOR='black' COLSPAN='3'>&nbsp;");
	document.writeln ("<IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='140' BORDER='0' ALT=''><IMG SRC='images/spacer.gif' WIDTH='120' HEIGHT='1' BORDER='0' ALT=''>");
	document.writeln ("</TD>");
	document.writeln ("</TR>");
	document.writeln ("</TABLE>");
	document.writeln ("</DIV>");
	}
}

function mSoloNumeros(e)
//=======================================
//==  Solo permite introducir numeros  ==
//=======================================
{
  var sNumeros = "0123456789"

  if (document.layers)	// Ns.
  { 
    var sTecla = String.fromCharCode(e.which);
  }
  else	// IE.
  { 
    var sTecla = String.fromCharCode(event.keyCode);
  }

  // Cancela evento KeyPress.
  document.onkeypress = "";
  
  // Solo Numeros.
  if (sNumeros.indexOf(sTecla) >= 0) { return true; }
    return false;
}

function mSoloMonedas(e)
//===================================================
//==  Solo permite introducir valores para moneda  ==
//===================================================
{
  var sNumeros = "0123456789,"

  if (document.layers)	// Ns.
  { 
    var sTecla = String.fromCharCode(e.which);
  }
  else	// IE.
  { 
    var sTecla = String.fromCharCode(event.keyCode);
  }

  // Cancela evento KeyPress.
  document.onkeypress = "";

  // Solo Numeros.
  if (sNumeros.indexOf(sTecla) >= 0) { return true; }
    return false;
}

function mSoloLetras(e)
//======================================
//==  Solo permite introducir Letras  ==
//======================================
{
  var sLetras = "abcdefghijklmnñopqrstuvwxyz"

  if (document.layers)	// Ns.
  { 
    var sTecla = String.fromCharCode(e.which);
  }
  else	// IE.
  { 
    var sTecla = String.fromCharCode(event.keyCode);
  }

  // Cancela evento KeyPress.
  document.onkeypress = "";
  
  // Solo Letras.
  if (sLetras.indexOf(sTecla.toLowerCase()) >= 0) { return true; }
    return false;
}

function mSoloFecha(e)
//=======================================================
//==  Solo permite introducir caracteres de una fecha  ==
//=======================================================
{
  var sValFecha = "0123456789/"

  if (document.layers)	// Ns.
  { 
    var sTecla = String.fromCharCode(e.which);
  }
  else	// IE.
  { 
    var sTecla = String.fromCharCode(event.keyCode);
  }

  // Cancela evento KeyPress.
  document.onkeypress = "";
  
  // Solo Fecha.
  if (sValFecha.indexOf(sTecla) >= 0) { return true; }
    return false;
}

function mCompruebaFecha(sDia, sMes, sAno)
//=========================================
//==  Comprueba si la fecha es correcta  ==
//=========================================
{
  // Variable Local.
  var nResultado = 1;
  
  var nDia, nMes, nAno;
  // Convierte en enteros los valores recibidos.
  //nDia = parseInt(sDia);
  //nMes = parseInt(sMes);
  //nAno = parseInt(sAno);
	
  nDia = sDia;
  nMes = sMes;
  nAno = sAno;


  // Comprueba que la fecha este completa.
  if ( (nDia > 0 ) && (nMes > 0 ) && (nAno > 0 ) )
  {
    var nAnoBisiesto = 0;
    // Comprueba si el año es bisiesto.
    if ( (! (nAno % 400)) || ((! (nAno % 4)) && (nAno % 100)) ) { nAnoBisiesto = 1; }
    
		if ( (nDia < 1) || (nDia > 31) )
		{
      nResultado = 0;
		}
		else if ( (nMes < 1) || (nMes > 12) )
		{
      nResultado = 0;
		}
    else if ( (nAno < 1) || (sAno.length < 2)|| (sAno.length > 4) )
    {
      nResultado = 0;
    }
    else if ( (nMes == 2) && (nDia > 29) )
    {
      nResultado = 0;
    }
    else if ( (nMes == 2) && (nDia > 28) && (! nAnoBisiesto) )
    {
      nResultado = 0;
    }
    else if ( ((nMes == 4) || (nMes == 6) || (nMes == 9) || (nMes == 11)) && (nDia > 30) )
    {
      nResultado = 0;
    }
  }
	else if ( (nDia < 1 ) || (nMes < 1 ) || (nAno < 1 ) )
	{
      nResultado = 0;
	}

  // Valor de la funcion.
  return nResultado;
}

function mFormatCantidad(objCantidad)
//=============================
//==  Formatea una cantidad  ==
//=============================
{
  var nContador = 0;
  var nCantidad = objCantidad.value;
  var nCantAux = "";

	// Extrae los puntos de la cantidad.
	while (nCantidad.indexOf(".") != -1)
	{
		nCantidad = nCantidad.replace(".", "");
	}

	while (nCantidad.length > 3)
	{
		// Extrae tres caracteres por la derecha.
    nCantAux = "." + (nCantidad.substr(parseInt(nCantidad.length) - 3, 3)) + nCantAux;
		nCantidad = nCantidad.slice(0, -3);
	}
  
  objCantidad.value = nCantidad + nCantAux;
}

function mInsFraseBarraEstado()
//=====================================
//==  Escribe en la barra de estado  ==
//=====================================
{
	window.status = "Fundación Rafael Escolá";
}

function mInsEnlaces()
//====================================
//==  Inserta los Enlaces externos  ==
//====================================
{
  // Enlaces Externos.
  document.writeln("<TABLE HEIGHT='100%' WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0' ALIGN='left'>");
  document.writeln("<TR>");
  document.writeln("<TD HEIGHT='20'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='20' BORDER='0' ALT=''></TD>");
  document.writeln("</TR>");

  document.writeln("<TR>");
  document.writeln("<TD HEIGHT='53'>&nbsp;<A HREF='http://www.idom.es' onMouseMove='mInsFraseBarraEstado();'><IMG SRC='images/Idom.gif' WIDTH='115' HEIGHT='53' BORDER='0' ALT='Idom'></A></TD>");
  document.writeln("</TR>");

	// El enlace de AEIPro se muestra cuando la pag. está relacionada con el "premio rafael escolá".
	if (msPagAct.substr(0, 3) == "3.1")
	{
	  document.writeln("<TR>");
	  document.writeln("<TD HEIGHT='15'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='15' BORDER='0' ALT=''></TD>");
  	document.writeln("</TR>");

	  document.writeln("<TR>");
  	document.writeln("<TD HEIGHT='73'>&nbsp;<A HREF='http://www.aeipro.org' onMouseMove='mInsFraseBarraEstado();'><IMG SRC='images/aeipro_logo.gif' WIDTH='109' HEIGHT='73' BORDER='0' ALT='Asociación Española de Ingenería de Proyectos'></A></TD>");
	  document.writeln("</TR>");
	}
	
  document.writeln("<TR>");
  document.writeln("<TD HEIGHT='15'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='15' BORDER='0' ALT=''></TD>");
  document.writeln("</TR>");

  document.writeln("<TR>");
  document.writeln("<TD HEIGHT='45'>&nbsp;<A HREF='http://www.universia.es' onMouseMove='mInsFraseBarraEstado();'><IMG SRC='images/universia.gif' WIDTH='115' HEIGHT='45' BORDER='0' ALT='Universia'></A></TD>");
  document.writeln("</TR>");

  document.writeln("<TR>");
  document.writeln("<TD HEIGHT='15'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='40' BORDER='0' ALT=''></TD>");
  document.writeln("</TR>");

  document.writeln("<TR>");
  document.writeln("<TD HEIGHT='45'>&nbsp;<A HREF='http://www.funiversitas.es' onMouseMove='mInsFraseBarraEstado();'><IMG SRC='images/funiversitas.gif' WIDTH='113' HEIGHT='86' BORDER='0' ALT='Fundación Universitas'></A></TD>");
  document.writeln("</TR>");

  document.writeln("<TR>");
  document.writeln("<TD HEIGHT='100%'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='1' BORDER='0' ALT=''></TD>");;
  document.writeln("</TR>");
	document.writeln("</TABLE>");
}


function mValCapa(sCapa, aValores, mnPag, nContraer)
//==================================================
//==  Obtiene los valores de la capa de un array  ==
//==================================================
{
  var mnContador, msReferencia, msTxtRefeenxcia, msTxtId, msOrden, Count, pos, msImg;
	var objCapa, mnContraer, msClase;
	var sContMenu = "";		// Almacena el menú.

	// Almacena el contenido del menú en una variable.
  sContMenu = ("<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0' ALIGN='left' BGCOLOR='#000000'>");
    
  for (mnContador = 1; mnContador < aValores.length; mnContador++)
  {
    msOrden = aValores[mnContador][0];
    msTxtId = aValores[mnContador][1];
    msTxtReferencia = aValores[mnContador][2];
    msReferencia = aValores[mnContador][3];

		if (msOrden == msPagAct)
		{
			msClase = "stlMenuSel";
		}
		else
		{
			msClase = "stlMenu";
		}

		// si es la Pag. Actual y no esta contraido, se contrae el menu;
		if ((msOrden == mnPag.substr(0, msOrden.length)) && (nContraer != true) )
		{
			mnContraer = true;
			if (msReferencia=="")	{	msImg="minus.gif";	}
			else{msImg="leaf2.gif";}
		}
		else if ( (msOrden == mnPag.substr(0, msOrden.length)) && (msOrden != mnPag) )
		{
			mnContraer = true;
			if (msReferencia=="")	{	msImg="minus.gif";	}
			else{msImg="leaf2.gif";}
		}
		else
		{
			mnContraer = false;
			if (msReferencia=="")	{	msImg="plus.gif";	}
			else{msImg="leaf2.gif";}
		}

		// Si no tine Valor la referencia.
		if (msReferencia == "")
		{
			if (aValores == aMenuLateral)
			{
				msReferencia = ("javascript:mValCapa('" + sCapa + "', aMenuLateral, '" + msOrden + "', " + mnContraer + ")")
			}
			else
			{
				msReferencia = ("javascript:mValCapa('" + sCapa + "', aAdmin, '" + msOrden + "', " + mnContraer + ")")
			}
		}

		// Obtiene el numero de Submenús (Cada punto(.) representa un nivel).
		// Solo se presentan tres niveles.
		count = 0;
		pos = msOrden.indexOf(".");
		while ( pos != -1 )
		{
			count ++;
			pos = msOrden.indexOf(".", pos+1);
		}
	
		// Según el número de niveles.
		switch (parseInt(count))
		{
			case 0:
				  // Si es la pag. actual.
		    	if (msOrden == msPagAct)
		      {
		        sContMenu = sContMenu + ("<TR>");
		        sContMenu = sContMenu + ("<TD COLSPAN='4' CLASS='" + msClase +"' HEIGHT='10'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='10' BORDER='0' ALT=''></TD>");
		        sContMenu = sContMenu + ("</TR>");
		        sContMenu = sContMenu + ("<TR>");
		        sContMenu = sContMenu + ("<TD VALIGN='TOP' HEIGHT='15'><IMG SRC='images/" + msImg +"' WIDTH='11' HEIGHT='12' BORDER='0'></TD>");
		        sContMenu = sContMenu + ("<TD COLSPAN='3' HEIGHT='15'><A CLASS='" + msClase + "' onMouseMove='mInsFraseBarraEstado();'>" + msTxtReferencia + "</A></TD>");
		        sContMenu = sContMenu + ("</TR>");
		      }
		      else
		      {
		        sContMenu = sContMenu + ("<TR>");
		        sContMenu = sContMenu + ("<TD COLSPAN='4' CLASS='" + msClase +"' HEIGHT='10'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='10' BORDER='0' ALT=''></TD>");
		        sContMenu = sContMenu + ("</TR>");
		        sContMenu = sContMenu + ("<TR>");
		        sContMenu = sContMenu + ("<TD VALIGN='TOP' HEIGHT='15'><A HREF=\"" + msReferencia + "\" onMouseMove='mInsFraseBarraEstado();'><IMG SRC='images/" + msImg +"' WIDTH='11' HEIGHT='12' BORDER='0'></A></TD>");
		        sContMenu = sContMenu + ("<TD COLSPAN='3' HEIGHT='15'><A HREF=\"" + msReferencia + "\" CLASS='" + msClase +"' onMouseMove='mInsFraseBarraEstado();'>" + msTxtReferencia + "</A></TD>");
		        sContMenu = sContMenu + ("</TR>");
		      }
			break;
			
			case 1:
				// si no se contrae
				if ( (nContraer == false) || (msOrden.substr(0, 1) != mnPag ) )
				{
					if (msOrden.substr(0, 1) == mnPag.substr(0, 1))
					{
		         sContMenu = sContMenu + ("<TR>");
		         sContMenu = sContMenu + ("<TD COLSPAN='4' CLASS='" + msClase +"' WIDTH='125' HEIGHT='5'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='5' BORDER='0' ALT=''></TD>");
		         sContMenu = sContMenu + ("</TR>");
		         sContMenu = sContMenu + ("<TR>");
		         sContMenu = sContMenu + ("<TD CLASS='" + msClase +"' HEIGHT='5'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='5' BORDER='0' ALT=''></TD>");
	
		         // Si es la pag. actual.
	
		    		 if (msOrden == msPagAct)
		         {
		           sContMenu = sContMenu + ("<TD VALIGN='TOP' HEIGHT='10' WIDTH='11'><IMG SRC='images/" + msImg +"' WIDTH='11' HEIGHT='12' BORDER='0'></TD>");
		           sContMenu = sContMenu + ("<TD HEIGHT='5' COLSPAN='2'> <A CLASS='" + msClase +"' onMouseMove='mInsFraseBarraEstado();'>" + msTxtReferencia + "</A></TD>");
		         }
		         else
		         {
		           sContMenu = sContMenu + ("<TD VALIGN='TOP' HEIGHT='10' WIDTH='11'><A HREF=\"" + msReferencia + "\" onMouseMove='mInsFraseBarraEstado();'><IMG SRC='images/" + msImg +"' WIDTH='11' HEIGHT='12' BORDER='0'></A></TD>");
		           sContMenu = sContMenu + ("<TD HEIGHT='5' COLSPAN='2'> <A HREF=\"" + msReferencia + "\" CLASS='" + msClase +"' onMouseMove='mInsFraseBarraEstado();'>" + msTxtReferencia + "</A></TD>");
		         }
	
		         sContMenu = sContMenu + ("</TR>");
					}
				}
			break;
			
			case 2:
				if ( (nContraer == false) || (msOrden.substr(0, 3) != mnPag ) )
				{
					if (msOrden.substr(0, 3) == mnPag.substr(0, 3))
					{
		         sContMenu = sContMenu + ("<TR>");
		         sContMenu = sContMenu + ("<TD COLSPAN='4' CLASS='" + msClase +"' WIDTH='125' HEIGHT='5'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='5' BORDER='0' ALT=''></TD>");
		         sContMenu = sContMenu + ("</TR>");
		         sContMenu = sContMenu + ("<TR>");
		         sContMenu = sContMenu + ("<TD CLASS='" + msClase +"' HEIGHT='5'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='5' BORDER='0' ALT=''></TD>");
		         sContMenu = sContMenu + ("<TD CLASS='" + msClase +"' HEIGHT='5'><IMG SRC='images/spacer.gif' WIDTH='1' HEIGHT='5' BORDER='0' ALT=''></TD>");
		
		         // Si es la pag. actual.
		         if (msOrden == msPagAct)
		         {
		           sContMenu = sContMenu + ("<TD VALIGN='midle' HEIGHT='10'><IMG SRC='images/" + msImg +"' WIDTH='11' HEIGHT='12' BORDER='0'></TD>");
		           sContMenu = sContMenu + ("<TD HEIGHT='5'><A CLASS='" + msClase +"' onMouseMove='mInsFraseBarraEstado();'>" + msTxtReferencia + "</A></TD>");
		         }
		         else
		         {
		           sContMenu = sContMenu + ("<TD VALIGN='TOP' HEIGHT='10'><A HREF=\"" + msReferencia + "\" onMouseMove='mInsFraseBarraEstado();'><IMG SRC='images/" + msImg +"' WIDTH='11' HEIGHT='12' BORDER='0'></A></TD>");
		           sContMenu = sContMenu + ("<TD HEIGHT='5'><A HREF=\"" + msReferencia + "\" CLASS='" + msClase +"' onMouseMove='mInsFraseBarraEstado();'>" + msTxtReferencia + "</A></TD>");
		         }
		
		         sContMenu = sContMenu + ("</TR>");
					}
				}
			break;
		}
	}
	
	// Para que funcione en NetScape tiene que tener las cuatro filas del ColSpan.
  sContMenu = sContMenu + ("<TR>");
  sContMenu = sContMenu + ("<TD HEIGHT='100%' WIDTH='12'><IMG SRC='images/spacer.gif' WIDTH='11' HEIGHT='1' BORDER='0' ALT=''></TD>");
  sContMenu = sContMenu + ("<TD HEIGHT='100%' WIDTH='12'><IMG SRC='images/spacer.gif' WIDTH='11' HEIGHT='1' BORDER='0' ALT=''></TD>");
  sContMenu = sContMenu + ("<TD HEIGHT='100%' WIDTH='12'><IMG SRC='images/spacer.gif' WIDTH='11' HEIGHT='1' BORDER='0' ALT=''></TD>");
  sContMenu = sContMenu + ("<TD HEIGHT='100%' WIDTH='89'><IMG SRC='images/spacer.gif' WIDTH='86' HEIGHT='1' BORDER='0' ALT=''></TD>");
  sContMenu = sContMenu + ("</TR>");
  
  sContMenu = sContMenu + ("</TABLE>");

	// Escribe los valores.
	mPintaCapa("", sCapa, sContMenu);
}

function mPintaCapa(lyrReferencia, sCapa, sTexto)
//========================
//==  Escribe una capa  ==
//========================
{
	if (mnNetScape)
	{
		var PosX = parseInt(self.pageYOffset);
		var PosY = parseInt(self.pageYOffset);
		var nAlto = parseInt(self.innerWidth);
		if (lyrReferencia != "")
		{
			var objCapa = eval("document." + lyrReferencia + ".document." + sCapa + ".document");
		}
		else { var objCapa = document.layers[sCapa].document; }
		
		objCapa.open();
		objCapa.writeln(sTexto);
		objCapa.close();
		// Realiza un Scroll para que repinte la ventana. == scrollBy(horizontal, vertical)==
		//if (lyrReferencia!="lyrFecha")
		//{
		//	scrollTo(PosX, nAlto)  // Fin.
		//	scrollTo(PosX, 0)     // Inicio.
		//	scrollTo(PosX, PosY)   // Posición inicial.
		//}
	}
	else
	{
    var objCapa = document.all[sCapa];
		objCapa.innerHTML = sTexto;
	}

}

function mCompruebaEmail(msEmail)
//========================================
//==  Comprueba el formato de un Email  ==
//========================================
{
	var nError = 0;

	if (msEmail.length < 5) { nError = 1; }
	else if (msEmail.indexOf("@", 1) == -1) { nError = 1; }
	else if (msEmail.indexOf(".", 3) == -1) { nError = 1; }
	else if (msEmail.indexOf(".", parseInt(msEmail.indexOf("@")) + 1) == -1) { nError = 1; }
	else if ((parseInt(msEmail.indexOf(".", parseInt(msEmail.indexOf("@")) + 1)) + 1) >= msEmail.length)
	{
 		nError = 1;
 	}

	return(nError);
}
//-->
