function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  //alert('entro');
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); 
  //alert(x);
  return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments;
  document.MM_sr=new Array;
  for(i=0;i<(a.length-2);i+=3){
      if ((x=MM_findObj(a[i]))!=null){
          document.MM_sr[j++]=x;
          if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
      }
  }
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function Travel_swapImgRestore() { //v3.0
  var i,x,a=document.Travel_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function Travel_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.Travel_p) d.Travel_p=new Array();
    var i,j=d.Travel_p.length,a=Travel_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.Travel_p[j]=new Image; d.Travel_p[j++].src=a[i];}}
}
function Travel_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=Travel_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function Travel_swapImage() { //v3.0
  var i,j=0,x,a=Travel_swapImage.arguments; document.Travel_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=Travel_findObj(a[i]))!=null){document.Travel_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function submite(prog,par1,par2,par3,idioma){

	fo = document.forms['formudes'];
	fo.program.value=prog;
	fo.tipdes.value = par1;
	fo.idactual.value = par2;
	fo.idnew.value = par3;
	fo.lang.value=idioma;
	fo.submit()
}
function getUrlPrin(){
    urlprin = document.URL;
    pos = urlprin.indexOf('/en', 0);
    urlprin = urlprin.substr(0,pos+3);
    return urlprin;
}
function estoyEnDinamico(){
    urlprin = getUrlPrin();
    if (urlprin.indexOf('fauno.hola.com/en', 0) == -1)
        return false;
    else
        return true;
}
function submitecomboURL(formi,data,contdata,accion)
{
    finalu = '.html';
    if (estoyEnDinamico())
        finalu = '';
    if (contdata.length>0)
        url = getUrlPrin()+'/'+accion+'/'+data+'/'+contdata+finalu;
    else
        url = getUrlPrin()+'/'+accion+'/'+data+finalu;
    window.location=url;
}
function sumbmitecombotip(data)
{
	var datos = data.split(",");
	id = datos[0];
	tipotip= datos[1];
	formi = datos[2];
	
	fo = document.forms[formi];
	fo.tipo.value=tipotip;
	fo.idtip.value = id;
	fo.submit()
}
function submitecombo(formi,data){

	var datos = data.split(",");
	fo = document.forms[formi];	
	fo.idpag.value = datos[0];
	fo.idnew.value = datos[1];	
	fo.idvalor.value = datos[1];	
	
	fo.submit()
}
function submitecomboURL_idpag(formi,data){

	var datos = data.split(",");
	fo = document.forms[formi];	

	switch (datos[0])
	{
		case "DESCCAA":
			pagina="ccaa";
		break;
		case "DESCITY":
			pagina = "ciudades";
		break;
		case "DESLOC":
			pagina = "loc";		
		break;
		case "DESPROV":
			pagina = "ciudades";		
		break;
		case "DESCOAST":
			pagina = "costas";		
		break;
		case "DESBEACH":
			pagina = "playas";		
		break;
		case "DESCOASTINDEX":
			pagina = "costas";		
		break;
		case "DESGREATINDEX":
			pagina = "itinerarios";		
		break;
		case "DESPARQUE":
			pagina = "parque_nacional";		
		break;
		case "DESPARQINDEX":
			pagina = "parque_nacional";		
		break;
		case "DESWHINDEX":
			pagina = "patrimonio";		
		break;
	}
	
	direccion = pagina+'/'+datos[1];
	if (datos[2].length>0)
	{
		direccion = direccion + '/' + datos[2];
		if (datos[3].length>0)
			direccion = direccion + '/' + datos[3];
	}
	
	fo.action = fo.action + direccion;
	fo.submit()
}
function dameTipoPagina(codigo)
{
	pagina = "";
	switch (codigo)
	{
		case "DESCCAA":
			pagina="ccaa";
		break;
		case "DESCITY":
			pagina = "ciudades";
		break;
		case "DESLOC":
			pagina = "loc";		
		break;
		case "DESPROV":
			pagina = "prov";		
		break;
		case "DESCOAST":
			pagina = "costas";		
		break;
		case "DESBEACH":
			pagina = "playas";		
		break;
		case "DESCOASTINDEX":
			pagina = "costas";		
		break;
		case "DESGREATINDEX":
			pagina = "itinerarios";		
		break;
		case "DESPARQUE":
			pagina = "parque_nacional";		
		break;
		case "DESPARQINDEX":
			pagina = "parque_nacional";		
		break;
		case "DESWHINDEX":
			pagina = "patrimonio";		
		break;
	}
	return pagina;
}
function submitecombo_complex(data){
	var datos = data.split(",");
	pagina = dameTipoPagina(datos[0]);
	direccion = pagina;
	if (datos.length>=2)
	{
		if (datos[1].length>0) 
			direccion = direccion + '/' + datos[1];
	}
	if (datos.length>=3)
	{
		if (datos[2].length>0)
			direccion = direccion + '/' + datos[2];
	}
	if (datos.length>=4)
	{
		if (datos[3].length>0)
			direccion = direccion + '/' + datos[3];		
	}
	if (datos.length>=5)
	{
		if (datos[4].length>0)
			direccion = direccion + '/' + datos[4];		
	}
	if (datos.length>=6)
	{
		if (datos[5].length>0)
		{
			pagina = dameTipoPagina(datos[5]);
			if (pagina.length>0)
			{
				direccion = direccion + '/' + pagina;
				if (datos.length>=7)
				{
					if (datos[6].length>0)
						direccion = direccion + '/' + datos[6];
				}
			}
		}
	}
	finalu='.html';
    if (estoyEnDinamico())
        finalu = '';
    if (direccion.substr(0,1)==''+'/'+'')
        url = getUrlPrin() +'/'+'destinos'+direccion+finalu;
    else
        url = getUrlPrin() +'/'+'destinos'+'/'+direccion+finalu;
    window.location=url;
}
function submitecombo_complex_sinInfo(formi,data){

	var datos = data.split(",");
	fo = document.forms[formi];	
	pagina = dameTipoPagina(datos[0]);
	direccion = pagina;
	if (datos.length>=2)
	{
		if (datos[1].length>0) 
			direccion = direccion + '/' + datos[1];
	}
	if (datos.length>=3)
	{
		if (datos[2].length>0)
			direccion = direccion + '/' + datos[2];
	}
	if (datos.length>=4)
	{
		if (datos[3].length>0)
			direccion = direccion + '/' + datos[3];		
	}
	/*if (datos.length>=5)
	{
		if (datos[4].length>0)
			direccion = direccion + '/' + datos[4];		
	}*/
	if (datos.length>=5)
	{
		if (datos[4].length>0)
		{
			pagina = dameTipoPagina(datos[4]);
			if (pagina.length>0)
			{
				direccion = direccion + '/' + pagina;
				if (datos.length>=6)
				{
					if (datos[5].length>0)
						direccion = direccion + '/' + datos[5];
				}
			}
		}
	}
	fo.action = fo.action + 'destinos/'+direccion;	
	fo.submit()
}
function submiteSearchHotel()
{
	/*fo = document.forms['fohotel'];
	fo.submit() */
    region = document.getElementById("Cboregion").value;
    nombre = document.getElementById("txtbrowse").value;
    texto = region;
    if (region=='Seleccione...' || region=='Choose one' || region=='')
        texto=nombre;
    /*No hace falta busqueda dinámica poruq solo busca con el combo.
    *if (!estoyEnDinamico())
        url = getUrlPrin()+'/'+'indexb.php'+'?fSearch=fgal|'+texto;
    else*/
    url = getUrlPrin() + '/'+'buscar'+'/'+'fgal|'+texto;
    window.location=url;
}
function submiteBuscarDTTR()
{
	fo = document.forms['fosearch'];
	fo.action = fo.action;
	fo.submit();
}
function submiteBuscarDTTRprincipal()
{

    texto = document.getElementById('textobus').value;
    if (!estoyEnDinamico())
        url = getUrlPrin()+'/'+'indexb.php'+'?fSearch='+texto;
    else
        url = getUrlPrin() + '/'+'buscar'+'/'+texto;
    window.location=url;
}
function submiteBusquedaFotos(){
    region = document.getElementById("Cboregion").value;
    finalu='.html';
    if (estoyEnDinamico())
        finalu = '';
    urlprin = getUrlPrin();
    url = urlprin + '/'+'photos'+'/'+region+finalu;
    window.location=url;
}
function submiteBuscarHotel()
{
    region = document.getElementById("Cboregion").value;
    nombre = document.getElementById("fnombre").value;
    destino = document.getElementById("fdestino").value;
	if (region.length <= 0 || region == 'Choose one' || region == '' || region == 'Seleccione...') region="n";
	if (destino.length <=0) destino = "n";
	if (nombre.length<=0) nombre = "n";
    hotores = 'res';
    urlprin = getUrlPrin();
    urlconres = document.URL;
	if (urlconres.indexOf('/'+'restaurantes', 0)== -1 && urlconres.indexOf('/'+'res'+'/', 0)== -1 && urlconres.indexOf('hotores=res', 0)== -1) hotores = 'hot';
    if (!estoyEnDinamico())
        url = urlprin+'/'+'indexb.php?hotores='+hotores+'&Cboregion='+region+'&fdestino='+destino+'&fnombre='+nombre;
    else
        url = urlprin + '/'+'buscah'+'/'+hotores+'/'+region+'/'+destino+'/'+nombre;
    window.location=url;
}
function buscarHotelResta(hotores,destino){
    region = "n";
    nombre = "n";
    urlprin = getUrlPrin();
    if (!estoyEnDinamico())
        url = urlprin+'/'+'indexb.php?hotores='+hotores+'&Cboregion='+region+'&fdestino='+destino+'&nombre='+nombre;
    else
        url = urlprin + '/'+'buscah'+'/'+hotores+'/'+region+'/'+destino+'/'+nombre;
    window.location=url;

}
function getKeyCode(e){
e= (window.event)? event : e;
intKey = (e.keyCode)? e.keyCode: e.charCode;
return intKey;
}
function submitesearch_city(nom)
{
	iddestino = '';
	switch (nom)
	{
		case 'sgo compostela': iddestino='santiago de compostela';break;
		case 'bilbao': iddestino='bilbao';break;
		case 'san sebastian': iddestino='san sebastian';break;
		case 'barcelona': iddestino='barcelona';break;
		case 'zaragoza': iddestino='zaragoza';break;
		case 'madrid': iddestino='madrid';break;
		case 'toledo': iddestino='toledo';break;
		case 'valencia': iddestino='valencia';break;
		case 'sevilla': iddestino='sevilla';break;
		case 'granada': iddestino='granada';break;
		case 'malaga': iddestino='malaga';break;
	}
	document.getElementById("fdestino").value = iddestino;
    submiteBuscarHotel();
}
function submite_flash(nom){
	iddes='0';
	switch(nom)
	{
//Comunidades Autonomas
		case 'andalucia':iddes='43';idpag='DESCCAA';break;
		case 'galicia':iddes='64';idpag='DESCCAA';break;
		case 'baleares':iddes='46';idpag='DESCCAA';break;
		case 'murcia':iddes='68';idpag='DESCCAA';break;
		case 'aragon':iddes='44';idpag='DESCCAA';break;
		case 'navarra':iddes='69';idpag='DESCCAA';break;
		case 'catalunya':iddes='60';idpag='DESCCAA';break;
		case 'asturias':iddes='45';idpag='DESCCAA';break;
		case 'cantabria':iddes='48';idpag='DESCCAA';break;
		case 'vasco':iddes='70';idpag='DESCCAA';break;
		case 'leon':iddes='49';idpag='DESCCAA';break;
		case 'rioja':iddes='65';idpag='DESCCAA';break;
		case 'extremadura':iddes='63';idpag='DESCCAA';break;
		case 'madrid':iddes='66';idpag='DESCCAA';break;
		case 'la mancha':iddes='59';idpag='DESCCAA';break;
		case 'valencia':iddes='62';idpag='DESCCAA';break;
		case 'canarias':iddes='47';idpag='DESCCAA';break;
		//case 'ceuta':iddes='ceuta';idpag='DESCITY';break;
		case 'ceuta':iddes='61';idpag='DESCCAA';break;
		case 'melilla':iddes='67';idpag='DESCCAA';break;
		//case 'melilla':iddes='melilla';idpag='DESCITY';break;
		
		//Provincias
		case 'menorca':iddes='746';idpag='DESPROV';break;
		case 'mallorca':iddes='745';idpag='DESPROV';break;
		case 'ibiza':iddes='744';idpag='DESPROV';break;
		case 'formentera':iddes='743';idpag='DESPROV';break;
		case 'c_menorca':iddes='1255'; idpag='DESLOC';break;
		
		case 'lanzarote':iddes='751';idpag='DESPROV';break;
		case 'la palma':iddes='752';idpag='DESPROV';break;
		case 'tenerife':iddes='753';idpag='DESPROV';break;
		case 'la gomera':iddes='750';idpag='DESPROV';break;
		case 'gran canaria':iddes='749';idpag='DESPROV';break;
		case 'logrono':iddes='1012';idpag='DESCITY';break;
		case 'a coruña' :iddes='653';idpag='DESPROV';break;
		case 'caceres' :iddes='734';idpag='DESPROV';break;
		case 'badajoz' :iddes='733';idpag='DESPROV';break;
		case 'castellon':iddes='741';idpag='DESPROV';break;
		case 'valencia_p' :iddes='742';idpag='DESPROV';break;
		case 'alicante' :iddes='740';idpag='DESPROV';break;
		case 'bocairent':iddes='';idpag='DESPROV';break;
		case 'madrid_p' :iddes='805';idpag='DESCITY';break;
		case 'patones' :iddes='374';idpag='DESLOC';break;
		case 'escorial':iddes='';idpag='DESPROV';break;
		case 'cadiz':iddes='650';idpag='DESPROV';break;
        case 'acoruna':iddes='653';idpag='DESPROV';break;
		case 'cadiz_l':iddes='611';idpag='DESCITY';break;
		case 'arcos_l':iddes='186';idpag='DESLOC';break;
		case 'vejer_l':iddes='';idpag='DESLOC';break;
		
		
		//localidades
		case 'valencia_l' :iddes='8';idpag='DESLOC';break;
		case 'mojacar': iddes='317'; idpag='DESLOC'; break;
		case 'almeria_P': iddes='857'; idpag='DESLOC'; break;
		case 'hecho': iddes='302'; idpag='DESLOC'; break;
		case 'ainsa' : iddes='152'; idpag='DESLOC'; break;
		case 'huesca_l' : iddes='956'; idpag='DESCITY'; break;
		case 'calaceite' : iddes='247'; idpag='DESLOC'; break;
		case 'teruel_l': iddes='1266'; idpag='DESCITY'; break;
		case 'lastres': iddes='516'; idpag='DESLOC'; break;
		case 'cordoba_l': iddes='491'; idpag='DESCITY'; break;
		case 'zuheros': iddes='710'; idpag='DESLOC'; break;
		case 'aracena': iddes='176'; idpag='DESLOC'; break;
		case 'huelva_l': iddes='625'; idpag='DESCITY'; break;
		case 'ubeda': iddes='693'; idpag='DESLOC'; break;
		case 'baeza': iddes='224'; idpag='DESLOC'; break;
		case 'jaen_l': iddes='640'; idpag='DESCITY'; break;
		case 'lucena': idpag='DESLOC'; break;
		case 'sevilla_l': iddes='540'; idpag='DESLOC'; break;
		case 'carmona': iddes='254'; idpag='DESLOC'; break;
		case 'ecija': iddes='702'; idpag='DESLOC'; break;
		case 'uncastillo': iddes='464'; idpag='DESLOC'; break;
		case 'zaragoza_l': iddes='1023'; idpag='DESCITY'; break;
		case 'deia': iddes='276'; idpag='DESLOC'; break;
		case 'lleida_l': iddes='1147'; idpag='DESCITY'; break;
		case 'frontera': iddes=''; idpag='DESLOC'; break;
		case 'rosario': iddes=''; idpag='DESLOC'; break;
		case 'arevalo': iddes='208'; idpag='DESLOC'; break;
		case 'burgos_l': iddes='796'; idpag='DESCITY'; break;
		case 'covarrubias': iddes='270'; idpag='DESLOC'; break;
		case 'peñafield': iddes='386'; idpag='DESLOC'; break;
		case 'valladolid_l': iddes='1201'; idpag='DESCITY'; break;
		case 'medina del campo': iddes=''; idpag='DESLOC'; break;
		case 'ciudad real_l': iddes='1059'; idpag='DESCITY'; break;
		case 'almagro': iddes='166'; idpag='DESLOC'; break;
		case 'cuenca_l': iddes='577'; idpag='DESCITY'; break;
		case 'belmonte': iddes='232'; idpag='DESLOC'; break;
		case 'siguenza': iddes='445'; idpag='DESLOC'; break;
		case 'guadalajara_l': iddes='1078'; idpag='DESCITY'; break;
		case 'barcelona_l': iddes='755'; idpag='DESCITY'; break;
		case 'rupit': iddes=''; idpag='DESLOC'; break;
		case 'girona_l': iddes='1068'; idpag='DESCITY'; break;
		case 'santa pau': iddes='436'; idpag='DESLOC'; break;
		case 'pals': iddes='365'; idpag='DESLOC'; break;
		case 'caceres_l': iddes='906'; idpag='DESCITY'; break;
		case 'trujillo': iddes='457'; idpag='DESLOC'; break;
		case 'allariz': iddes='157'; idpag='DESLOC'; break;
		case 'gijon_l':iddes='1433';idpag='DESCITY';break;
		case 'vitoria': iddes='1128'; idpag='DESCITY';break;
		case 'pamplona': iddes='1137'; idpag='DESCITY';break;
		case 'oviedo_l':iddes='1119';idpag='DESCITY';break;
		case 'combarro': iddes='511'; idpag='DESLOC'; break;
		case 'pontevedra_l': iddes='1110'; idpag='DESCITY'; break;
		case 'vigo': iddes='1446'; idpag='DESLOC'; break;
		case 'ourense_l': iddes='1104'; idpag='DESCITY'; break;
		case 'granada_l':iddes='521'; idpag='DESCITY'; break;
		case 'ibiza_l': iddes='963';idpag='DESCITY';break;
		case 'pontedeume_l': iddes='401';idpag='DESLOC';break;
		case 'coruna_l':iddes='1258';idpag='DESCITY';break;
		case 'sgo compostela_l':iddes='995';idpag='DESCITY';break;
		case 'malaga_l':iddes='560'; idpag='DESCITY'; break;
		case 'ronda_l':iddes='417'; idpag='DESLOC';break;
		case 'mallorca_l':iddes='865';idpag='DESCITY';break;
		case 'santillana':iddes='193';idpag='DESLOC';break;
		case 'avila_l':iddes='948';idpag='DESCITY';break;
		case 'osma':iddes='281';idpag='DESLOC';break;
		case 'soria_l':iddes='1184';idpag='DESCITY';break;
		case 'albacete_l':iddes='929';idpag='DESCITY';break;
        case 'santander':iddes='1377';idpag='DESCITY';break;
		case 'toledo_l':iddes='1022';idpag='DESCITY';break;
		case 'oropesa':iddes='1093';idpag='DESLOC';break;
		case 'escorial':iddes='430';idpag='DESLOC';break;
		case 'carrion':iddes='261';idpag='DESLOC';break;
		case 'pedraza':iddes='380';idpag='DESLOC';break;
		case 'peñafiel':iddes='386'; idpag='DESLOC';break;
		case 'sanabria':iddes='412'; idpag='DESLOC';break;
		case 'mondonedo_l': iddes='1253'; idpag='DESLOC';break;
		case 'lugo_l': iddes='1095'; idpag='DESCITY';break;
		case 'formentera_l':iddes='1254'; idpag='DESLOC';break;
		case 'murcia_p':iddes='1227';idpag='DESCITY';break;
		case 'santa cruz':iddes='1243';idpag='DESCITY';break;
        case 'canaria_w':iddes='1469';idpag='DESCITY';break;
        case 'san cristobal':iddes='1469'; idpag='DESCITY';break;
				
		case 'arties':iddes='218';idpag='DESLOC';break;
		case 'montblanc':iddes='325';idpag='DESLOC';break;
		case 'alicante':iddes='740';idpag='DESPROV';break;
		case 'badajoz_l':iddes='1035';idpag='DESCITY';break;
		case 'potes':iddes='408';idpag='DESLOC';break;
		case 'mundaka':iddes='347'; idpag='DESLOC';break;
		case 'bilbao':iddes='866';idpag='DESCITY';break;
		case 'getaria':iddes='294'; idpag='DESLOC';break;
		case 'san sebastian_l':iddes='885';idpag='DESCITY';break;
		case 'laguardia':iddes='312';idpag='DESLOC';break;
		case 'rupit':iddes='426'; idpag = 'DESLOC';break;
		case 'ibiza_l':iddes='963'; idpag='DESCITY';break;
		case 'alicante_l':iddes='938'; idpag='DESCITY';break;
		case 'guadalest':iddes='299';idpag='DESLOC';break;
		case 'morella':iddes='339';idpag='DESLOC';break;
		case 'peñiscola':iddes='393'; idpag='DESLOC';break;
		case 'castellon_l':iddes='1044';idpag='DESCITY';break;
		case 'bocairent':iddes='240'; idpag='DESLOC';break;
		
		
		case 'huelva':iddes='654';idpag='DESPROV';break;
		case 'sevilla':iddes='656';idpag='DESPROV';break;
		case 'cordoba':iddes='651';idpag='DESPROV';break;
		case 'jaen':iddes='639';idpag='DESPROV';break;
		case 'malaga':iddes='655';idpag='DESPROV';break;
		case 'granada':iddes='652';idpag='DESPROV';break;
		case 'almeria':iddes='649';idpag='DESPROV';break;
		case 'huesca': iddes='718';idpag='DESPROV';break;
		case 'zaragoza': iddes='720'; idpag='DESPROV'; break;
		case 'teruel': iddes='719'; idpag='DESPROV';  break;

		case 'leon_p': iddes='676'; idpag='DESPROV'; break;
		case 'barcelona': iddes='738'; idpag='DESPROV'; break;
		case 'zaragoza': iddes='720'; idpag='DESPROV'; break;
		case 'toledo': iddes='725'; idpag='DESPROV'; break;
		case 'sevilla': iddes='656'; idpag='DESPROV'; break;
		case 'girona': iddes='735'; idpag='DESPROV'; break;
		case 'tarragona': iddes='737'; idpag='DESPROV'; break;
		case 'tarragona_l':iddes='1158'; idpag='DESCITY'; break;
		case 'lleida': iddes='736'; idpag='DESPROV'; break;
		case 'guadalajara': iddes='724'; idpag='DESPROV'; break;
		case 'cuenca': iddes='723'; idpag='DESPROV'; break;
		case 'ciudad real': iddes='722'; idpag='DESPROV'; break;
		case 'albacete': iddes='721'; idpag='DESPROV'; break;
		case 'lugo': iddes='657'; idpag='DESPROV';break;
		case 'lugo_l':iddes='1095';idpag='DESCITY';break;
		case 'ourense': iddes='659'; idpag='DESPROV';break;
		case 'pontevedra': iddes='660'; idpag='DESPROV';break;		
		case 'pontevedra_l':iddes='1110'; idpag='DESCITY'; break;
		
		case 'ezcaray': iddes='288'; idpag='DESLOC';break;		
		case 'olite': iddes='350'; idpag='DESLOC';break;		
		case 'alava': iddes='667'; idpag='DESPROV';break;		
		case 'guipuzcoa': iddes='668'; idpag='DESPROV';break;				
		case 'vizcaya': iddes='669'; idpag='DESPROV';break;						
		case 'avila': iddes='638'; idpag='DESPROV'; break;
		case 'moratalla': iddes='333'; idpag='DESLOC'; break;
		case 'el hierro': iddes='747'; idpag='DESPROV'; break;		
		case 'fuerteventura': iddes='748'; idpag='DESPROV'; break;				
		case 'burgos': iddes='726'; idpag='DESPROV'; break;
		case 'palencia': iddes='727'; idpag='DESPROV'; break;
		case 'salamanca': iddes='728'; idpag='DESPROV'; break;		
		case 'segovia': iddes='729'; idpag='DESPROV'; break;				
		case 'soria': iddes='730'; idpag='DESPROV'; break;						
		case 'valladolid': iddes='731'; idpag='DESPROV'; break;								
		case 'zamora': iddes='732'; idpag='DESPROV'; break;			
		case 'segovia_l':iddes='1191';idpag='DESCITY';break;
		
		//ciudades
		case 'sgo compostela_c':iddes='995'; idpag='DESCITY';break;
		case 'bilbao_c':iddes='866'; idpag='DESCITY';break;
		case 'san sebastian_c':iddes='885'; idpag='DESCITY';break;
		case 'barcelona_c':iddes='755'; idpag='DESCITY';break;
		case 'zaragoza_c':iddes='1023'; idpag='DESCITY';break;
		case 'madrid_c':iddes='805'; idpag='DESCITY';break;
		case 'toledo_c':iddes='1022'; idpag='DESCITY';break;
		case 'valencia_c':iddes='8'; idpag='DESCITY';break;		
		case 'sevilla_c':iddes='540'; idpag='DESCITY';break;
		case 'granada_c':iddes='521'; idpag='DESCITY';break;	
		case 'malaga_c':iddes='560';idpag='DESCITY';break;
		case 'cordoba_c':iddes='491';idpag='DESCITY';break;
		case 'jaen_c':iddes='640';idpag='DESCITY';break;
		case 'cadiz_c':iddes='611';idpag='DESCITY';break;
        case 'burgos_c':iddes='796';idpag='DESCITY';break;
        case 'guadalajara_c':iddes='1078';idpag='DESCITY';break;
        case 'teruel_c':iddes='1266';idpag='DESCITY';break;
        case 'castellon_c':iddes='1044';idpag='DESCITY';break;
        case 'elche_c':iddes='1481';idpag='DESCITY';break;

        case 'sanmillan_c':iddes='716';idpag='DESLOC';break;
        case 'santodomingo_c':iddes='726'; idpag='DESPROV'; break;

        case 'valladolid_c':iddes='1201';idpag='DESCITY';break;
        case 'salamanca_c':iddes='1219';idpag='DESCITY';break;
        case 'avila_c':iddes='948';idpag='DESCITY';break;
        case 'alcaladehenares_c':iddes='1491';idpag='DESCITY';break;

        case 'gijon_c':iddes='1433';idpag='DESCITY';break;
        case 'leon_c':iddes='1168';idpag='DESCITY';break;
        case 'zamora_c':iddes='1209';idpag='DESCITY';break;
        case 'salamanca_c':iddes='1219';idpag='DESCITY';break;
        case 'caceres_c':iddes='906';idpag='DESCITY';break;
        case 'merida_c':iddes='1391';idpag='DESCITY';break;

        case 'logrono_c':iddes='1012';idpag='DESCITY';break;
        case 'pamplona_c':iddes='1137';idpag='DESCITY';break;

        case 'girona_c':iddes='1068';idpag='DESCITY';break;
        case 'palmamallorca_c':iddes='865';idpag='DESCITY';break;
        case 'caceres_c':iddes='906';idpag='DESCITY';break;
        case 'segovia_c':iddes='1191';idpag='DESCITY';break;
        case 'oviedo_c':iddes='1119';idpag='DESCITY';break;
        

        case 'besalu_c':iddes='1329';idpag='DESLOC';break;
        case 'hervas_c':iddes='1411';idpag='DESLOC';break;
        case 'tarazona_c':iddes='1333';idpag='DESLOC';break;










		//Costas
		case 'riasbajas_co':iddes='97'; idpag='DESCOAST';break;		
		case 'riasaltas_co':iddes='96'; idpag='DESCOAST';break;		
		case 'costaverde_co':iddes='93'; idpag='DESCOAST';break;		
		case 'cantabria_co':iddes='83'; idpag='DESCOAST';break;		
		case 'costavasca_co':iddes='92'; idpag='DESCOAST';break;		
		case 'costabrava_co':iddes='79'; idpag='DESCOAST';break;		
		case 'maresme_co':iddes='88'; idpag='DESCOAST';break;		
		case 'garraf_co':iddes='87'; idpag='DESCOAST';break;		
		case 'dorada_co':iddes='90'; idpag='DESCOAST';break;		
		case 'azahar_co':iddes='86'; idpag='DESCOAST';break;		
		case 'valencia_co':iddes='85'; idpag='DESCOAST';break;		
		case 'baleares_co':iddes='94'; idpag='DESCOAST';break;		
		case 'blanca_co':iddes='78'; idpag='DESCOAST';break;		
		case 'calida_co':iddes='80'; idpag='DESCOAST';break;		
		case 'almeria_co':iddes='82'; idpag='DESCOAST';break;		
		case 'tropical_co':iddes='91'; idpag='DESCOAST';break;		
		case 'del sol_co':iddes='89'; idpag='DESCOAST';break;		
		case 'de la luz_co':iddes='84'; idpag='DESCOAST';break;		
		case 'canarias_co':iddes='95'; idpag='DESCOAST';break;
        case 'morte_co':iddes='81'; idpag='DESCOAST';break;
        case 'marinalucense_co':iddes='1528'; idpag='DESCOAST';break;
        case 'terresdelebre_co':iddes='1523'; idpag='DESCOAST';break;





		
		//WH
		case 'caceres_w': iddes='906'; idpag='DESCITY'; break;
		case 'cuenca_w': iddes='577'; idpag='DESCITY'; break;
		case 'ibiza_w': iddes='963';idpag='DESCITY';break;
		case 'granada_w':iddes='521'; idpag='DESCITY'; break;
		case 'cordoba_w': iddes='491'; idpag='DESCITY'; break;
		case 'sgo compostela_w':iddes='995'; idpag='DESCITY';break;
		case 'salamanca_w':iddes='1219';idpag='DESCITY';break;
		case 'segovia_w':iddes='1191';idpag='DESCITY';break;		
		case 'alcala_w':iddes='';idpag='DESCITY';break;				
		case 'tarragona_w':iddes='1158';idpag='DESCITY';break;						
		case 'avila_w':iddes='948';idpag='DESCITY';break;								
		case 'toledo_w':iddes='1022';idpag='DESCITY';break;										
		case 'merida_w':iddes='';idpag='DESCITY';break;												
		case 'canaria_w':iddes='';idpag='DESCITY';break;														
		
		case 'leon_l':iddes='1168';idpag='DESCITY';break;
		case 'castrillo':iddes='268';idpag='DESLOC';break;
		case 'palencia_l':iddes='1176';idpag='DESCITY';break;
		case 'zamora_l': iddes='1209'; idpag='DESCITY'; break;					
		case 'salamanca_l':iddes='1219';idpag='DESCITY';break;
		
		case 'islas galicia':iddes='484';idpag='DESPARQUE';break;
		case 'picos europa':iddes='487';idpag='DESPARQUE';break;
		case 'ordesa':iddes='486';idpag='DESPARQUE';break;
		case 'sant maurici':iddes='477';idpag='DESPARQUE';break;
		case 'montfrague':iddes='485';idpag='DESPARQUE';break;
		case 'cabaneros':iddes='478';idpag='DESPARQUE';break;
		case 'tablas daimiel':iddes='481';idpag='DESPARQUE';break;
		case 'donana':iddes='482';idpag='DESPARQUE';break;
		case 'sierra nevada':iddes='488';idpag='DESPARQUE';break;
		case 'archipielago cabrera':iddes='479';idpag='DESPARQUE';break;
		case 'taburiente':iddes='480';idpag='DESPARQUE';break;
		case 'garajonay':iddes='483';idpag='DESPARQUE';break;
		case 'teide':iddes='489';idpag='DESPARQUE';break;		
		case 'timanfaya':iddes='490';idpag='DESPARQUE';break;				
        //playas
        case 'playa_muscleres':iddes='130';idpag='DESBEACH';label='79';break;
        case 'cala_ramon':iddes='143';idpag='DESBEACH';label='79';break;
        case 'playa_cristina':iddes='142';idpag='DESBEACH';label='79';break;
        case 'playa_olimpica':iddes='151';idpag='DESBEACH';label='88';break;
        case 'playa_garraf':iddes='120';idpag='DESBEACH';label='87';break;
        case 'cala_fonda':iddes='105';idpag='DESBEACH';label='90';break;
        case 'cala_pebretyrusso':iddes='107';idpag='DESBEACH';label='86';break;
        case 'el_saler':iddes='116';idpag='DESBEACH';label='85';break;
        case 'algaiarens':iddes='98';idpag='DESBEACH';label='94';break;
        case 'migjorn':iddes='136';idpag='DESBEACH';label='94';break;
        case 'playa_saura':iddes='146';idpag='DESBEACH';label='94';break;
        case 'playa_trec':iddes='117';idpag='DESBEACH';label='94';break;
        case 'cala_deia':iddes='112';idpag='DESBEACH';label='94';break;
        case 'formentor':iddes='118';idpag='DESBEACH';label='94';break;
        case 'cala_conta':iddes='106';idpag='DESBEACH';label='94';break;
        case 'ses_illetes':iddes='144';idpag='DESBEACH';label='94';break;

        case 'playa_granadella':iddes='121';idpag='DESBEACH';label='78';break;
        case 'playa_arenal':iddes='99';idpag='DESBEACH';label='78';break;
        case 'playa_tabarca':iddes='147';idpag='DESBEACH';label='78';break;
        case 'playa_guardamar':iddes='113';idpag='DESBEACH';label='78';break;
        case 'playa_cablanque':iddes='108';idpag='DESBEACH';label='80';break;
        case 'playa_carolina':iddes='127';idpag='DESBEACH';label='80';break;
        case 'los_muertos':iddes='133';idpag='DESBEACH';label='82';break;
        case 'monsul':iddes='137';idpag='DESBEACH';label='82';break;
        case 'playa_rijana':iddes='126';idpag='DESBEACH';label='91';break;
        case 'playa_canuelo':iddes='115';idpag='DESBEACH';label='89';break;

        case 'bolonia':iddes='104';idpag='DESBEACH';label='84';break;
        case 'playa_meca':iddes='109';idpag='DESBEACH';label='84';break;
        case 'playa_rompido':iddes='119';idpag='DESBEACH';label='84';break;
        //Matalascañas no tiene link en el mapa ????
        case 'matalascanas':iddes='';idpag='DESBEACH';label='84';break;

        case 'roda':iddes='141';idpag='DESBEACH';label='97';break;
        case 'america':iddes='140';idpag='DESBEACH';label='97';break;
        //corrubedo no tiene link a la derecha, no se cual es el iddes
        //castro de baroña no tiene link ???
        //case 'corrubedo':iddes='';idpag='DESBEACH';label='97';break;

        case 'catedrais':iddes='100';idpag='DESBEACH';label='1528';break;

        case 'barayo':iddes='102';idpag='DESBEACH';label='93';break;
        case 'ballota':iddes='101';idpag='DESBEACH';label='93';break;
        case 'silencio':iddes='145';idpag='DESBEACH';label='93';break;
        case 'verdicio':iddes='150';idpag='DESBEACH';label='93';break;
        case 'franca':iddes='125';idpag='DESBEACH';label='93';break;
        case 'oyambre':iddes='138';idpag='DESBEACH';label='83';break;
        case 'liencres':iddes='131';idpag='DESBEACH';label='83';break;
        case 'langre':iddes='129';idpag='DESBEACH';label='83';break;
//el mapa de canarias está mal las referencias a las playas no coinciden
        case 'playa_jandia':iddes='132';idpag='DESBEACH';label='95';break;
        case 'playa_jandia':iddes='134';idpag='DESBEACH';label='95';break;
        case 'dunas_corralejo':iddes='123';idpag='DESBEACH';label='95';break;
        case 'acantilado_gigantes':iddes='111';idpag='DESBEACH';label='95';break;
        case 'playa_papagayo':iddes='139';idpag='DESBEACH';label='95';break;
        case 'los_muertos':iddes='133';idpag='DESBEACH';label='82';break;
        case 'itzurun':iddes='122'; idpag='DESBEACH';label='92';break;
		case 'larga':iddes='128'; idpag='DESBEACH';label='92';break;
	}
    if (iddes == 0) alert(nom);
    pagina = dameTipoPagina(idpag);
    acaba = '.html';
    if (estoyEnDinamico()) var acaba = '';
    urlprin = document.URL;
    pos = urlprin.indexOf('destinos', 0);
    urlprin = urlprin.substr(0,pos+8);
    if (idpag != "DESBEACH")
        url = urlprin + '/' + pagina + '/' + iddes + acaba;
    else
        url = urlprin + '/' +pagina + '/' + iddes + '/' + label + acaba;
    window.location=url;
}
function abrirventana(url)
{
	newwindow=window.open(url,'name','height=620,width=920');
	if (window.focus) {newwindow.focus()}
}
function visocu(namediv)
{
	if (document.getElementById(namediv).style.visibility=="visible")
	{
		document.getElementById(namediv).style.visibility="hidden";
		document.getElementById(namediv).style.height="0";
	}
	else
	{
		document.getElementById(namediv).style.visibility="visible";
		document.getElementById(namediv).style.height="auto";
	}
}
