function envia_hoteles(url_zan, id_zan)
			{
				provincia=document.hoteles.provincia.options[document.hoteles.provincia.selectedIndex].value;
				if (provincia=='')
				{
					alert("Selecciona una provincia para la búsqueda.");
					return false;
				}
				dia=document.hoteles.dia.options[document.hoteles.dia.selectedIndex].value;
				mes=document.hoteles.mes.options[document.hoteles.mes.selectedIndex].value;
				mesactual=document.hoteles.mesactual.value;
				anioactual=document.hoteles.anioactual.value;
				aniofuturo=document.hoteles.aniofuturo.value;
				if (parseInt(mes)<parseInt(mesactual))
				{
					anio=aniofuturo;
				}
				else
				{
					anio=anioactual;
				}
				if (dia.length==1)
				{
					dia='0' + dia;
				}
				if (mes.length==1)
				{
					mes='0'+mes;
				}			
				fechafinal=dia + '/' + mes + '/' + anio;
				error=compruebafechaespanol(fechafinal)
				if (error!=0)
				{
					alert("La fecha seleccionada no es una fecha válida");
					return false;
				}
			pais='ES'
			noches=document.hoteles.noches.options[document.hoteles.noches.selectedIndex].value;
			fechahotel=anio + '-' + mes + '-' + dia;
			url='http://www.hotelius.com/reservas_hoteles/publicidad/zanox.aspx?url=http://www.hotelius.com/reservas_hoteles/Buscador/informacionhoteles.aspx?pais=' + pais + '&prov=' + provincia + '&cat=0&ocupa=2&numhab=1&reg=OB&fent=' + fechahotel + '&n=' + noches + '&zanid=' + id_zan;
			document.hoteles.action =url;
			document.hoteles.submit;

			}
function compruebafechaespanol(fecha)
					{
					//se comprueba que la fecha esta en el formato dd/mm/aa
					err=0;
					a=fecha;
					if (a.length != 10)
						err=2;
					if (err==0)
					{
						d = a.substring(0, 2);// día
						c = a.substring(2, 3);// '/'
						m = a.substring(3, 5);// mes
						e = a.substring(5, 6);// '/'
						f = a.substring(6, 10);// año
						if (m<1 || m>12) 
						//si el mes no es correcto
						{
							err = 2;
						}
						if (c != '/')
						{	
							err = 2;
						}
						if (d<1 || d>31) {
							err = 2;
						}
						if (e != '/') {
							err = 2;
						}
						if (f<0 || f>2999) {
							err = 2;
						}
						if (m==4 || m==6 || m==9 || m==11){//if1
							if (d==31) {//if2
								err = 2;
							}//fin if 2
						}//find uf 1
						if (m==2){// if 3
							var g=parseInt(f/4)
							if (isNaN(g)) {// if 4
									err=2;
							}// fin if 4
							if (d>29) {// if 5
								err = 2;
							}//fin if 5
							if (d==29 && ((f/4)!=parseInt(f/4))) {//if 6
								err = 2;
							}//fin if 6
						}//fin if 3
					}
					return err;
					}
					
