function MM_preloadImages() { //v3.0
  var d=document;
  if(d.images){ 
  	if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
	for(i=0; i<a.length; i++) {
    	if (a[i].indexOf("#")!=0){
			d.MM_p[j]=new Image;
			d.MM_p[j++].src=a[i];
		}
	}
  }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr;
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++){
  	x.src=x.oSrc;
  }
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments;
  document.MM_sr=new Array;
  for(i=0;i<(a.length-2);i+=3) {
  	if ((x=MM_findObj(a[i]))!=null){
	  document.MM_sr[j++]=x;
	  if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
  	}
  }
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function GeneraDiv(){
document.write ('<div id="N1Sitio">');
document.write ('	<table width="139" cellpadding="0" cellspacing="0">');
document.write ('		<tr>');
document.write ('			<td height="25" ><a href="Fotos.html"><img src="Images/BotonesMnGeneral/BoFotos_Off.gif" alt="Fotos" name="ImgFotos_Off" width="139" height="25" border="0" id="ImgBoFotos_Off" longdesc="Fotos de Ceceda" onmouseover=MM_swapImage("ImgBoFotos_Off","","Images/BotonesMnGeneral/BoFotos_On.gif",1) onmouseout="MM_swapImgRestore()" /></a></td>');
document.write ('		</tr>');
document.write ('	</table>');
document.write ('</div>');

document.write ('<div id="N1Turismo">');
document.write ('	<table width="139" cellspacing="0" cellpadding="0">');
document.write ('		<tr>');
document.write ('			<td height="25" ><a href="ComoLlegar.html"><img src="Images/BotonesMnGeneral/BoComoLlegar_Off.gif" alt="C&oacute;mo Llegar" name="ImgBoComoLlegar_Off" width="139" height="25" border="0" id="ImgBoComoLlegar_Off" longdesc="Como llegar a Ceceda" onmouseover=MM_swapImage("ImgBoComoLlegar_Off","","Images/BotonesMnGeneral/BoComoLlegar_On.gif",1) onmouseout="MM_swapImgRestore()" /></a></td>');
document.write ('		</tr>');
document.write ('		<tr>');
document.write ('			<td height="25"><a href="ComerDormir.html"><img src="Images/BotonesMnGeneral/BoComeryDormir_Off.gif" alt="Comer y Dormir" name="ImgBoComerDormir_Off" width="139" height="25" border="0" id="ImgBoComerDormir_Off" longdesc="Comer y dormir en Ceceda" onmouseover=MM_swapImage("ImgBoComerDormir_Off","","Images/BotonesMnGeneral/BoComeryDormir_On.gif",1) onmouseout="MM_swapImgRestore()" /></a></td>');
document.write ('		</tr>');
document.write ('		<tr>');
document.write ('			<td height="25"><a href="Excursiones.html"><img src="Images/BotonesMnGeneral/BoExcursionesyRutas_Off.gif" alt="Excursiones" name="ImgBoExcursionesyRutas_Off" width="139" height="25" border="0" id="ImgBoExcursionesyRutas_Off" longdesc="Excursiones y rutas alrededor de Ceceda" onmouseover=MM_swapImage("ImgBoExcursionesyRutas_Off","","Images/BotonesMnGeneral/BoExcursionesyRutas_On.gif",1) onmouseout="MM_swapImgRestore()" /></td>');
document.write ('		</tr>');
document.write ('		<tr>');
document.write ('			<td height="25"><a href="Fiestas.html"><img src="Images/BotonesMnGeneral/BoFiestas_Off.gif" alt="Fiestas" name="ImgBoFiestas_Off" width="139" height="25" border="0" id="ImgBoFiestas_Off" longdesc="Fiestas de Ceceda" onmouseover=MM_swapImage("ImgBoFiestas_Off","","Images/BotonesMnGeneral/BoFiestas_On.gif",1) onmouseout="MM_swapImgRestore()" /></td>');
document.write ('		</tr>');
document.write ('	</table>');
document.write ('</div>');

document.write ('<div id="N1Historia">');
document.write ('	<table width="139" cellspacing="0" cellpadding="0">');
document.write ('		<tr>');
document.write ('			<td height="25"><a href="EnObras.html"><img src="Images/BotonesMnGeneral/BoPaseoHistorico_Off.gif" name="ImgBoPaseoHistorico_Off" width="139" border="0" height="25" id="ImgBoPaseoHistorico_Off" onmouseover=MM_swapImage("ImgBoPaseoHistorico_Off","","Images/BotonesMnGeneral/BoPaseoHistorico_On.gif",1) onmouseout="MM_swapImgRestore()" /></td>');
document.write ('		</tr>');
/*
document.write ('		<tr>');
document.write ('			<td height="25"><a href="EnObras.html"><img src="Images/BotonesMnGeneral/BoSitiosyRincones_Off.gif" alt="Sitios y rincones" name="ImgBoSitiosRincones_Off" width="139" border="0" height="25" id="ImgBoSitiosRincones_Off" longdesc="sitios, rincones y monumentos de Ceceda" onmouseover=MM_swapImage("ImgBoSitiosRincones_Off","","Images/BotonesMnGeneral/BoSitiosyRincones_On.gif",1) onmouseout="MM_swapImgRestore()" /></td>');
document.write ('		</tr>');
*/
document.write ('		<tr>');
document.write ('			<td height="25"><a href="DocumentosCeceda.html"><img src="Images/BotonesMnGeneral/BoDocumentosCeceda_Off.gif" alt="Documentos Ceceda" name="ImgBoDocumentosCeceda_Off" width="139" border="0" height="25" border="0" id="ImgBoDocumentosCeceda_Off" longdesc="Documentos antiguos de Ceceda" onmouseover=MM_swapImage("ImgBoDocumentosCeceda_Off","","Images/BotonesMnGeneral/BoDocumentosCeceda_On.gif",1) onmouseout="MM_swapImgRestore()" /></a></td>');
document.write ('		</tr>');
document.write ('	</table>');
document.write ('</div>');

document.write ('<div id="N1Foro">');
document.write ('	<table width="139" cellpadding="0" cellspacing="0">');
document.write ('		<tr>');
document.write ('			<td height="25" ><a href="Contactar.html"><img src="Images/BotonesMnGeneral/BoContactar_Off.gif" alt="Contactar" name="ImgBoContactar_Off" width="139" height="25" border="0" id="ImgBoContactar_Off" longdesc="Env&iacute;a tus comentarios" onmouseover=MM_swapImage("ImgBoContactar_Off","","Images/BotonesMnGeneral/BoContactar_On.gif",1) onmouseout="MM_swapImgRestore()" /></a></td>');
document.write ('		</tr>');
document.write ('		<tr>');
document.write ('			<td height="25" ><a href="http://escabecheru.foroes.net/"><img src="Images/BotonesMnGeneral/BoEntrarEnForo_Off.gif" alt="Entrar en el foro" name="ImgBoEntraEnForo_Off" width="139" height="25" border="0" id="ImgBoEntraEnForo_Off" longdesc="Entrar en el foro" onmouseover=MM_swapImage("ImgBoEntraEnForo_Off","","Images/BotonesMnGeneral/BoEntrarEnForo_On.gif",1) onmouseout="MM_swapImgRestore()" /></a></td>');
document.write ('		</tr>');
document.write ('	</table>');
document.write ('</div>');

document.write ('<div id="N1Varios">');
document.write ('	<table width="139" cellpadding="0" cellspacing="0">');
document.write ('		<tr>');
document.write ('			<td height="25" ><a href="Enlaces.html"><img src="Images/BotonesMnGeneral/BoEnlaces_Off.gif" alt="Enlaces de interés" name="ImgEnlaces_Off" width="139" height="25" border="0" id="ImgBoEnlaces_Off" longdesc="Enlaces de interés" onmouseover=MM_swapImage("ImgBoEnlaces_Off","","Images/BotonesMnGeneral/BoEnlaces_On.gif",1) onmouseout="MM_swapImgRestore()" /></a></td>');
document.write ('		</tr>');
document.write ('	</table>');
document.write ('</div>');

document.write ('<div id="Transparente" onmouseover=MM_showHideLayers("N1Sitio","","hide","N1Turismo","","hide","N1Historia","","hide","N1Foro","","hide","N1Varios","","hide","Transparente","","hide")>');
document.write ('	<table width="974" height="100" cellpadding="0" cellspacing="0">');
document.write ('		<tr><td>&nbsp;</td></tr>');
document.write ('	</table>');
document.write ('</div>');
}

