				
				//copiado del creatives.js añadiendo "_14" 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_14(wacha,QUI,QuinSelect){
				form=(!document.frsv01_14)?document.getElementById('dasize_14').getElementsByTagName('form')[0]:document.frsv01_14;
				var newElement = document.createElement('option');
				newElement.setAttribute('value',QUI);
				document.frsv01_14.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_14(){
		if((parseFloat(iniDay)+14)>=days){
			BBday=(parseFloat(iniDay)+14)-days;
			document.frsv01_14.mesE_14.options[document.frsv01_14.mesE_14.selectedIndex+1].selected=true;putDaDay_14('diaE_14',document.frsv01_14.mesE_14);	
			document.frsv01_14.mesS_14.options[document.frsv01_14.mesE_14.selectedIndex].selected=true;putDaDay_14('diaS_14',document.frsv01_14.mesS_14);
			document.frsv01_14.diaE_14.options[BBday].selected=true;		
			}
		else{ BBday=(parseFloat(iniDay)+14);
			  document.frsv01_14.diaE_14.options[BBday].selected=true;}
		if((BBday+3)>=days){
			Fday=(parseFloat(BBday)+3)-days;
			if(document.frsv01_14.mesS_14.selectedIndex<document.frsv01_14.mesE_14.selectedIndex){ document.frsv01_14.mesS_14.selectedIndex=document.frsv01_14.mesE_14.selectedIndex;putDaDay_14('diaS_14',document.frsv01_14.mesS_14);}
			else document.frsv01_14.mesS_14.options[document.frsv01_14.mesE_14.selectedIndex+1].selected=true;putDaDay_14('diaS_14',document.frsv01_14.mesS_14);
			document.frsv01_14.diaS_14.options[Fday].selected=true;
			}
		else {Fday=(parseFloat(BBday)+3);
			 document.frsv01_14.diaS_14.options[Fday].selected=true;}
			} 
	function monthOK_14(){if(document.frsv01_14.mesS_14.selectedIndex<document.frsv01_14.mesE_14.selectedIndex) document.frsv01_14.mesS_14.selectedIndex=document.frsv01_14.mesE_14.selectedIndex;}
	function putDaDay_14(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_14(JDay,JDay,wachaD);
		}
		document.getElementById(wachaD).options[elQtoca].selected=true;
		} 
	
		compat= new Array('com*hus','ie*hie','co.uk*huk','es*hes','fr*hfr','de*hde','nl*hnl','it*hit','com*wgrav');
			
	function goToSearch_14(){fdest_14=document.frsv01_14.destino_14.value;
		if(!XvX){
		for(i=0;i<compat.length;i++){
			if(compat[i].substring(compat[i].indexOf('*')+1)==b){
			document.frsv01_14.action="http://www.hotelopia."+compat[i].substring(0,compat[i].indexOf('*'))+"/search.jsp";
			document.frsv01_14.codWeb.value=b; break;}
			}} 
		if(fdest_14.indexOf('AZlist')!=-1) {document.frsv01_14.action='http://www.hotelopia.'+compat[i].substring(0,compat[i].indexOf('*'))+'/az_list.jsp?let=A&country=All';document.frsv01_14.submit();document.frsv01_14.action=''; return;}
		if(document.frsv01_14.mesE_14.selectedIndex > document.frsv01_14.mesS_14.selectedIndex || (document.frsv01_14.diaE_14.selectedIndex>=document.frsv01_14.diaS_14.selectedIndex && document.frsv01_14.mesE_14.selectedIndex == document.frsv01_14.mesS_14.selectedIndex)) { alert(wrongDates); return;}
		if(fdest_14=='000') { alert(noDest);document.frsv01_14.destino_14.focus(); return;}
		if(fdest_14.indexOf(',,,,')!=-1) { alert(wrongDest);document.frsv01_14.destino_14.focus(); return;}
		cargardestino_14(form,fdest_14);
		document.getElementById('mesE_14').style.color='#FFFFFF';
		document.getElementById('mesS_14').style.color='#FFFFFF';
		document.frsv01_14.target='_blank';
		
		//arreglando zanox
		document.frsv01_14.destino_14.name = "destino";
		document.frsv01_14.diaE_14.name = "diaE";
		document.frsv01_14.mesE_14.name = "mesE";
		document.frsv01_14.diaS_14.name = "diaS";
		document.frsv01_14.mesS_14.name = "mesS";
		document.frsv01_14.nhab_14.name = "nhab";
		document.frsv01_14.nad_14.name = "nad";
		document.frsv01_14.nnins_14.name = "nnins";
		
		document.frsv01_14.submit();
		document.frsv01_14.mesE_14.value=String(parseInt(document.frsv01_14.mesE_14.value));
		document.frsv01_14.mesS_14.value=String(parseInt(document.frsv01_14.mesS_14.value));
		document.getElementById('mesE_14').style.color='#000000';
		document.getElementById('mesS_14').style.color='#000000';
        document.frsv01_14.destino_14.selectedIndex=0;
		}
		
	function goToSearchradio(){fdest_14=document.frsv01_14.destino_14.value; 
		for(i=0;i<compat.length;i++){
			if(compat[i].substring(compat[i].indexOf('*')+1)==b){
			document.frsv01_14.action="http://www.hotelopia."+compat[i].substring(0,compat[i].indexOf('*'))+"/search.jsp";
			document.frsv01_14.codWeb.value=b; break;}
			} 
		if(fdest_14.indexOf('AZlist')!=-1) {document.frsv01_14.action='http://www.hotelopia.'+compat[i].substring(0,compat[i].indexOf('*'))+'/az_list.jsp?let=A&country=All';document.frsv01_14.submit();document.frsv01_14.action=''; return;}
		if(document.frsv01_14.mesE_14.selectedIndex > document.frsv01_14.mesS_14.selectedIndex || (document.frsv01_14.diaE_14.selectedIndex>=document.frsv01_14.diaS_14.selectedIndex && document.frsv01_14.mesE_14.selectedIndex == document.frsv01_14.mesS_14.selectedIndex)) { alert(wrongDates); return;}
		
		if(document.frsv01_14.radioDest.checked){ fdest_14 = document.frsv01_14.radioDest.value; }
		for (var i=0; i<document.frsv01_14.radioDest.length; i++) { if (document.frsv01_14.radioDest[i].checked){	fdest_14 = document.frsv01_14.radioDest[i].value; break; } }
		
		if(fdest_14=='000') { alert(noDest);document.frsv01_14.destino_14.focus(); return;}
		if(fdest_14.indexOf(',,,,')!=-1) { alert(wrongDest);document.frsv01_14.destino_14.focus(); return;}
		cargardestino_14(form,fdest_14);
		document.getElementById('mesE_14').style.color='#FFFFFF';
		document.getElementById('mesS_14').style.color='#FFFFFF';
		document.frsv01_14.target='_blank';
		
		
		document.frsv01_14.destino_14.name = "destino";
		document.frsv01_14.mesE_14.name = "mesE";
		document.frsv01_14.mesS_14.name = "mesS";
		document.frsv01_14.diaE_14.name = "diaE";
		document.frsv01_14.diaS_14.name = "diaS";
		document.frsv01_14.nhab_14.name = "nhab";
		document.frsv01_14.nad_14.name = "nad";
		document.frsv01_14.nnins_14.name = "nnins";
		
		document.frsv01_14.submit();
		document.frsv01_14.mesE_14.value=String(parseInt(document.frsv01_14.mesE_14.value));
		document.frsv01_14.mesS_14.value=String(parseInt(document.frsv01_14.mesS_14.value));
		document.getElementById('mesE_14').style.color='#000000';
		document.getElementById('mesS_14').style.color='#000000';
        document.frsv01_14.destino_14.selectedIndex=0;		
		}
		
		function cargardestino_14(Qform, destinoCompacto){
			document.frsv01_14.codagrdest.value=""; document.frsv01_14.coddest.value=""; document.frsv01_14.codagrzon.value=""; document.frsv01_14.codzon.value="";
			arraydestino = destinoCompacto.split(',');
			if(arraydestino.length < 2){ return false; } document.frsv01_14.nomdest.value =arraydestino[0]; 
			if(arraydestino[1]!=""){ document.frsv01_14.codagrdest.value = arraydestino[1]; return true; }
			if(arraydestino.length >= 3){
				if(arraydestino[2]!=""){
					document.frsv01_14.coddest.value = arraydestino[2];
					if(arraydestino.length >= 4 && arraydestino[3]!=""){ document.frsv01_14.codagrzon.value = arraydestino[3]; }
					if(arraydestino.length == 5 && arraydestino[4]!=""){ document.frsv01_14.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_14.action="http://www.hotelopia."+compat[i].substring(0,compat[i].indexOf('*'))+"/home/destinations/gateways.jsp";
			document.frsv01_14.codWeb.value=b;}
			}
		if(document.frsv01_14.destino_14.value=='000') {alert(noDest); return}
		nomDEgat = document.frsv01_14.destino_14.options[document.frsv01_14.destino_14.selectedIndex].value;
		nomDEgat=nomDEgat.toLowerCase();
		document.frsv01_14.gateway.value=nomDEgat;
		document.frsv01_14.target='_blank';
		
		//arreglando zanox
		document.frsv01_14.destino_14.name = "destino";
		
		document.frsv01_14.submit();
		}
		
		function clearRadioDest(form) { document.frsv01_14.radioDest.checked = false;
		for (var i=0; i<document.frsv01_14.radioDest.length; i++) { document.frsv01_14.radioDest[i].checked = false; } }