function fecha() {
var d, day, x, s, p = "";
var x = new Array("Enero", "Febrero", "Marzo");
var x = x.concat("Abril","Mayo", "Junio");
var x = x.concat("Julio","Agosto", "Septiembre");
var x = x.concat("Octubre","Noviembre", "Diciembre");
var p = new Array("Domingo", "Lunes", "Martes");
var p = p.concat("Miércoles","Jueves", "Viernes");
var p = p.concat("Sábado");
fec = new Date();
mes = fec.getMonth();
anual = fec.getFullYear(); 
day = fec.getDay();
daynum = fec.getDate(); 
document.writeln( daynum + " de "+ x[mes] + " de " + anual);

}
var phone = new Image(); phone.src = "phoneerror.gif";
var haveerrors = 0;

function showImage(imagename, imageurl, errors) {

document[imagename].src = imageurl;
if (!haveerrors && errors) haveerrors = errors;
}


function ReRutas(NumRuta)
{
var strURLRuta;

var strURLArcol = "/scripts/esrimap.dll?Name=AOL&Cmd=MapaLoc&Serv=jcylturest_es1&";

if (NumRuta == "1")
{
	strURLRuta = "Loc.x=390588,25000&Loc.y=4578263,90000&LocDesc=Camino+de+Lengua&LocSym=&Nivel=8&lvis=1"
}
else if (NumRuta == "2")
{
	strURLRuta = "Loc.x=360595,056060&Loc.y=4617011,50000&LocDesc=Ruta+de+Carlos+V&LocSym=&Nivel=8&lvis=2"
}
else if (NumRuta == "3")
{
	strURLRuta = "Loc.x=359553,09338&Loc.y=4668104,75000&LocDesc=Canal+de+Castilla&LocSym=&Nivel=7&lvis=3"
}
else if (NumRuta == "4")
{
	strURLRuta = "Loc.x=266572,74934&Loc.y=4617991,75000&LocDesc=Vía+de+la+Plata&LocSym=&Nivel=8&lvis=4" 
}
else if (NumRuta == "5")
{
	strURLRuta = "Loc.x=512900,20000&Loc.y=4621099,14000&LocDesc=Camino+del+Cid&LocSym=&Nivel=7&lvis=5" 
}
else if (NumRuta == "6")
{
	strURLRuta = "Loc.x=365498,90000&Loc.y=4612349,27000&LocDesc=Ruta+del+Duero&LocSym=&Nivel=8&lvis=6"
}
else if (NumRuta == "7")
{
	strURLRuta = "Loc.x=338604,94000&Loc.y=4709993,80000&LocDesc=Camino+de+Santiago&LocSym=&Nivel=8&lvis=7"
}

strURLRuta = strURLArcol + strURLRuta;

window.location = strURLRuta;
}
/*"Ruta","Nombre","X","Y"
7,Ruta del Camino de Santiago,338604.94000,4709993.80000
6,Ruta del Duero,365498.90000,4612349.27000
5,Ruta del Camino del Cid,512900.20000,4621099.14000
4,Ruta de la Vía de la Plata,266572.74934,4617991.75000
3,Ruta del Canal de Castilla,359553.09338,4668104.75000
2,Ruta de Carlos V,360595.05606,4617011.50000
1,Ruta del Camino de Lengua,390588.25000,4578263.90000
*/

function ImprimirMapa(strURL) { //v2.0


str = "scrollbars=yes,Left=0, Top=0,width=690,height=600";
refwindow = window.open('','refwindow',str);
refwindow.document.open();
refwindow.document.writeln('<html>');
refwindow.document.writeln('<head>');
refwindow.document.writeln('<title>Imprimir Mapa</title>');
refwindow.document.writeln('</head>');
refwindow.document.writeln('<frameset rows="*,3%" frameborder="NO" border="0" framespacing="0">');
refwindow.document.writeln('<frame name="mainFrame" scrolling="auto" src="' + strURL  + '" frameborder="NO">');
refwindow.document.writeln('<frame name="bottomFrame" scrolling="no" noresize src="/aolapp/servic/jcylturest_es1/down_imprimir.htm" frameborder="NO">');
refwindow.document.writeln('</frameset>');
refwindow.document.writeln('<noframes>');
refwindow.document.writeln('<body bgcolor="#FFFFFF" text="#000000"></body>');
refwindow.document.writeln('</noframes>');
refwindow.document.writeln('</html>');
refwindow.document.close();
refwindow.focus();

}

//----------------------------------------------------------------------------------------

function GeneraURL() {  //v2.0

window.location = "http://usul.divisait.com:8083/turcyl"

}

//----------------------------------------------------------------------------------------
function validate () {
var filter=/^.+@.+\..{2,3}$/
var urlMapa=document.referrer;
var urlVuelta = "http://iscntmapas1.jcyl.es/scripts/esrimap.dll?Name=AOL&Cmd=FormDir&Serv=jcyltur_es1";
document.envio.urlToBack.value=urlVuelta;
for (i=0;i<document.envio.length;i++) 
{
strValor=document.envio.elements[i].value;

	if (document.envio.elements[i].name=="url")
	
	{
		document.envio.url.value=urlMapa
	}

	if (document.envio.elements[i].name=="recipientAddress")

		{
			if (!filter.test(strValor)){
						
				
				window.alert("Introduzca una dirección electrónica válida!")
				document.envio.recipientAddress.value=""
		 		document.envio.recipientAddress.focus()
				return false
			 }

		}	

	if (document.envio.elements[i].name=="replyToAddress")

		{
			if (!filter.test(strValor)){
						
				window.alert("Introduzca una dirección electrónica válida!")
				document.envio.replyToAddress.value=""
		 		document.envio.replyToAddress.focus()
				return false
			 }

		}	




}

return true

}