function Encabezado(texto){
	document.write ('<table width="974" border="0" cellspacing="0" cellpadding="0">');
	BanerSuperior();
	MenuPpal();
	document.write ('</table>');
	BarraLocalizacion(texto);
}

function BanerSuperior() {
    document.write ('<tr>');
    document.write ('<td colspan="7"><img src="Images/img_Cabecera.gif" name="ImgCabecera" width="974" height="125" id="ImgCabecera" /></td>');
    document.write ('</tr>');
}
function MenuPpal() {
	document.write ('<tr>');
	document.write ('	<td width="139" height="25"><a href="index.html">	<img src="Images/BotonesMnGeneral/BoGeneral_Off.gif"  alt="General"  name="ImgBoGeneral_Off"  id="ImgBoGeneral_Off" border="0"  	onMouseOver=SwapBoton("general")  onMouseOut="MM_swapImgRestore()" width="139" height="25" /></a></td>');
	document.write ('	<td width="139">					<img src="Images/BotonesMnGeneral/BoElSitio_Off.gif"  alt="El sitio" name="ImgBoElSitio_Off"  id="ImgBoElSitio_Off"		onMouseOver=SwapBoton("elsitio")  onMouseOut="MM_swapImgRestore()" width="139" height="25" /></td>');
	document.write ('	<td width="139"><a href="Boletin.html">			<img src="Images/BotonesMnGeneral/BoBoletin_Off.gif"  alt="Boletin"  name="ImgBoBoletin_Off"  id="ImgBoBoletin_Off" border="0"  	onMouseOver=SwapBoton("boletin")  onMouseOut="MM_swapImgRestore()" width="139" height="25" /></a></td>');
	document.write ('	<td width="139">				 	<img src="Images/BotonesMnGeneral/BoTurismo_Off.gif"  alt="Turismo"  name="ImgBoTurismo_Off"  id="ImgBoTurismo_Off"		onMouseOver=SwapBoton("turismo")  onMouseOut="MM_swapImgRestore()" width="139" height="25" /></td>');
	document.write ('	<td width="139">				 	<img src="Images/BotonesMnGeneral/BoHistoria_Off.gif" alt="Historia" name="ImgBoHistoria_Off" id="ImgBoHistoria_Off"	onMouseOver=SwapBoton("historia") onMouseOut="MM_swapImgRestore()" width="139" height="25" /></td>');
	document.write ('	<td width="139">				 	<img src="Images/BotonesMnGeneral/BoForo_Off.gif"     alt="Foro"     name="ImgBoForo_Off"     id="ImgBoForo_Off"		onMouseover=SwapBoton("foro")	  onMouseOut="MM_swapImgRestore()" width="139" height="25" /></td>');
	document.write ('	<td width="140">				 	<img src="Images/BotonesMnGeneral/BoOtros_Off.gif"    alt="Otros"    name="ImgBoVariosOff"    id="ImgBoVariosOff"		onMouseOver=SwapBoton("varios")   onMouseOut="MM_swapImgRestore()" width="140" height="25" /></td>');
	document.write ('</tr>');
}    

