var sw = 0 ;

function popup(activar, menu)
{
	if (document.all)
		document.all.tags('div')[menu].style.visibility = (activar == 0) ? 'hidden' : 'visible';
	else if (document.layers)
		document.layers[menu].visibility = (activar == 0) ? 'hide' : 'show';
	else if (document.getElementById(menu))
		document.getElementById(menu).style.visibility = (activar == 0) ? 'hidden' : 'visible';
}

function SMCerrar()
{
	popup(0, 'SMCorporacion');
	popup(0, 'SMNuestraCiudad');
	popup(0, 'SMServicios');
	popup(0, 'SMCertamenes');
	popup(0, 'SMDepartamentos');

	SMCerrarN2();
}

function SMCerrarN2()
{
	popup(0, 'SMCreacionJoven');
	popup(0, 'SMDiazHierro');
	popup(0, 'SMSalonOtono');
}

function write_menus() {

// ------------------> Menu Principal
if (document.layers)
	document.write('<Layer name="MenuPrincipal" Left=0 Top=0 Width=770 height=25 z-index=1 bgcolor=Black visibility="show">');	
else
	document.write('<div id="MenuPrincipal" style="position:absolute; left:0; top:0; width:770; height:25; z-index:1; background-color: #0099FF; layer-background-color: Black; border: 1px none #000000; overflow: hidden; visibility: visible">');

document.write('	<table width="770">');
document.write('	  <tr>');
document.write('	  	<td><a href="#" onClick="SMCerrar(); if (sw==1) sw=0; else {sw=1; popup(1, \'SMCorporacion\');}">Corporaci&oacute;n</a></td>');
document.write('		<td><a href="#" onClick="SMCerrar(); if (sw==2) sw=0; else {sw=2;  popup(1, \'SMNuestraCiudad\');}">Nuestra Ciudad</a></td>');
document.write('  		<td><a href="#" onClick="SMCerrar(); if (sw==3) sw=0; else {sw=3;  popup(1, \'SMServicios\');}" >Servicios</a></td>');
document.write('  		<td><a href="#" onClick="SMCerrar(); if (sw==4) sw=0; else {sw=4;  popup(1, \'SMCertamenes\');}">Cert&aacute;menes</a></td>');
document.write('  		<td><a href="#" onClick="SMCerrar(); if (sw==5) sw=0; else {sw=5;  popup(1, \'SMDepartamentos\');}">Departamentos y Patronatos Municipales</a></td>');
document.write('		<td><a href="mapa_del_web.html" target="VPrincipal">Mapa del Web</a></td>');
document.write('	  </tr>');
document.write('	</table>');

if (document.layers) document.write('</Layer>');
else document.write('</div>');

// ------------------> Submenu Corporacion
if (document.layers)
	document.write('<Layer name="SMCorporacion" Left=0 Top=25 Width=175 height=42 z-index=2 bgcolor=Black visibility="hidden">');
else
	document.write('<div id="SMCorporacion" style="position:absolute; left:0; top:25; width:175; height:42; z-index:2; background-color: Black; layer-background-color: Black; border: 1px none #000000; overflow: hidden; visibility: hidden"> ');

document.write('  <table width="175">');
document.write('  	<tr><td class="celda"> <font color="white"> <a onClick="SMCerrar();" href="saluda.html" target="VPrincipal">Saluda</a></font></td></tr>');
document.write('	<tr><td class="celda">  <font color="white"><a onClick="SMCerrar();" href="corporacion_mpal.html" target="VPrincipal"> Corporaci&oacute;n Municipal</a></font></td></tr>');
document.write('  </table>');

if (document.layers) document.write('</Layer>');
else document.write('</div>');

// ------------------> Submenu Nuestra Ciudad
if (document.layers)
	document.write('<Layer name="SMNuestraCiudad" Left=95 Top=25 Width=150 height=82 z-index=3 bgcolor=Black visibility="hidden">');
else
	document.write('<div id="SMNuestraCiudad" style="position:absolute; left:95; top:25; width:150; height:82; z-index:3; background-color: Black; layer-background-color: Black; border: 1px none #000000; overflow: hidden; visibility: hidden">');

document.write('  <table width="150">');
document.write('    <tr><td class="celda"> <font color="white"><a href="informacion_gral01.html" onClick="SMCerrar();" target="VPrincipal">Informaci&oacute;n General</a></font></td></tr>');
document.write('    <tr><td class="celda"> <font color="white"><a onClick="SMCerrar();" href="historia.html" target="VPrincipal">Historia</a></font></td></tr>');
document.write('    <tr><td class="celda"> <font color="white"><a onClick="SMCerrar();" href="turismo01.html" target="VPrincipal">Turismo</a></font></td></tr>');
document.write('    <tr><td class="celda"> <font color="white"><a onClick="SMCerrar();" href="callejero01.html" target="VPrincipal">Callejero</a></font></td></tr>');
document.write('  </table>');

if (document.layers) document.write('</Layer>');
else document.write('</div>');

// ------------------> Submenu Servicios
if (document.layers)
	document.write('<Layer name="SMServicios" Left=200 Top=25 Width=175 height=62 z-index=4 bgcolor=#0099FF visibility="hidden">');
else
	document.write('<div id="SMServicios" style="position:absolute; left:200; top:25; width:175; height:62; z-index:4; background-color: Black; layer-background-color: Black; border: 1px none #000000; visibility: hidden; overflow: hidden"> ');
document.write('  <table width="175">');
document.write('    <tr><td class="celda"><a onClick="SMCerrar();" href="telefonos_interes.html" target="VPrincipal">Tel&eacute;fonos de Inter&eacute;s</a></td></tr>');
document.write('    <tr><td class="celda"><a onClick="SMCerrar();" href="buscadores.html" target="VPrincipal">Buscadores / Portales</a></td></tr>');
document.write('    <tr><td class="celda"><a onClick="SMCerrar();" href="enlaces_oficiales.html" target="VPrincipal">Enlaces Oficiales</a></td></tr>');
document.write('  </table>');

if (document.layers) document.write('</Layer>');
else document.write('</div>');

// ------------------> Submenu Certamenes
if (document.layers)
	document.write('<Layer name="SMCertamenes" Left=275 Top=25 Width=275 height=62 z-index=5 bgcolor=#0099FF visibility="hidden">');
else
	document.write('<div id="SMCertamenes" style="position:absolute; left:275; top:25; width:275; height:62; z-index:5; background-color: Black; layer-background-color: Black; border: 1px none #000000; overflow: hidden; visibility: hidden"> ');
document.write('  <table width="275">');
document.write('    <tr><td class="celda"><a href="#" onMouseOver="SMCerrarN2(); popup(1, \'SMCreacionJoven\');">Cert&aacute;men Regional de Creaci&oacute;n J&oacute;ven &raquo;</a></td></tr>');
document.write('    <tr><td class="celda"><a href="#" onMouseOver="SMCerrarN2(); popup(1, \'SMDiazHierro\');">Premio &quot;D&iacute;az Hierro de Investigaci&oacute;n&quot; &raquo;</a></td></tr>');
document.write('    <tr><td class="celda"><a href="#" onMouseOver="SMCerrarN2(); popup(1, \'SMSalonOtono\');">&quot;Sal&oacute;n de Oto&ntilde;o&quot; de Pintura &raquo;</a></td></tr>');
document.write('  </table>');

if (document.layers) document.write('</Layer>');
else document.write('</div>');

// ------------------> Submenu Certamen Creacion Joven
if (document.layers)
	document.write('<Layer name="SMCreacionJoven" Left=548 Top=40 Width=165 height=22 z-index=6 bgcolor=#0099FF visibility="hidden">');
else
	document.write('<div id="SMCreacionJoven" style="position:absolute; left:548; top:40px; width:165; height:22; z-index:6; background-color: Black; layer-background-color: Black; border: 1px none #000000; overflow: hidden; visibility: hidden"> ');
document.write('  <table width="165">');
document.write('    <tr>');
document.write('      <td class="celda"><a onClick="SMCerrar();" href="creacion_joven_2000.html" target="VPrincipal">Convocatoria ');
document.write('        A&ntilde;o 2000</a></td>');
document.write('    </tr>');
document.write('  </table>');

if (document.layers) document.write('</Layer>');
else document.write('</div>');

// ------------------> Submenu Premio Diaz Hierro de Investigacion
if (document.layers)
	document.write('<Layer name="SMDiazHierro" Left=548 Top=62 Width=165 height=102 z-index=7 bgcolor=#0099FF visibility="hidden">');
else
	document.write('<div id="SMDiazHierro" style="position:absolute; left:548; top:62; width:165; height:102; z-index:7; background-color: Black; layer-background-color: Black; border: 1px none #000000; overflow: hidden; visibility: hidden"> ');
document.write('  <table width="165">');
document.write('    <tr>');
document.write('      <td class="celda"><a onClick="SMCerrar();" href="premio_diaz_hierro_2000.html" target="VPrincipal">Convocatoria ');
document.write('        A&ntilde;o 2000</a></td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('      <td class="celda"><a onClick="SMCerrar();" href="premio_diaz_hierro_2001.html" target="VPrincipal">Convocatoria ');
document.write('        A&ntilde;o 2001</a></td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('      <td class="celda"><a onClick="SMCerrar();" href="premio_diaz_hierro_2002.html" target="VPrincipal">Convocatoria ');
document.write('        A&ntilde;o 2002</a></td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('      <td class="celda"><a onClick="SMCerrar();" href="premio_diaz_hierro_2003.html" target="VPrincipal">Convocatoria ');
document.write('        A&ntilde;o 2003</a></td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('      <td class="celda"><a onClick="SMCerrar();" href="premio_diaz_hierro_jurados_premiados.html" target="VPrincipal">Jurado y Ganadores');
document.write('        </a></td>');
document.write('    </tr>');
document.write('  </table>');

if (document.layers) document.write('</Layer>');
else document.write('</div>');

// ------------------> Submenu Salon Otono de Pintura
if (document.layers)
	document.write('<Layer name="SMSalonOtono" Left=548 Top=82 Width=165 height=82 z-index=8 bgcolor=#0099FF visibility="hidden">');
else
	document.write('<div id="SMSalonOtono" style="position:absolute; left:548; top:82; width:165; height:82; z-index:8; background-color: Black; layer-background-color: Black; border: 1px none #000000; overflow: hidden; visibility: hidden"> ');
document.write('  <table width="165">');
document.write('    <tr>');
document.write('      <td class="celda"><a onClick="SMCerrar();" href="salon_pintura_2000.html" target="VPrincipal">Convocatoria ');
document.write('        A&ntilde;o 2000</a></td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('      <td class="celda"><a onClick="SMCerrar();" href="salon_pintura_2001.html" target="VPrincipal">Convocatoria ');
document.write('        A&ntilde;o 2001</a></td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('      <td class="celda"><a onClick="SMCerrar();" href="salon_pintura_2002.html" target="VPrincipal">Convocatoria ');
document.write('        A&ntilde;o 2002</a></td>');
document.write('    </tr>');
document.write('    <tr>');
document.write('      <td class="celda"><a onClick="SMCerrar();" href="salon_pintura_2003.html" target="VPrincipal">Convocatoria ');
document.write('        A&ntilde;o 2003</a></td>');
document.write('    </tr>');
document.write('  </table>');

if (document.layers) document.write('</Layer>');
else document.write('</div>');

// ------------------> Submenu Departamentos
if (document.layers)
	document.write('<Layer name="SMDepartamentos" Left=320 Top=25 Width=400 height=222 z-index=9 bgcolor=#0099FF visibility="hidden">');
else
	document.write('<div id="SMDepartamentos" style="position:absolute; left:320; top:25; width:400; height:222; z-index:9; background-color: Black; layer-background-color: Black; border: 1px none #000000; visibility: hidden; overflow: hidden"> ');
document.write('  <table width="400">');
document.write('    <tr><td Class="celda"><a OnClick="SMCerrar(); sw=0;" href="archivo/home.html" target="_top">Archivo y Hemeroteca Municipal</a></td></tr>');
document.write('    <tr><td Class="celda"><a OnClick="SMCerrar(); sw=0;" href="juventud/home.html" target="_blank">Centro de Informaci&oacute;n Juvenil</a></td></tr>');
document.write('    <tr><td Class="celda"><a OnClick="SMCerrar(); sw=0;" href="cesh/home.html" target="_top">Consejo Econ&oacute;mico y Social Ciudad de Huelva</a></td></tr>');
document.write('    <tr><td Class="celda"><a OnClick="SMCerrar(); sw=0;" href="http://www.festicinehuelva.com" target="_blank">Festival de Cine Iberoamericano</a></td></tr>');
document.write('    <tr><td Class="celda"><a OnClick="SMCerrar(); sw=0;" href="gmu/home.html" target="_blank">Gerencia Municipal de Urbanismo</a></td></tr>');
document.write('    <tr><td Class="celda"><a OnClick="SMCerrar(); sw=0;" href="juntaarbitral/home.html" target="_top">Junta Arbitral Municipal de Consumo</a></td></tr>');
document.write('    <tr><td Class="celda"><a OnClick="SMCerrar(); sw=0;" href="http://www.agendalocal21huelva.com" target="_blank">Medio Ambiente</a></td></tr>');
document.write('    <tr><td Class="celda"><a OnClick="SMCerrar(); sw=0;" href="omic/home.html" target="_top">Oficina Municipal de Informaci&oacute;n al Consumidor</a></td></tr>');
document.write('    <tr><td Class="celda"><a OnClick="SMCerrar(); sw=0;" href="pdl/home.html" target="_blank">Patronato de Desarrollo Local y Turismo</a></td></tr>');
document.write('    <tr><td Class="celda"><a OnClick="SMCerrar(); sw=0;" href="huelvaenaccion/home.html" target="_blank">Proyecto Comunitario URBAN</a></td></tr>');
document.write('    <tr><td Class="celda"><a OnClick="SMCerrar(); sw=0;" href="servicios_sociales/home.html" target="_blank">Servicios Sociales</a></td></tr>');
document.write('  </table>');

if (document.layers) document.write('</Layer>');
else document.write('</div>');
}