function abrirventana(url)
{
	window.open(url,'','width=520, height=375, toolbar=no,scrollbars=no,location=no,directories=no,status=no,top=70,left=250, resizable=no, menubar=no');
}
var txt="";
 var longitud=100;
 var pos=0;
 for (i=1; i<(longitud); i++)
 {
 txt +="Bienvenidos a la Página Web del Servicio Local de Proteccion Civil de Arganda del Rey      ";
 }
 txt +="  ";
 longitud=txt.length;
function desliza()
 {
 if (pos==longitud) pos=-40;
 var msg=txt.substring(pos, longitud);
 window.status=msg;
 pos++;
 setTimeout("desliza()",100);
 }
 
function Hora(){
	var meses=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
	var time=new Date();
	dia=time.getDate();
	mes=time.getMonth();
	mes=meses[mes];
	anyo=time.getFullYear()
	hora=time.getHours();
	minutos=time.getMinutes();
	minutos=(minutos<10)?"0"+minutos:minutos;
	var fecha = dia+' de '+mes+' de '+anyo+' - '+hora+':'+minutos;
	document.getElementById("horario").innerHTML=fecha;
	window.setTimeout("Hora()",10000);
	}
function ventana(url)
{
window.open (url,'ventana','toolbar=no,scrollbars=no,location=no,directories=no,status=no,height=200,width=400,top=250,left=350, resizable=no, menubar=no');
}
function ventana2(url)
{
window.open (url,'ventana2','toolbar=no,scrollbars=no,location=no,directories=no,status=no,height=450,width=600,top=180,left=220, resizable=no, menubar=no');
}
TE1="VISITA LAS RECOMENDACIONES"; 
TE2=""; 
M=TE1; 
cnt=0; 
function SH()
{ 
document.Switch.A.value=M; 
cnt++; 
if(cnt==1 && M==TE1){M=TE2;} 
if(cnt==2 && M==TE2){cnt=0;M=TE1;} 
setTimeout("SH()",500); 
} 
var good;
function checkEmailAddress(field) 
{
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail){
   good = true
} else {
   alert('Por favor introduce un e-mail valido')
   field.focus()
   field.select()
   good = false
   }
}

u = window.location;
m = "Pienso que te puede interesar esta página...";
function mailThisUrl()
{
   good = false
   checkEmailAddress(document.eMailer.address)
   if (good){
      window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u;
   }
}
var coldColor = "#333333"
var hotColor  = "#ff6600"
var motionPix = "7"

var a='<style>'+
'A.InstantLink:link {'+
'  color:'+coldColor+';'+
'  text-decoration:none;'+
'  padding:0 '+motionPix+' 0 0;'+
'  }'+  
'A.InstantLink:visited {'+
'  color:'+coldColor+';'+
'  text-decoration:none;'+
'  padding:0 '+motionPix+' 0 0;}'+  
'A.InstantLink:active {'+
'  color:'+coldColor+';'+
'  text-decoration:none;'+
'  padding:0 '+motionPix+' 0 0;'+
'  }'+  
'A.InstantLink:hover {'+
'  color:'+hotColor+';'+
'  text-decoration:underline overline;'+
'  padding:0 0 0 '+motionPix+';'+
'  }'+
'</style>'
if (document.all || document.getElementById){
    document.write(a)
}
var coldColor = "#FFFFFF"
var hotColor  = "#333333"
var motionPix = "7"

var a='<style>'+
'A.InstantLink2:link {'+
'  color:'+coldColor+';'+
'  text-decoration:none;'+
'  padding:0 '+motionPix+' 0 0;'+
'  }'+  
'A.InstantLink2:visited {'+
'  color:'+coldColor+';'+
'  text-decoration:none;'+
'  padding:0 '+motionPix+' 0 0;}'+  
'A.InstantLink2:active {'+
'  color:'+coldColor+';'+
'  text-decoration:none;'+
'  padding:0 '+motionPix+' 0 0;'+
'  }'+  
'A.InstantLink2:hover {'+
'  color:'+hotColor+';'+
'  text-decoration:underline overline;'+
'  padding:0 0 0 '+motionPix+';'+
'  }'+
'</style>'
if (document.all || document.getElementById){
    document.write(a)
}

function cortina(){ 
    clip_bottom += 1 
    if (clip_bottom==maximo_clip_bottom){ 
       clip_bottom = 0 
       imagen_actual += 1 
       if (imagen_actual == capas_images.length){ 
          imagen_actual=0 
       } 
       xZIndex(capas_images[imagen_actual = 0] = new Array("c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9") ,contador_zindex) 
       contador_zindex ++ 
    } 
    xClip (capas_images[imagen_actual = 0], 
 						clip_top = 0, 
						clip_right = 155, 
						clip_bottom = 0, 
						clip_left = 0, 
						maximo_clip_bottom = 80, 
						contador_zindex = 0) 
    setTimeout("cortina()",velocidad = 5) 
}