function SwapBoton(boton) {
	switch(boton){
		case "general":
			MM_swapImage("ImgBoGeneral_Off","","Images/BotonesMnGeneral/BoGeneral_On.gif",1);
			MM_showHideLayers("N1Sitio","","hide","N1Turismo","","hide","N1Historia","","hide","N1Foro","","hide","N1Varios","","hide","Transparente","","show");	
			break;	
		case "elsitio":
			MM_swapImage("ImgBoElSitio_Off","","Images/BotonesMnGeneral/BoElSitio_On.gif",1);
 			MM_showHideLayers("N1Sitio","","show","N1Turismo","","hide","N1Historia","","hide","N1Foro","","hide","N1Varios","","hide","Transparente","","show");
			break;	
		case "boletin":
			MM_swapImage("ImgBoBoletin_Off","","Images/BotonesMnGeneral/BoBoletin_On.gif",1);
			MM_showHideLayers("N1Sitio","","hide","N1Turismo","","hide","N1Historia","","hide","N1Foro","","hide","N1Varios","","hide","Transparente","","show");
			break;		
		case "turismo":
  			MM_swapImage("ImgBoTurismo_Off","","Images/BotonesMnGeneral/BoTurismo_On.gif",1);
  			MM_showHideLayers("N1Sitio","","hide","N1Turismo","","show","N1Historia","","hide","N1Foro","","hide","N1Varios","","hide","Transparente","","show");
			break;
		case "historia":
			MM_swapImage("ImgBoHistoria_Off","","Images/BotonesMnGeneral/BoHistoria_On.gif",1);
			MM_showHideLayers("N1Sitio","","hide","N1Turismo","","hide","N1Historia","","show","N1Foro","","hide","N1Varios","","hide","Transparente","","show");
			break;
		case "foro":
			MM_swapImage("ImgBoForo_Off","","Images/BotonesMnGeneral/BoForo_On.gif",1);
		        MM_showHideLayers("N1Sitio","","hide","N1Turismo","","hide","N1Historia","","hide","N1Foro","","show","N1Varios","","hide","Transparente","","show");
			break;
		case "varios":
			MM_swapImage("ImgBoVariosOff","","Images/BotonesMnGeneral/BoOtros_On.gif",1);
			MM_showHideLayers("N1Sitio","","hide","N1Turismo","","hide","N1Historia","","hide","N1Foro","","hide","N1Varios","","show","Transparente","","show");	
			break;  
	};
}

