			//copiado del creatives.js añadiendo "_8" a las id,nombres y nombres de función
				
				
				
				var fechaActual = new Date();
				var iniAnio = String(fechaActual.getFullYear());
				var iniMes = String(fechaActual.getMonth()+1);
				var iniDay = String(fechaActual.getDate()-1); 				
	
	function dinsOP_8(wacha,QUI,QuinSelect){
				form=(!document.frsv01_8)?document.getElementById('dasize_8').getElementsByTagName('form')[0]:document.frsv01_8;
				var newElement = document.createElement('option');
				newElement.setAttribute('value',QUI);
				document.frsv01_8.elements[QuinSelect].appendChild(newElement);
				newElement.innerHTML = wacha;
				if(QUI.indexOf(',,,')!=-1) newElement.style.color='#CC0000';
				if(QUI.substring(QUI.indexOf(',')+1)=='AZlist'){
					newElement.innerHTML = wacha.substring(13);
					newElement.style.color='#0099CC';}
				}
				
	function Month(month,ani){
				 var days;
				 if ((month==1)||(month==3)||(month==5)||(month==7)||(month==8)||(month==10)||(month==12)) days=31;
				 else if ((month==4) || (month==6) || (month==9) || (month==11)) days=30;
				 else if (month==2){ 
				  var a=isLeap(ani);
				  if (a)days=29;
				  else days=28;
				  }
				  return (days);
				  }
	function isLeap (Year){
				 if ( ((Year % 4)==0) & ((Year % 100)!=0) || ((Year % 400)==0) )return (true);
				 else  return (false);
				 }
	function doItRight_8(){
		if((parseFloat(iniDay)+14)>=days){
			BBday=(parseFloat(iniDay)+14)-days;
			document.frsv01_8.mesE_8.options[document.frsv01_8.mesE_8.selectedIndex+1].selected=true;putDaDay_8('diaE_8',document.frsv01_8.mesE_8);	
			document.frsv01_8.mesS_8.options[document.frsv01_8.mesE_8.selectedIndex].selected=true;putDaDay_8('diaS_8',document.frsv01_8.mesS_8);
			document.frsv01_8.diaE_8.options[BBday].selected=true;		
			}
		else{ BBday=(parseFloat(iniDay)+14);
			  document.frsv01_8.diaE_8.options[BBday].selected=true;}
		if((BBday+3)>=days){
			Fday=(parseFloat(BBday)+3)-days;
			if(document.frsv01_8.mesS_8.selectedIndex<document.frsv01_8.mesE_8.selectedIndex){ document.frsv01_8.mesS_8.selectedIndex=document.frsv01_8.mesE_8.selectedIndex;putDaDay_8('diaS_8',document.frsv01_8.mesS_8);}
			else document.frsv01_8.mesS_8.options[document.frsv01_8.mesE_8.selectedIndex+1].selected=true;putDaDay_8('diaS_8',document.frsv01_8.mesS_8);
			document.frsv01_8.diaS_8.options[Fday].selected=true;
			}
		else {Fday=(parseFloat(BBday)+3);
			 document.frsv01_8.diaS_8.options[Fday].selected=true;}
			} 
	function monthOK_8(){if(document.frsv01_8.mesS_8.selectedIndex<document.frsv01_8.mesE_8.selectedIndex) document.frsv01_8.mesS_8.selectedIndex=document.frsv01_8.mesE_8.selectedIndex;}
	function putDaDay_8(wachaD,wachaM){
		mes=parseFloat(wachaM.value.substring(4));
		any=parseFloat(wachaM.value.substring(0,4));
		elQtoca=parseFloat(document.getElementById(wachaD).value)-1;
		days=Month(mes,any);
		document.getElementById(wachaD).innerHTML='';
		for (o=1;o<=days;o++){
		JDay=(o<10)? '0'+o:String(o);
		dinsOP_8(JDay,JDay,wachaD);
		}
		document.getElementById(wachaD).options[elQtoca].selected=true;
		} 
	
		compat= new Array('com*hus','com*hie','com*huk','es*hes','fr*hfr','de*hde','nl*hnl','it*hit','com*wgrav');
			
	function goToSearch_8(){fdest_8=document.frsv01_8.destino_8.value;
		if(!XvX){
		for(i=0;i<compat.length;i++){
			if(compat[i].substring(compat[i].indexOf('*')+1)==b){
			document.frsv01_8.action="http://www.hotelopia."+compat[i].substring(0,compat[i].indexOf('*'))+"/results.aspx";
			document.frsv01_8.codWeb.value=b; break;}
			}} 
		if(fdest_8.indexOf('AZlist')!=-1) {document.frsv01_8.action='http://www.hotelopia.'+compat[i].substring(0,compat[i].indexOf('*'))+'/az_list.jsp?let=A&country=All';document.frsv01_8.submit();document.frsv01_8.action=''; return;}
		if(document.frsv01_8.mesE_8.selectedIndex > document.frsv01_8.mesS_8.selectedIndex || (document.frsv01_8.diaE_8.selectedIndex>=document.frsv01_8.diaS_8.selectedIndex && document.frsv01_8.mesE_8.selectedIndex == document.frsv01_8.mesS_8.selectedIndex)) { alert(wrongDates); return;}
		if(fdest_8=='000') { alert(noDest);document.frsv01_8.destino_8.focus(); return;}
		if(fdest_8.indexOf(',,,,')!=-1) { alert(wrongDest);document.frsv01_8.destino_8.focus(); return;}
		cargardestino_8(form,fdest_8);
		document.getElementById('mesE_8').style.color='#FFFFFF';
		document.getElementById('mesS_8').style.color='#FFFFFF';
		document.frsv01_8.target='_blank';
		
		//arreglando zanox
		document.frsv01_8.destino_8.name = "destino";
		document.frsv01_8.diaE_8.name = "diaE";
		document.frsv01_8.mesE_8.name = "mesE";
		document.frsv01_8.diaS_8.name = "diaS";
		document.frsv01_8.mesS_8.name = "mesS";
		document.frsv01_8.nhab_8.name = "nhab";
		document.frsv01_8.nad_8.name = "nad";
		document.frsv01_8.nnins_8.name = "nnins";
		
		document.frsv01_8.submit();
		document.frsv01_8.mesE_8.value=String(parseInt(document.frsv01_8.mesE_8.value));
		document.frsv01_8.mesS_8.value=String(parseInt(document.frsv01_8.mesS_8.value));
		document.getElementById('mesE_8').style.color='#000000';
		document.getElementById('mesS_8').style.color='#000000';
        document.frsv01_8.destino_8.selectedIndex=0;
		}
		
	function goToSearchradio(){fdest_8=document.frsv01_8.destino_8.value; 
		for(i=0;i<compat.length;i++){
			if(compat[i].substring(compat[i].indexOf('*')+1)==b){
			document.frsv01_8.action="http://www.hotelopia."+compat[i].substring(0,compat[i].indexOf('*'))+"/results.aspx";
			document.frsv01_8.codWeb.value=b; break;}
			} 
		if(fdest_8.indexOf('AZlist')!=-1) {document.frsv01_8.action='http://www.hotelopia.'+compat[i].substring(0,compat[i].indexOf('*'))+'/az_list.jsp?let=A&country=All';document.frsv01_8.submit();document.frsv01_8.action=''; return;}
		if(document.frsv01_8.mesE_8.selectedIndex > document.frsv01_8.mesS_8.selectedIndex || (document.frsv01_8.diaE_8.selectedIndex>=document.frsv01_8.diaS_8.selectedIndex && document.frsv01_8.mesE_8.selectedIndex == document.frsv01_8.mesS_8.selectedIndex)) { alert(wrongDates); return;}
		
		if(document.frsv01_8.radioDest.checked){ fdest_8 = document.frsv01_8.radioDest.value; }
		for (var i=0; i<document.frsv01_8.radioDest.length; i++) { if (document.frsv01_8.radioDest[i].checked){	fdest_8 = document.frsv01_8.radioDest[i].value; break; } }
		
		if(fdest_8=='000') { alert(noDest);document.frsv01_8.destino_8.focus(); return;}
		if(fdest_8.indexOf(',,,,')!=-1) { alert(wrongDest);document.frsv01_8.destino_8.focus(); return;}
		cargardestino_8(form,fdest_8);
		document.getElementById('mesE_8').style.color='#FFFFFF';
		document.getElementById('mesS_8').style.color='#FFFFFF';
		document.frsv01_8.target='_blank';
		
		
		document.frsv01_8.destino_8.name = "destino";
		document.frsv01_8.mesE_8.name = "mesE";
		document.frsv01_8.mesS_8.name = "mesS";
		document.frsv01_8.diaE_8.name = "diaE";
		document.frsv01_8.diaS_8.name = "diaS";
		document.frsv01_8.nhab_8.name = "nhab";
		document.frsv01_8.nad_8.name = "nad";
		document.frsv01_8.nnins_8.name = "nnins";
		
		document.frsv01_8.submit();
		document.frsv01_8.mesE_8.value=String(parseInt(document.frsv01_8.mesE_8.value));
		document.frsv01_8.mesS_8.value=String(parseInt(document.frsv01_8.mesS_8.value));
		document.getElementById('mesE_8').style.color='#000000';
		document.getElementById('mesS_8').style.color='#000000';
        document.frsv01_8.destino_8.selectedIndex=0;		
		}
		
		function cargardestino_8(Qform, destinoCompacto){
			document.frsv01_8.codagrdest.value=""; document.frsv01_8.coddest.value=""; document.frsv01_8.codagrzon.value=""; document.frsv01_8.codzon.value="";
			arraydestino = destinoCompacto.split(',');
			if(arraydestino.length < 2){ return false; } document.frsv01_8.nomdest.value =arraydestino[0]; 
			if(arraydestino[1]!=""){ document.frsv01_8.codagrdest.value = arraydestino[1]; return true; }
			if(arraydestino.length >= 3){
				if(arraydestino[2]!=""){
					document.frsv01_8.coddest.value = arraydestino[2];
					if(arraydestino.length >= 4 && arraydestino[3]!=""){ document.frsv01_8.codagrzon.value = arraydestino[3]; }
					if(arraydestino.length == 5 && arraydestino[4]!=""){ document.frsv01_8.codzon.value =  arraydestino[4]; }
					return true;
				}
			}

			return false;
		}
		
		function goToGate(){
		for(i=0;i<compat.length;i++){
			if(compat[i].substring(compat[i].indexOf('*')+1)==b){
			document.frsv01_8.action="http://www.hotelopia."+compat[i].substring(0,compat[i].indexOf('*'))+"/home/destinations/gateways.jsp";
			document.frsv01_8.codWeb.value=b;}
			}
		if(document.frsv01_8.destino_8.value=='000') {alert(noDest); return}
		nomDEgat = document.frsv01_8.destino_8.options[document.frsv01_8.destino_8.selectedIndex].value;
		nomDEgat=nomDEgat.toLowerCase();
		document.frsv01_8.gateway.value=nomDEgat;
		document.frsv01_8.target='_blank';
		
		//arreglando zanox
		document.frsv01_8.destino_8.name = "destino";
		
		document.frsv01_8.submit();
		}
		
		function clearRadioDest(form) { document.frsv01_8.radioDest.checked = false;
		for (var i=0; i<document.frsv01_8.radioDest.length; i++) { document.frsv01_8.radioDest[i].checked = false; } }

									
			/*Sintax (Tags must be between speech marks and separated by commas): Countries without available search (/Country_name), destinations (coddest/destination_name),  Countries with available search (#coddest/Country_name)*/					
