// Detectar navegador para cargar estilos

function CargaEstilos ()
		{
		  isNS4=isIE=isNS6=0;
		  if(document.layers){ isNS4++;}
		  else if(document.all){  isIE++;}
		  else if(document.getElementById){  isNS6++ }
		  if (isIE == 1)
					{
					document.write ("<link rel='stylesheet' href='estilos/ayto_aviles.css' type='text/css'>");
	    			
				    }
		  if (isNS4 == 1)
 					{
					document.write ("<link rel='stylesheet' href='estilos/ayto_aviles_ns.css' type='text/css'>");

	              	    }
		  if (isNS6 == 1)
 					{
					document.write ("<link rel='stylesheet' href='estilos/ayto_aviles.css' type='text/css'>");

	              	    }

			
		}


// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header

// =======================================
// set the following variables
// =======================================

// Set speed (milliseconds)
var speed = 4000

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'imagenes/cabecera1_r1_c2.gif'
Pic[1] = 'imagenes/cabecera_slide_2.gif'
Pic[2] = 'imagenes/cabecera_slide_3.gif'
Pic[3] = 'imagenes/cabecera_slide_4.gif'

// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   document.images.SlideShow.src = preLoad[j].src
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', speed)
}

// Script para obtener la fecha del día
var now = new Date();
var yr = now.getYear();
var mName = now.getMonth() + 1;
var dName = now.getDay() + 1;
var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate();
if(navigator.appName == "Netscape") yr=yr+1900;
if(dName==1) Day = "domingo";
if(dName==2) Day = "lunes";
if(dName==3) Day = "martes";
if(dName==4) Day = "miércoles";
if(dName==5) Day = "jueves";
if(dName==6) Day = "viernes";
if(dName==7) Day = "sábado";
if(mName==1) Month="enero";
if(mName==2) Month="febrero";
if(mName==3) Month="marzo";
if(mName==4) Month="abril";
if(mName==5) Month="mayo";
if(mName==6) Month="junio";
if(mName==7) Month="julio";
if(mName==8) Month="agosto";
if(mName==9) Month="septiembre";
if(mName==10) Month="octubre";
if(mName==11) Month="noviembre";
if(mName==12) Month="diciembre";
// String to display current date.
var todaysDate =(" "
	+ Day
	+ " "
	+ dayNr
	+ " de "
	+ Month
	+ ", "
	+ yr
	+ "<br>");
	
function AbrirDista()
{
OpenWin =
window.open("http://www.netcom.es/master/dista","NavWindow","toolbar=no,menubar=no,location=no,scrollbars=yes,resize=yes");
}

function AbrirCodali()
{
OpenWin =
window.open("http://narcea.netcom.es/codali/convoca.htm","NavWindow","toolbar=no,menubar=no,location=no,scrollbars=yes,resize=yes");
}

function EscribirUrl()
{
document.write(document.location.href);
}

function abrir_ventana(theURL,winName,features) { 
  window.open(theURL,winName,features);
}
