var host  = "http://www.aytosalamanca.es/"

function irUrl(url, path)
{
	if (url != "") {
		
		if (path == 0)  {top.location=host+url+".html";}
		
		if (path == 1)  {top.location=host+"Organizacion_del_Ayuntamiento/"+url+".html";}
		if (path == 2)  {top.location=host+"Atencion_al_Ciudadano/"+url+".html";}
		if (path == 3)  {top.location=host+"Areas_y_Servicios/"+url+".html";}
		
		if (path == 4)  {top.location=host+"Informacion/"+url+".html";}
	}
}

function ShowUrl(url, path)
{
	irUrl(url,path);
}

function mostrar_dia() 
{
	date = new Date();
	var ndw = date.getDay(); 
	var dm = date.getDate();
	var nm = date.getMonth();
	var y = date.getYear(); 

	if (y<200)
		y+=1900;
	var dw = '';
	var m = '';
 
	if(nm == 0) {m = 'Enero';}
	if(nm == 1) {m = 'Febrero';}
	if(nm == 2) {m = 'Marzo';}
	if(nm == 3) {m = 'Abril';}
	if(nm == 4) {m = 'Mayo';}
	if(nm == 5) {m = 'Junio';}
	if(nm == 6) {m = 'Julio';}
	if(nm == 7) {m = 'Agosto';}
	if(nm == 8) {m = 'Septiembre';}
	if(nm == 9) {m = 'Octubre';}
	if(nm == 10){m = 'Noviembre';}
	if(nm == 11){m = 'Diciembre';}

	if(ndw == 0){dw = 'Domingo';}
	if(ndw == 1){dw = 'Lunes';} 
	if(ndw == 2){dw = 'Martes';}
	if(ndw == 3){dw = 'Mi&eacute;rcoles';}
	if(ndw == 4){dw = 'Jueves';} 
	if(ndw == 5){dw = 'Viernes';}
	if(ndw == 6){dw = 'S&aacute;bado';}

	var fecha = '&nbsp;'+dw+', '+dm+' '+m+' '+y+'. ';
	document.write(fecha); 
} 

function randImg(min,max)
{
	var nImg=min-1;
	while (nImg<min || nImg>max) 
	{
		nImg=Math.round(Math.random()*(max-min)+min);
	}
	return nImg;
}