if (!Centinela)
{
	var Centinela = 1;
    FactorX=20;
    
    isNS4 = (document.layers) ? true : false;
    isIE4 = (document.all && !document.getElementById) ? true : false;
    isIE5 = (document.all && document.getElementById) ? true : false;
    isNS6 = (!document.all && document.getElementById) ? true : false;
    
    function cerrar() {
		if(isNS4){
			document.Leyenda.visibility="hidden";
        } else if (isNS6){
            		document.getElementById("Leyenda").style.visibility ="hidden";
				} else{
					document.all.Leyenda.style.visibility = "hidden";
				}
	} /* function cerrar() */
    
	function setVals() {
		// Con NS el innerHeigth esta definido
        if (isIE4 || isIE5){
			if (document.body){
				innerWidth = document.body.clientWidth;
				innerHeight = document.body.clientHeight;
			} else {
				innerWidth = 1004;
				innerHeight= 578;	
			}
        }
        posX = 120+20;
        posY = 20;
        yanterior = 20;
        mover();
    } /* function setVals() */
	
    function mover(){
		var scrollPos = navDOM?self.pageYOffset:document.body.scrollTop;
        var posLeft = -posX +innerWidth + (navDOM?self.pageXOffset:document.body.scrollLeft);
        
        if (Math.abs(scrollPos-yanterior) > FactorX){
            var dist = 2 * parseInt( Math.abs(scrollPos-yanterior) / FactorX );
        } else {
            var dist  = 1;
        }
        
        if(yanterior < (scrollPos+posY)){
            yanterior+=dist;
            moverElemento(yanterior,posLeft);
        } else if (yanterior > (scrollPos+posY)){
            yanterior-=dist;
            moverElemento(yanterior,posLeft);
        } else if (yanterior == (scrollPos+posY)){
            moverElemento(yanterior,posLeft);
        }        
        setTimeout ("mover()",10);
    } /* function mover() */
    
	function moverElemento(valTop,valLeft) {
		valLeft=valLeft-67;
        valTop=valTop+200;
        if (isIE4){
            document.all["Leyenda"].style.left = valLeft;
            document.all["Leyenda"].style.top = valTop;
        }	else if(isIE5){
					document.getElementById("Leyenda").style.left = valLeft;
					document.getElementById("Leyenda").style.top = valTop;
			}	else if(isNS4){
						document.Leyenda.left = valLeft;
						document.Leyenda.top = valTop;
					}	else if(isNS6){
								document.getElementById("Leyenda").style.left = valLeft;
								document.getElementById("Leyenda").style.top = valTop;
							}
    } /* moverElemento(valTop,valLeft) */
    
	function markMe() {
		if (screen.width >= 640 ){
        	window.onresize=setVals;
        	setVals();    	
        } 
    } /* function markMe() */
	
	function runPopup(Provincia) {
		if (isIE4 || isIE5){
			if (document.body){
				altura=document.body.clientHeight;
				anchura=document.body.clientWidth;
			} else {
				if (frames.length==0){
					altura=301;
					anchura=451;
				} else {
					altura=0;
					anchura=0;
				}
			}
		}
    
    	if (isNS4 || isNS6){
    		altura=window.innerHeight;
    		anchura=window.innerWidth;
    	}
    
    	fecha = new Date();
    	bust = fecha.getTime();
    
    	puesto = 0;
        
    	if (altura>300 && anchura>450){
			if (isNS4) {
				document.write('<LAYER name="Leyenda"  POSITION=ABSOLUTE z-index=1000>');
			} else {
				document.write('<DIV id="Leyenda" name="Leyenda" style="position:absolute;visibility: visible" z-index=1000 >');
			}
    		document.write('<table width=200 border=0 bordercolor=CDDAF2  align=right>');
    		document.write('  <tr valign=top>');
    		document.write('    <td valign=top class=Texto_negro_normal>');
    		document.write('       <table align=center border=0 cellspacing=0 cellpadding=0 width=15 height=15  >');
    		document.write('	     <tr>');
    		document.write('		   <td bgcolor="red" width=8 height=8>');
    		document.write('		   </td>');
    		document.write('		 </tr>');
    		document.write('	   </table>');
    		document.write('    </td>');
    		document.write('	<td  valign=top class=Texto_negro_normal><span class=Texto_negro_small>Fiesta Nacional no sustituible</span> ');
    		document.write('	</td>');
    		document.write('  </tr>');
			//--
			document.write('  <tr valign=top>');
			document.write('    <td  valign=top class=Texto_negro_normal >');
			document.write('	  <table align=center border=0 cellspacing=0 cellpadding=0 width=15 height=15 >');
			document.write('	    <tr>');
			document.write('		  <td width=8 height=8  bgcolor=009900>');
			document.write('		  </td>');
			document.write('		</tr>');
			document.write('	  </table>');
			document.write('	</td>');
			document.write('	<td  valign=top class=Texto_negro_normal><span class=Texto_negro_small>Fiesta Nacional respecto de la que no se ha ejercido la facultad de sustituci&oacute;n</span> </td>');
			document.write('  </tr>');
			//--
        	//Parte a replicar si se desea añadir una línea nueva
			document.write('  <tr valign=top>');
			document.write('    <td  valign=top class=Texto_negro_normal >');
			document.write('	  <table align=center border=0 cellspacing=0 cellpadding=0 width=15 height=15 >');
			document.write('	    <tr>');
			document.write('		  <td width=8 height=8  bgcolor=yellow>');
			document.write('		  </td>');
			document.write('		</tr>');
			document.write('	  </table>');
			document.write('	</td>');
			document.write('	<td  valign=top class=Texto_negro_normal><span class=Texto_negro_small>Fiesta de Comunidad Aut&oacute;noma </span> </td>');
			document.write('  </tr>');				
			if (Provincia=="Provincial") {
				document.write('  <tr valign=top>');
				document.write('    <td  valign=top class=Texto_negro_normal >');
				document.write('	  <table align=center border=0 cellspacing=0 cellpadding=0 width=15 height=15 >');
				document.write('	    <tr>');
				document.write('		  <td width=8 height=8  bgcolor=ff6633>');
				document.write('		  </td>');
				document.write('		</tr>');
				document.write('	  </table>');
				document.write('	</td>');
				document.write('	<td  valign=top class=Texto_negro_normal><span class=Texto_negro_small>Fiesta Provincial </span> </td>');
				document.write('  </tr>');
			}
        	if (Calendario!="") {
				document.write('  <tr valign=top>');
				document.write('    <td  valign=top class=Texto_negro_normal >');
				document.write('	  <table align=center border=0 cellspacing=0 cellpadding=0 width=15 height=15 >');
				document.write('	    <tr>');
				document.write('		  <td width=8 height=8  bgcolor=5984d3>');
				document.write('		  </td>');
				document.write('		</tr>');
				document.write('	  </table>');
				document.write('	</td>');
				document.write('	<td  valign=top class=Texto_negro_normal><span class=Texto_negro_small>Fiesta Local </span> </td>');
				document.write('  </tr>');
        	}
        	//Fin de la parte a replicar
    		document.write('</table>');
        	if (isNS4) {
				document.write('</LAYER>');
			} else {
				document.write('</DIV>');
			}	
        	navDOM = isNS4 || isNS6;
        	var vr = navigator.userAgent.replace(/mac/gi,"");
        	if (navigator.userAgent != vr) {window.onload=markMe;} // safety for Mac IE4.5
        	markMe();        
    	}
	} /* function runPopup(Provincia) */
	
}//fin if