dest_complete = new Array( "Almeria - Costa de Almeria,LEI,,,", "Adra,,LEI,LEI-25,", "Aguadulce,,LEI,LEI-10,", "Almeria city,,LEI,LEI-13,", "Almerimar,,LEI,LEI-20,", "Cabo de Gata,,LEI,LEI-12,", "El Ejido,,LEI,LEI-14,", "La Envia,,LEI,LEI-1,", "Mojacar,,LEI,LEI-30,", "Retamar,,LEI,LEI-11,", "Roquetas de Mar,,LEI,LEI-40,", "Vera,,LEI,LEI-50,", "Cadiz - Jerez,CAD,,,", "Arcos de la Frontera,,CAD,CAD-30,", "Benalup - Casas Viejas,,CAD,CAD-1,", "Cadiz,,CAD,CAD-99,", "Castelar de la Frontera,,CAD,CAD-3,", "Grazalema,,CAD,CAD-40,", "Jerez de la Frontera,,CAD,CAD-51,", "Jimena de la Frontera,,CAD,CAD-2,", "Olvera,,CAD,CAD-17,", "Vejer de la Frontera,,CAD,CAD-18,", "Villaluenga,,CAD,CAD-19,", "Cordoba,ODB,,,", "Baena,,ODB,ODB-2,", "Cordoba,,ODB,ODB-99,", "La Carlota,,ODB,ODB-3,", "La Rambla,,ODB,ODB-100,", "Lucena,,ODB,ODB-40,", "Montoro,,ODB,ODB-7,", "Palma del Rio,,ODB,ODB-30,", "PozoBlanco,,ODB,ODB-4,", "Priego de Cordoba,,ODB,ODB-20,", "Rute,,ODB,ODB-10,", "Zuheros,,ODB,ODB-60,", "Costa de la Luz -Cadiz,LUZ,,,", "Algeciras,,LUZ,LUZ-5,", "Chiclana - Sancti Petri,,LUZ,LUZ-15,", "Chipiona,,LUZ,LUZ-20,", "Conil de la Frontera,,LUZ,LUZ-25,", "Gibraltar area,,LUZ,GIBRALTAR,", "La Linea de la Concepcion,,LUZ,LUZ-30,", "Los Barrios,,LUZ,LUZ-31,", "Puerto de Santa Maria,,LUZ,LUZ-35,", "Rota,,LUZ,LUZ-40,", "San Fernando,,LUZ,LUZ-45,", "Sanlucar de Barrameda,,LUZ,LUZ-9,", "Sotogrande,,LUZ,LUZ-8,", "Tarifa,,LUZ,LUZ-48,", "Zahara de los Atunes,,LUZ,LUZ-50,", "Costa de la Luz -Huelva,LUS,,,", "El Rocio,,LUS,LUS-4,", "El Rompido - Cartaya,,LUS,LUS-6,", "Isla Canela - Ayamonte,,LUS,LUS-10,", "Isla Cristina,,LUS,LUS-15,", "Islantilla,,LUS,LUS-20,", "Matalascañas,,LUS,LUS-25,", "Mazagon,,LUS,LUS-35,", "Punta Umbria,,LUS,LUS-30,", "Costa del Sol,AGP,,,", "Algarrobo Costa,,AGP,AGP-14,", "Benahavis,,AGP,AGP-16,", "Benalmadena,,AGP,AGP-15,", "Estepona,,AGP,AGP-50,", "Estepona Area,,AGP,ESTEPONAAR,", "Fuengirola,,AGP,AGP-20,", "Fuengirola-Mijas Coast,,AGP,FUENMIJAS,", "Marbella,,AGP,AGP-30,", "Marbella Area,,AGP,MARBELLAAR,", "Mijas Costa,,AGP,AGP-25,", "Nerja,,AGP,AGP-45,", "Puerto Banus,,AGP,AGP-92,", "Puerto de la Duquesa,,AGP,AGP-6,", "Rincón de la Victoria,,AGP,AGP-3,", "San Pedro,,AGP,AGP-35,", "Torre del Mar,,AGP,AGP-37,", "Torremolinos,,AGP,AGP-10,", "Torremolinos-Benalmadena,,AGP,TORREBENAL,", "Torrox Costa,,AGP,AGP-9,", "Velez,,AGP,AGP-38,", "Costa Tropical,CTR,,,", "Almuñecar,,CTR,CTR-10,", "Carchuna,,CTR,CTR-50,", "La Herradura,,CTR,CTR-30,", "Motril,,CTR,CTR-20,", "Salobreña,,CTR,CTR-40,", "Granada,GRX,,,", "Albolote,,GRX,GRX-11,", "Bubion (Alpujarra),,GRX,GRX-16,", "Busquistar (Alpujarra),,GRX,GRX-19,", "Cajar,,GRX,GRX-4,", "Capileira,,GRX,GRX-24,", "Cenes de la Vega,,GRX,GRX-7,", "Dilar,,GRX,GRX-5,", "Durcal,,GRX,GRX-2,", "Fuensanta,,GRX,GRX-37,", "Galera,,GRX,GRX-17,", "Granada,,GRX,GRX-99,", "Guadix,,GRX,GRX-10,", "Guejar Sierra,,GRX,GRX-40,", "Lanjaron (Alpujarra),,GRX,GRX-18,", "Lodras,,GRX,GRX-34,", "Loja,,GRX,GRX-33,", "Monachil,,GRX,GRX-25,", "Montefrio,,GRX,GRX-15,", "Ogijares,,GRX,GRX-21,", "Orgiva (Alpujarra),,GRX,GRX-12,", "Riofrio,,GRX,GRX-13,", "Santa Fe,,GRX,GRX-3,", "Jaen,JEN,,,", "Andujar,,JEN,JEN-60,", "Baeza,,JEN,JEN-20,", "Bailen,,JEN,JEN-80,", "Baños de Encina,,JEN,JEN-1,", "Campillo de Arena,,JEN,JEN-11,", "Jaen,,JEN,JEN-99,", "La Carolina,,JEN,JEN-90,", "La Iruela (Cazorla),,JEN,JEN-40,", "Linares,,JEN,JEN-50,", "Marmolejo,,JEN,JEN-70,", "Mengiber,,JEN,JEN-2,", "Pozo Alcon,,JEN,JEN-36,", "Sabiote,,JEN,JEN-31,", "Sierra de Cazorla,,JEN,JEN-30,", "Ubeda,,JEN,JEN-10,", "Lerida,LER,,,", "Malaga,MAL,,,", "Alhaurin de la Torre,,MAL,MAL-2,", "Alhaurin el Grande,,MAL,MAL-20,", "Antequera,,MAL,MAL-40,", "Ardales,,MAL,MAL-30,", "Benalmadena Pueblo,,MAL,MAL-70,", "Benaojan,,MAL,MAL-100,", "Campanillas,,MAL,MAL-51,", "Canillas de Albaida,,MAL,MAL-9,", "Carratraca,,MAL,MAL-26,", "Casarabonela,,MAL,MAL-6,", "Colmenar,,MAL,MAL-93,", "Cortés de la Frontera,,MAL,MAL-7,", "Frigiliana,,MAL,MAL-64,", "Guacín,,MAL,MAL-3,", "Guadalmar,,MAL,MAL-23,", "Istan,,MAL,MAL-62,", "La Viñuela,,MAL,MAL-22,", "Malaga,,MAL,MAL-11,", "Malaga - Inland Area,,MAL,MALAGAINLA,", "Malaga City,,MAL,MAL-10,", "Mijas,,MAL,MAL-61,", "Ojen,,MAL,MAL-90,", "Parauta,,MAL,MAL-1,", "Parque Natural Monte Malaga,,MAL,MAL-52,", "Ronda,,MAL,MAL-60,", "Tolox,,MAL,MAL-53,", "Seville,SVQ,,,", "Alcala de Guadaira,,SVQ,SVQ-11,", "Benacazon,,SVQ,SVQ-3,", "Burguillos,,SVQ,SVQ-13,", "Carmona,,SVQ,SVQ-5,", "Cazalla de la Sierra,,SVQ,SVQ-10,", "Constantina,,SVQ,SVQ-6,", "Estepa,,SVQ,SVQ-14,", "Gerena,,SVQ,SVQ-8,", "Gines,,SVQ,SVQ-12,", "Guillena,,SVQ,SVQ-7,", "Osuna,,SVQ,SVQ-9,", "Sanlucar La Mayor,,SVQ,SVQ-2,", "Sevilla,,SVQ,SVQ-99,", "Utrera,,SVQ,SVQ-4,", "Sierra Nevada,SRN,,,", "Prado Llano,,SRN,SRN-2,", "Sierra Nevada road,,SRN,SRN-1," );

 			/*Sintax 1- Website, 2- Arrival Date, 3- Departure Date, 4- Rooms, 5- Adults per room, 6- Children per room, 7- SEARCH, 8- Main destinations */
lang_tags =  new Array ("UNITED KINGDOM", "Arrival Date", "Departure Date", "Rooms", "Adults per room", "Children per room", "SEARCH", "Main destinations");

month_tags =  new Array (" --------", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
dest_gatew = new Array("algarve/Algarve Hotels", "alicante/Alicante and Benidorm Hotels", "balearic/Balearic Islands Hotels", "barcelona/Barcelona Hotels", "canary/Canary Islands Hotels", "catalanc/Catalan Coast Hotels", "centroamerica/Central America Hotels", "cyprus/Cyprus Hotels", "egypt/Egypt Hotels", "european/European Cities Hotels", "france/France Hotels", "germany/Germany Hotels", "italy/Italy Hotels", "london/London Hotels", "madrid/Madrid Hotels", "majorca/Majorca Hotels", "malaga/Malaga & Costa del Sol Hotels", "portugal/Portugal Hotels", "spain/Spain Hotels", "turkey/Turkey Hotels", "england/United Kingdom Hotels", "usa/United States Hotels", "alicante/Valencia Hotels");


			wrongDest = 'Please select a destination within the country you have chosen';
			noDest = 'Please select a destination on the list.';
			wrongDates = 'Please recheck your dates.';