function bus_hotelius200x200(url,id){
document.writeln('<link href="http://www.hotelius.com/reservas_hoteles/estilos/styles2.css" rel="stylesheet" type="text/css"></link>');
document.writeln('<table background="http://www.hotelius.com/reservas_hoteles/Publicidad/campanya/imgs/200x200.jpg" style="WIDTH:199px; HEIGHT:201px" cellpadding="0" cellspacing="0">');
document.writeln('<form name="hoteles" method="post" action="http://www.hotelius.com/reservas_hoteles/Publicidad/campanya/200x200.htm" target="_blank">');
document.writeln('				<tr>');
document.writeln('					<td align="center">');
document.writeln('						<table width="181" height="168" border="0" style="WIDTH: 181px; HEIGHT: 168px">');
document.writeln('							<tr bordercolor="#000000">');
document.writeln('								<td width="110">');
document.writeln('									<div align="left"><BR><BR><BR><BR><BR>');
document.writeln('<select class="description2" id="Select1" style="WIDTH:110px; HEIGHT: 200px" align="center" size="1" name="provincia">');
document.writeln('											<OPTION value="" selected>Elige tu playa</OPTION>');
document.writeln('											<OPTION value="ES-O">Costa de Asturias</OPTION>');
document.writeln('											<OPTION value="ES-CS">Costa Azahar</OPTION>');
document.writeln('											<OPTION value="ES-A">Costa Blanca</OPTION>');
document.writeln('											<OPTION value="ES-GI">Costa Brava</OPTION>');
document.writeln('											<OPTION value="ES-MU">Costa Cálida</OPTION>');
document.writeln('											<OPTION value="ES-S">Costa de Cantabria</OPTION>');
document.writeln('											<OPTION value="ES-CE">Ceuta</OPTION>');
document.writeln('											<OPTION value="ES-T">Costa Dorada</OPTION>');
document.writeln('											<OPTION value="CostaGALICIA">Costa de Lugo</OPTION>');
document.writeln('											<OPTION value="ES-C">Costa de La Coruña</OPTION>');
document.writeln('											<OPTION value="ES-LU">Costa de Lugo</OPTION>');
document.writeln('											<OPTION value="ES-PO">Costa de Pontevedra</OPTION>');
document.writeln('											<OPTION value="ES-CA">Costa de Cadiz</OPTION>');
document.writeln('											<OPTION value="ES-H">Costa de Huelva</OPTION>');
document.writeln('											<OPTION value="ES-B">Costa Maresme</OPTION>');
document.writeln('											<OPTION value="ES-ML">Melilla</OPTION>');
document.writeln('											<OPTION value="ES-MA">Costa del Sol</OPTION>');
document.writeln('											<OPTION value="ES-GR">Costa Tropical</OPTION>');
document.writeln('											<OPTION value="ES-V">Costa de Valencia</OPTION>');
document.writeln('											<OPTION value="ES-BI">Costa País Vasco</OPTION>');
document.writeln('											<OPTION value="ES-MV1">Ibiza</OPTION>');
document.writeln('											<OPTION value="ES-MV141">Mallorca</OPTION>');
document.writeln('											<OPTION value="BALEARES">Menorca</OPTION>');
document.writeln('											<OPTION value="ES-MV149">Formentera</OPTION>');
document.writeln('											<OPTION value="-HOESLAP">La Palma</OPTION>');
document.writeln('											<OPTION value="-HOESTCI">Tenerife</OPTION>');
document.writeln('											<OPTION value="-MV144">Lanzarote</OPTION>');
document.writeln('											<OPTION value="-MV162">Fuerteventura</OPTION>');
document.writeln('											<OPTION value="-MV488">Gran Canaria</OPTION>');
document.writeln('											<OPTION value="ESGOM">La Gomera</OPTION>');
document.writeln('											<OPTION value="ESHIE">Hierro</OPTION>');
document.writeln('										</select><BR><BR>');
document.writeln('										<select name="noches" size="1" class="description2" style="WIDTH:110px">');
document.writeln('							<OPTION value="1" selected>Nº noches</OPTION>');
document.writeln('							<OPTION value="1">1</OPTION>');
document.writeln('							<OPTION value="2">2</OPTION>');
document.writeln('							<OPTION value="3">3</OPTION>');
document.writeln('							<OPTION value="4">4</OPTION>');
document.writeln('							<OPTION value="5">5</OPTION>');
document.writeln('							<OPTION value="6">6</OPTION>');
document.writeln('							<OPTION value="7">7</OPTION>');
document.writeln('							<OPTION value="8">8</OPTION>');
document.writeln('			  				<OPTION value="9">9</OPTION>');
document.writeln('			  				<OPTION value="10">10</OPTION>');
document.writeln('			 				<OPTION value="11">11</OPTION>');
document.writeln('			 				<OPTION value="12">12</OPTION>');
document.writeln('			 				<OPTION value="13">13</OPTION>');
document.writeln('			 				<OPTION value="14">14</OPTION>');
document.writeln('			  				<OPTION value="15">15</OPTION>');
document.writeln('										</select>');
document.writeln('									</div>');
document.writeln('								</td>');
document.writeln('								<td>');
document.writeln('									<div align="left"><BR><BR><BR><BR><BR>');
document.writeln('										<select name="dia" size="1" class="description2" style="WIDTH:50px">');
document.writeln('											<option selected value="">Día</option>');
document.writeln('											<option value="1">1</option>');
document.writeln('											<option value="2">2</option>');
document.writeln('											<option value="3">3</option>');
document.writeln('											<option value="4">4</option>');
document.writeln('											<option value="5">5</option>');
document.writeln('											<option value="6">6</option>');
document.writeln('											<option value="7">7</option>');
document.writeln('											<option value="8">8</option>');
document.writeln('											<option value="9">9</option>');
document.writeln('											<option value="10">10</option>');
document.writeln('											<option value="11">11</option>');
document.writeln('											<option value="12">12</option>');
document.writeln('											<option value="13">13</option>');
document.writeln('											<option value="14">14</option>');
document.writeln('											<option value="15">15</option>');
document.writeln('											<option value="16">16</option>');
document.writeln('											<option value="17">17</option>');
document.writeln('											<option value="18">18</option>');
document.writeln('											<option value="19">19</option>');
document.writeln('											<option value="20">20</option>');
document.writeln('											<option value="21">21</option>');
document.writeln('											<option value="22">22</option>');
document.writeln('											<option value="23">23</option>');
document.writeln('											<option value="24">24</option>');
document.writeln('											<option value="25">25</option>');
document.writeln('											<option value="26">26</option>');
document.writeln('											<option value="27">27</option>');
document.writeln('											<option value="28">28</option>');
document.writeln('											<option value="29">29</option>');
document.writeln('											<option value="30">30</option>');
document.writeln('											<option value="31">31</option>');
document.writeln('										</select><BR><BR><select name="mes" size="1" class="description2" style="WIDTH:50px">');
document.writeln('								<OPTION value="" selected>Mes</OPTION>');
document.writeln('					            <OPTION value="1">01</OPTION>');
document.writeln('								<OPTION value="2">02</OPTION>');
document.writeln('								<OPTION value="3">03</OPTION>');
document.writeln('								<OPTION value="4">04</OPTION>');
document.writeln('								<OPTION value="5">05</OPTION>');
document.writeln('								<OPTION value="6">06</OPTION>');
document.writeln('								<OPTION value="7">07</OPTION>');
document.writeln('								<OPTION value="8">08</OPTION>');
document.writeln('								<OPTION value="9">09</OPTION>');
document.writeln('								<OPTION value="10">10</OPTION>');
document.writeln('								<OPTION value="11">11</OPTION>');
document.writeln('								<OPTION value="12">12</OPTION>');
document.writeln('									</select>');
document.writeln('									</div>');
document.writeln('								</td>');
document.writeln('								</tr>');
document.writeln('							<tr>');
document.writeln('								<td>');
document.writeln('									<div align="left"> ');
document.writeln('									<input type="hidden" name="mesactual" value="1" ID="Hidden1">');
document.writeln('									<input type="hidden" name="anioactual" value="2006" ID="Hidden2">');
document.writeln('									<input type="hidden" name="aniofuturo" value="2007" ID="Hidden3">');
document.writeln('<input type="image" name="Buscar" alt="Buscar" ID="Image1" SRC="http://www.hotelius.com/reservas_hoteles/Publicidad/campanya/imgs/buscar_gr.gif" border="0" WIDTH="42" HEIGHT="21" valign="bottom" vspace="0" onClick="return envia_hoteles(\''+url+'\',\''+id+'\');">');
document.writeln('									</div>');
document.writeln('								</td>');
document.writeln('								</tr>');
document.writeln('						</table>');
document.writeln('					</td>');
document.writeln('				</tr>');
document.writeln('			</form>');
document.writeln('		</table>');
}