function BarraLocalizacion(texto){
	document.write ('<table width="974" border="0" cellpadding="0" cellspacing="0" id="TablaBarraLocalizacion">')
	document.write ('	<tr>')
	document.write ('		<td height="25" background="Images/BarraLocalizacion.gif">'+texto+'</td>')
	document.write ('	</tr>')
	document.write ('</table>')
}

function PiePagina() {
    document.write ('<table width="974" height="60">')
    document.write (	'<tr>')
    document.write (		'<td align="left" valign="top" bordercolor="#000000">')
    document.write (			'<p class="EnlacesFinales"><img src="Images/Img_LineaAbajo.gif" width="950" height="2" /></p>')
    document.write (			'<p class="EnlacesFinales"><a href="index.html">Inicio</a> | <a href="Contactar.html">Contacto</a> | Mapa Web <br/>') 
    document.write (			'El Sitio | <a href="Boletin.html">Bolet&iacute;n</a> | Turismo | historia | <a href="http://escabecheru.foroes.net/">Foro</a> </p></td>')
    document.write (	'</tr>')
    document.write ('</table>')   
}
function AbrirVentana() {
     alert("voy a abrir ventana");   
     ventana=open("http://www.inm.es/cgi-bin/locali.cgi?ig=33400","El tiempu en Ceceda","width=180,height=160");
   }

function DarFecha(){
	var hoy=new Date();
	dia=hoy.getDate();
	mes=hoy.getMonth()+1;
	anyo=hoy.getYear();
	alert("Hoy es " + dia + " del " + mes + " de " + anyo); 
}

function GetParamUrl(ji) {
	hu = window.location.search.substring(1);
	gy = hu.split("&");
	for (i=0;i<gy.length;i++){
		ft = gy[i].split("=");
		if (ft[0] == ji) {
			return ft[1];
		}
	}
}

function pause(milliseconds) {
	var dt = new Date();
	while ((new Date()) - dt <= milliseconds) { /* Do nothing */ }
}

function roundNumber(rnum, rlength) { // Arguments: number to round, number of decimal places
  var newnumber = Math.round(rnum*Math.pow(10,rlength))/Math.pow(10,rlength);
  return newnumber; // Output the result to the form field (change for your purposes)
}

