var state = new Array("Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burma", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", "Chile", "China", "Colombia", "Comoros", "Congo, Democratic Republic", "Congo, Republic of the", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Greece", "Greenland", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, North", "Korea, South", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Mongolia", "Morocco", "Monaco", "Mozambique", "Namibia", "Nauru", "Nepal", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", "Oman", "Pakistan", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Samoa", "San Marino", " Sao Tome", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe"); var nav4 = window.Event ? true : false; var leng=""; if(leng==""){ leng="ES"; } function acceptNum(evt){ // NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57 var key = nav4 ? evt.which : evt.keyCode; return (key <= 13 || (key >= 48 && key <= 57)); } function validar(form){ if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(form.mail.value)){ var ok="si"; } else { if(leng=="ES")alert("MAIL INCORRECTO"); if(leng=="EN")alert("MAIL INCORRECT"); if(leng=="GE")alert("E-MAIL NICHT KORREKT"); form.mail.focus(); return (false); } if (form.mail.value==""){ if(leng=="ES")alert("Campo e-Mail obligatorio"); if(leng=="EN")alert("E-Mail obligatory"); if(leng=="GE")alert("E-Mail ist Pflichtfeld"); form.mail.focus(); return false; } if (form.psw.value==""){ if(leng=="ES")alert("Campo password obligatorio"); if(leng=="EN")alert("Password obligatory"); if(leng=="GE")alert("Kennwort ist Pflichtfeld"); form.psw.focus(); return false; } if (form.psw2.value==""){ if(leng=="ES")alert("Confirmación Password obligatoria"); if(leng=="EN")alert("Confirmatión of Password obligatory"); if(leng=="GE")alert("Kennwortbestätigung ist Pflichtfeld"); form.psw2.focus(); return false; } if (form.psw.value!=form.psw2.value){ if(leng=="ES")alert("No coinciden los passwords"); if(leng=="EN")alert("Password doesn’t coincide"); if(leng=="GE")alert("Kennwörter stimmen nicht überein"); form.psw.focus(); return false; } if (form.nombre.value==""){ if(leng=="ES")alert("Campo Nombre obligatorio"); if(leng=="EN")alert("Name obligatory"); if(leng=="GE")alert("Name ist Pflichtfeld"); form.nombre.focus(); return false; } if (form.direccion.value==""){ if(leng=="ES")alert("Campo Direccion obligatorio"); if(leng=="EN")alert("Address obligatory"); if(leng=="GE")alert("Adresse ist Pflichtfeld"); form.direccion.focus(); return false; } if (form.cp.value==""){ if(leng=="ES")alert("Campo CP obligatorio"); if(leng=="EN")alert("Post Code obligatory"); if(leng=="GE")alert("Postleitzahl ist Pflichtfeld"); form.cp.focus(); return false; } if (form.pais.value==""){ if(leng=="ES")alert("Campo País obligatorio"); if(leng=="EN")alert("Country obligatory"); if(leng=="GE")alert("Land ist Pflichtfeld"); form.pais.focus(); return false; } if (form.REAL.value!=form.USER.value){ if(leng=="ES")alert("Texto de confirmación INCORRECTO"); if(leng=="EN")alert("Confirmation text incorrect"); if(leng=="GE")alert("Bestätigungstext NICHT KORREKT"); form.USER.focus(); return false; } } /********************************************************************/ function validar_compra(form){ if (form.nombre.value==""){ if(leng=="ES")alert("Campo Nombre Establecimiento obligatorio"); if(leng=="EN")alert("Establishment obligatory"); if(leng=="GE")alert("Name der Unterkunft ist Pflichtfeld"); form.nombre.focus(); return false; } if (form.direccion.value==""){ if(leng=="ES")alert("Campo Dirección Establecimiento obligatorio"); if(leng=="EN")alert("Establishment address obligatory"); if(leng=="GE")alert("Adresse der Unterkunft ist Pflichtfeld"); form.direccion.focus(); return false; } if (form.cp.value==""){ if(leng=="ES")alert("Campo CP Establecimiento obligatorio"); if(leng=="EN")alert("Post Code establishment obligatory"); if(leng=="GE")alert("Postleitzahl der Unterkunft ist Pflichtfeld"); form.cp.focus(); return false; } if (form.idcategoria.value=="" || form.idcategoria.value=="0"){ if(leng=="ES")alert("Error en CATEGORIA. (cod.409). Por favor, cierre esta ventana y teclee F5"); if(leng=="EN")alert("CATEGORY error. (cod.409). Please, close this window and press F5"); if(leng=="GE")alert("Fehler in der KATEGORIE. (cod.409). Bitte schließen Sie das Fenster und drücken Sie die Taste F5"); //form.categoria.focus(); return false; } if (form.COMPRANDO.value=="SI"){ var capa=document.getElementById("aviso_subiendo"); if(leng=="ES") capa.innerHTML=" Procesando...... Por favor, tenga paciencia."; if(leng=="EN") capa.innerHTML=" In process...... Please wait."; if(leng=="GE") capa.innerHTML=" Bearbeitung läuft...... Bitte haben Sie Geduld."; } } /********************************************************************/ function cambio_foto(form){ if (form.NUEVAFOTO.value==""){ if(leng=="ES")alert("SELECCIONE UNA AIMAGEN"); if(leng=="EN")alert("SELECT AN IMAGE"); if(leng=="GE")alert("WÄHLEN SIE EIN BILD AUS"); form.NUEVAFOTO.focus(); return false; } } /********************************************************************/ function validar_reserva(form){ if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(form.MAIL.value)){ var ok="si"; } else { if(leng=="ES")alert("MAIL INCORRECTO"); if(leng=="EN")alert("MAIL INCORRECT"); if(leng=="GE")alert("E-MAIL NICHT KORREKT"); form.MAIL.focus(); return (false); } if (form.NOMBRE.value==""){ if(leng=="ES")alert("Campo NOMBRE obligatorio"); if(leng=="EN")alert("Name obligatory"); if(leng=="GE")alert("VORNAME ist Pflichtfeld"); form.NOMBRE.focus(); return false; } if (form.APELLIDOS.value==""){ if(leng=="ES")alert("Campo APELLIDOS obligatorio"); if(leng=="EN")alert("SURNAME obligatory"); if(leng=="GE")alert("NACHNAME ist Pflichtfeld"); form.APELLIDOS.focus(); return false; } if (form.DIRECCION.value==""){ if(leng=="ES")alert("Campo DIRECCION obligatorio"); if(leng=="EN")alert("Address obligatory"); if(leng=="GE")alert("ADRESSE ist Pflichtfeld"); form.DIRECCION.focus(); return false; } if (form.TELEFONO.value==""){ if(leng=="ES")alert("Campo TELEFONO obligatorio"); if(leng=="EN")alert("TELEPHONE obligatory"); if(leng=="GE")alert("TELEFON ist Pflichtfeld"); form.TELEFONO.focus(); return false; } if (form.MAIL.value==""){ if(leng=="ES")alert("Campo MAIL obligatorio"); if(leng=="EN")alert("MAIL obligatory"); if(leng=="GE")alert("E-MAIL ist Pflichtfeld"); form.MAIL.focus(); return false; } if (form.MAIL2.value==""){ if(leng=="ES")alert("Campo REPETICION MAIL obligatorio"); if(leng=="EN")alert("REPEAT MAIL obligatory"); if(leng=="GE")alert("WIEDERHOLUNG E-MAIL ist Pflichtfeld"); form.MAIL2.focus(); return false; } if (form.MAIL.value!=form.MAIL2.value){ if(leng=="ES")alert("LOS MAILS NO COINCIDEN "); if(leng=="EN")alert("MAILS DON’T COINCIDE "); if(leng=="GE")alert("DIE E-MAILS STIMMEN NICHT ÜBEREIN "); form.MAIL.focus(); return false; } if (form.FECHA_ENTRADA.value==""){ if(leng=="ES")alert("Campo FECHA ENTRADA obligatorio"); if(leng=="EN")alert("ARRIVAL DATE obligatory"); if(leng=="GE")alert("ANREISEDATUM ist Pflichtfeld"); form.FECHA_ENTRADA.focus(); return false; } if (form.FECHA_SALIDA.value==""){ if(leng=="ES")alert("Campo FECHA SALIDA obligatorio"); if(leng=="EN")alert("DEPARTURE DATE obligatory"); if(leng=="GE")alert("ABREISEDATUM ist Pflichtfeld"); form.FECHA_SALIDA.focus(); return false; } if (form.NOCHES.value==""){ if(leng=="ES")alert("Campo NUM.NOCHES obligatorio"); if(leng=="EN")alert("NUMBER OF NIGHTS obligatory"); if(leng=="GE")alert("ANZAHL ÜBERNACHTUNGEN ist Pflichtfeld"); form.NOCHES.focus(); return false; } if (form.COMENTARIOS.value==""){ if(leng=="ES")alert("Campo COMENTARIOS obligatorio"); if(leng=="EN")alert("COMENTARIES obligatory"); if(leng=="GE")alert("KOMMENTARE ist Pflichtfeld"); form.COMENTARIOS.focus(); return false; } if (form.REAL.value!=form.USER.value){ if(leng=="ES")alert("Texto de confirmación INCORRECTO"); if(leng=="EN")alert("Confirmation text incorrect"); if(leng=="GE")alert("Bestätigungstext NICHT KORREKT"); form.USER.focus(); return false; } } /********************************************************************/ function validar_contactar_propietario(form){ if (form.NOMBRE.value==""){ if(leng=="ES")alert("Campo NOMBRE obligatorio"); if(leng=="EN")alert("NAME obligatory"); if(leng=="GE")alert("NAME ist Pflichtfeld"); form.NOMBRE.focus(); return false; } if (form.MAIL.value==""){ if(leng=="ES")alert("Campo MAIL obligatorio"); if(leng=="EN")alert("MAIL obligatory"); if(leng=="GE")alert("E-MAIL ist Pflichtfeld"); form.MAIL.focus(); return false; } if (form.COMENTARIOS.value==""){ if(leng=="ES")alert("Campo COMENTARIOS obligatorio"); if(leng=="EN")alert("COMENTARIES obligatory"); if(leng=="GE")alert("KOMMENTARE ist Pflichtfeld"); form.COMENTARIOS.focus(); return false; } if (form.REAL.value!=form.USER.value || form.USER.value==""){ if(leng=="ES")alert("Texto de confirmación INCORRECTO"); if(leng=="EN")alert("Confirmation text incorrect"); if(leng=="GE")alert("Bestätigungstext NICHT KORREKT"); form.USER.focus(); return false; } } /********************************************************************/ function validar_quejas(form){ if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(form.MAIL.value)){ var ok="si"; } else { if(leng=="ES")alert("MAIL INCORRECTO"); if(leng=="EN")alert("MAIL INCORRECT"); if(leng=="GE")alert("E-MAIL NICHT KORREKT"); form.MAIL.focus(); return (false); } if (form.NOMBRE.value==""){ if(leng=="ES")alert("Campo NOMBRE obligatorio"); if(leng=="EN")alert("NAME obligatory"); if(leng=="GE")alert("VORNAME ist Pflichtfeld"); form.NOMBRE.focus(); return false; } if (form.APELLIDOS.value==""){ if(leng=="ES")alert("Campo APELLIDOS obligatorio"); if(leng=="EN")alert("SURNAME obligatory"); if(leng=="GE")alert("NACHNAME ist Pflichtfeld"); form.APELLIDOS.focus(); return false; } if (form.NACIONALIDAD.value==""){ if(leng=="ES")alert("Campo NACIONALIDAD obligatorio"); if(leng=="EN")alert("NATIONALITY obligatory"); if(leng=="GE")alert("STAATSANGEHÖRIGKEIT ist Pflichtfeld"); form.NACIONALIDAD.focus(); return false; } if (form.DIRECCION.value==""){ if(leng=="ES")alert("Campo DIRECCION obligatorio"); if(leng=="EN")alert("Address obligatory"); if(leng=="GE")alert("ADRESSE ist Pflichtfeld"); form.DIRECCION.focus(); return false; } if (form.CIUDAD.value==""){ if(leng=="ES")alert("Campo CIUDAD obligatorio"); if(leng=="EN")alert("CITY obligatory"); if(leng=="GE")alert("STADT ist Pflichtfeld"); form.CIUDAD.focus(); return false; } if (form.CP.value==""){ if(leng=="ES")alert("Campo CP obligatorio"); if(leng=="EN")alert("POST CODE obligatory"); if(leng=="GE")alert("POSTLEITZAHL ist Pflichtfeld"); form.CP.focus(); return false; } if (form.PAIS.value==""){ if(leng=="ES")alert("Campo PAIS obligatorio"); if(leng=="EN")alert("COUNTRY obligatory"); if(leng=="GE")alert("LAND ist Pflichtfeld"); form.PAIS.focus(); return false; } if (form.TELEFONO.value==""){ if(leng=="ES")alert("Campo TELEFONO obligatorio"); if(leng=="EN")alert("TELEPHONE obligatory"); if(leng=="GE")alert("TELEFON ist Pflichtfeld"); form.TELEFONO.focus(); return false; } if (form.MAIL.value==""){ if(leng=="ES")alert("Campo MAIL obligatorio"); if(leng=="EN")alert("MAIL obligatory"); if(leng=="GE")alert("E-MAIL ist Pflichtfeld"); form.MAIL.focus(); return false; } if (form.TIPOALOJAMIENTO.value==""){ if(leng=="ES")alert("Campo TIPO ALOJAMIENTO obligatorio"); if(leng=="EN")alert("TYPE OF ACCOMODATION obligatory"); if(leng=="GE")alert("ART DER UNTERKUNFT ist Pflichtfeld"); form.TIPOALOJAMIENTO.focus(); return false; } if (form.POBLACIONALOJAMIENTO.value==""){ if(leng=="ES")alert("Campo POBLACION ALOJAMIENTO obligatorio"); if(leng=="EN")alert("ACCOMODATION LOCATION obligatory"); if(leng=="GE")alert("ORT DER UNTERKUNFT ist Pflichtfeld"); form.POBLACIONALOJAMIENTO.focus(); return false; } if (form.PAISALOJAMIENTO.value==""){ if(leng=="ES")alert("Campo PAIS ALOJAMIENTO obligatorio"); if(leng=="EN")alert("COUNTRY OF ACCOMODATION obligatory"); if(leng=="GE")alert("LAND DER UNTERKUNFT ist Pflichtfeld"); form.PAISALOJAMIENTO.focus(); return false; } if (form.ENTRADAALOJAMIENTO.value==""){ if(leng=="ES")alert("Campo DIA DE ENTRADA EN EL ALOJAMIENTO obligatorio"); if(leng=="EN")alert("ARRIVAL DATE FOR THE ACCOMODATION obligatory"); if(leng=="GE")alert("ANKUNFTSTAG ist Pflichtfeld"); form.ENTRADAALOJAMIENTO.focus(); return false; } if (form.SALIDAALOJAMIENTO.value==""){ if(leng=="ES")alert("Campo DIA DE SALIDA DEL ALOJAMIENTO obligatorio"); if(leng=="EN")alert("DEPARTURE DATE FOR THE ACCOMODATION obligatory"); if(leng=="GE")alert("ABREISETAG ist Pflichtfeld"); form.SALIDAALOJAMIENTO.focus(); return false; } if (form.COMENTARIOS.value==""){ if(leng=="ES")alert("Campo COMENTARIOS obligatorio"); if(leng=="EN")alert("COMENTARIES obligatory"); if(leng=="GE")alert("KOMMENTARE ist Pflichtfeld"); form.COMENTARIOS.focus(); return false; } if (form.REAL.value!=form.USER.value){ if(leng=="ES")alert("Texto de confirmación INCORRECTO"); if(leng=="EN")alert("Confirmation text incorrect"); if(leng=="GE")alert("Bestätigungstext NICHT KORREKT"); form.USER.focus(); return false; } } /**********************************/ function validar_reserva(form){ if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(form.MAIL.value)){ var ok="si"; } else { if(leng=="ES")alert("MAIL INCORRECTO"); if(leng=="EN")alert("MAIL INCORRECT"); if(leng=="GE")alert("E-MAIL NICHT KORREKT"); form.MAIL.focus(); return (false); } if (form.NOMBRE.value==""){ if(leng=="ES")alert("Campo NOMBRE obligatorio"); if(leng=="EN")alert("Name obligatory"); if(leng=="GE")alert("VORNAME ist Pflichtfeld"); form.NOMBRE.focus(); return false; } if (form.APELLIDOS.value==""){ if(leng=="ES")alert("Campo APELLIDOS obligatorio"); if(leng=="EN")alert("SURNAME obligatory"); if(leng=="GE")alert("NACHNAME ist Pflichtfeld"); form.APELLIDOS.focus(); return false; } if (form.DIRECCION.value==""){ if(leng=="ES")alert("Campo DIRECCION obligatorio"); if(leng=="EN")alert("Address obligatory"); if(leng=="GE")alert("ADRESSE ist Pflichtfeld"); form.DIRECCION.focus(); return false; } if (form.TELEFONO.value==""){ if(leng=="ES")alert("Campo TELEFONO obligatorio"); if(leng=="EN")alert("TELEPHONE obligatory"); if(leng=="GE")alert("TELEFON ist Pflichtfeld"); form.TELEFONO.focus(); return false; } if (form.MAIL.value==""){ if(leng=="ES")alert("Campo MAIL obligatorio"); if(leng=="EN")alert("MAIL obligatory"); if(leng=="GE")alert("E-MAIL ist Pflichtfeld"); form.MAIL.focus(); return false; } if (form.MAIL2.value==""){ if(leng=="ES")alert("Campo REPETICION MAIL obligatorio"); if(leng=="EN")alert("REPEAT MAIL obligatory"); if(leng=="GE")alert("WIEDERHOLUNG E-MAIL ist Pflichtfeld"); form.MAIL2.focus(); return false; } if (form.MAIL.value!=form.MAIL2.value){ if(leng=="ES")alert("LOS MAILS NO COINCIDEN "); if(leng=="EN")alert("MAILS DON’T COINCIDE "); if(leng=="GE")alert(" DIE E-MAILS STIMMEN NICHT ÜBEREIN "); form.MAIL.focus(); return false; } if (form.FECHA_ENTRADA.value==""){ if(leng=="ES")alert("Campo FECHA ENTRADA obligatorio"); if(leng=="EN")alert("ARRIVAL DATE obligatory"); if(leng=="GE")alert("ANREISEDATUM ist Pflichtfeld"); form.FECHA_ENTRADA.focus(); return false; } if (form.FECHA_SALIDA.value==""){ if(leng=="ES")alert("Campo FECHA SALIDA obligatorio"); if(leng=="EN")alert("DEPARTURE DATE obligatory"); if(leng=="GE")alert("ABREISEDATUM ist Pflichtfeld"); form.FECHA_SALIDA.focus(); return false; } if (form.NOCHES.value==""){ if(leng=="ES")alert("Campo NUM.NOCHES obligatorio"); if(leng=="EN")alert("NUMBER OF NIGHTS obligatory"); if(leng=="GE")alert("ANZAHL ÜBERNACHTUNGEN ist Pflichtfeld"); form.NOCHES.focus(); return false; } if (form.COMENTARIOS.value==""){ if(leng=="ES")alert("Campo COMENTARIOS obligatorio"); if(leng=="EN")alert("COMENTARIES obligatory"); if(leng=="GE")alert("KOMMENTARE ist Pflichtfeld"); form.COMENTARIOS.focus(); return false; } if (form.REAL.value!=form.USER.value){ if(leng=="ES")alert("Texto de confirmación INCORRECTO"); if(leng=="EN")alert("Confirmation text incorrect"); if(leng=="GE")alert("Bestätigungstext NICHT KORREKT"); form.USER.focus(); return false; } } /********************************************************************/ function validar_contacto(form){ if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(form.MAIL.value)){ var ok="si"; } else { if(leng=="ES")alert("MAIL INCORRECTO"); if(leng=="EN")alert("MAIL INCORRECT"); if(leng=="GE")alert("E-MAIL NICHT KORREKT"); form.MAIL.focus(); return (false); } if (form.NOMBRE.value==""){ if(leng=="ES")alert("Campo NOMBRE obligatorio"); if(leng=="EN")alert("NAME obligatory"); if(leng=="GE")alert("VORNAME ist Pflichtfeld"); form.NOMBRE.focus(); return false; } if (form.APELLIDOS.value==""){ if(leng=="ES")alert("Campo APELLIDOS obligatorio"); if(leng=="EN")alert("SURNAME obligatory"); if(leng=="GE")alert("NACHNAME ist Pflichtfeld"); form.APELLIDOS.focus(); return false; } if (form.DIRECCION.value==""){ if(leng=="ES")alert("Campo DIRECCION obligatorio"); if(leng=="EN")alert("Address obligatory"); if(leng=="GE")alert("ADRESSE ist Pflichtfeld"); form.DIRECCION.focus(); return false; } if (form.TELEFONO.value==""){ if(leng=="ES")alert("Campo TELEFONO obligatorio"); if(leng=="EN")alert("TELEPHONE obligatory"); if(leng=="GE")alert("TELEFON ist Pflichtfeld"); form.TELEFONO.focus(); return false; } if (form.MAIL.value==""){ if(leng=="ES")alert("Campo MAIL obligatorio"); if(leng=="EN")alert("MAIL obligatory"); if(leng=="GE")alert("E-MAIL ist Pflichtfeld"); form.MAIL.focus(); return false; } if (form.MAIL2.value==""){ if(leng=="ES")alert("Campo REPETIR MAIL obligatorio"); if(leng=="EN")alert("Campo REPETIR MAIL obligatorio"); if(leng=="GE")alert("WIEDERHOLUNG E-MAIL ist Pflichtfeld"); form.MAIL2.focus(); return false; } if (form.COMENTARIOS.value==""){ if(leng=="ES")alert("Campo COMENTARIOS obligatorio"); if(leng=="EN")alert("COMENTARIES obligatory"); if(leng=="GE")alert("KOMMENTARE ist Pflichtfeld"); form.COMENTARIOS.focus(); return false; } if (form.REAL.value!=form.USER.value){ if(leng=="ES")alert("Texto de confirmación INCORRECTO"); if(leng=="EN")alert("Confirmation text incorrect"); if(leng=="GE")alert("Bestätigungstext NICHT KORREKT"); form.USER.focus(); return false; } } /********************************************************************/ /**********************************/ function validar_opinion(form){ if (form.NICK.value==""){ if(leng=="ES")alert("Debe introducir todos los campos"); if(leng=="EN")alert("You must complete all the fields "); if(leng=="GE")alert("Es müssen sämtliche Felder ausgefüllt werden"); form.NICK.focus(); return false; } if (form.NOMBRE.value==""){ if(leng=="ES")alert("Debe introducir todos los campos"); if(leng=="EN")alert("You must complete all the fields "); if(leng=="GE")alert("Es müssen sämtliche Felder ausgefüllt werden"); form.NOMBRE.focus(); return false; } if (form.APELLIDOS.value==""){ if(leng=="ES")alert("Debe introducir todos los campos"); if(leng=="EN")alert("You must complete all the fields "); if(leng=="GE")alert("Es müssen sämtliche Felder ausgefüllt werden"); form.APELLIDOS.focus(); return false; } if (form.DIRECCION.value==""){ if(leng=="ES")alert("Debe introducir todos los campos"); if(leng=="EN")alert("You must complete all the fields "); if(leng=="GE")alert("Es müssen sämtliche Felder ausgefüllt werden"); form.DIRECCION.focus(); return false; } if (form.MAIL.value==""){ if(leng=="ES")alert("Debe introducir todos los campos"); if(leng=="EN")alert("You must complete all the fields "); if(leng=="GE")alert("Es müssen sämtliche Felder ausgefüllt werden"); form.MAIL.focus(); return false; } if (form.TELEFONO.value==""){ if(leng=="ES")alert("Debe introducir todos los campos"); if(leng=="EN")alert("You must complete all the fields "); if(leng=="GE")alert("Es müssen sämtliche Felder ausgefüllt werden"); form.TELEFONO.focus(); return false; } if (form.FECHA_ESTANCIA.value==""){ if(leng=="ES")alert("Debe introducir todos los campos"); if(leng=="EN")alert("You must complete all the fields "); if(leng=="GE")alert("Es müssen sämtliche Felder ausgefüllt werden"); form.FECHA_ESTANCIA.focus(); return false; } if (form.PUNTOS.value==""){ if(leng=="ES")alert("Debe introducir todos los campos"); if(leng=="EN")alert("You must complete all the fields "); if(leng=="GE")alert("Es müssen sämtliche Felder ausgefüllt werden"); form.PUNTOS.focus(); return false; } if (form.REAL.value!=form.USER.value){ if(leng=="ES")alert("Texto de confirmación INCORRECTO"); if(leng=="EN")alert("Confirmation text incorrect"); if(leng=="GE")alert("Bestätigungstext NICHT KORREKT"); form.USER.focus(); return false; } } /***********************************************************/ function validar_contactar(form){ if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(form.MAIL.value)){ var ok="si"; } else { if(leng=="ES")alert("MAIL INCORRECTO"); if(leng=="EN")alert("MAIL INCORRECT"); if(leng=="GE")alert("E-MAIL NICHT KORREKT"); form.MAIL.focus(); return (false); } if (form.NOMBRE.value==""){ if(leng=="ES")alert("Campo NOMBRE obligatorio"); if(leng=="EN")alert("Name obligatory"); if(leng=="GE")alert("VORNAME ist Pflichtfeld"); form.NOMBRE.focus(); return false; } if (form.APELLIDOS.value==""){ if(leng=="ES")alert("Campo APELLIDOS obligatorio"); if(leng=="EN")alert("SURNAME obligatory"); if(leng=="GE")alert("NACHNAME ist Pflichtfeld"); form.APELLIDOS.focus(); return false; } if (form.DIRECCION.value==""){ if(leng=="ES")alert("Campo DIRECCION obligatorio"); if(leng=="EN")alert("Address obligatory"); if(leng=="GE")alert("ADRESSE ist Pflichtfeld"); form.DIRECCION.focus(); return false; } if (form.TELEFONO.value==""){ if(leng=="ES")alert("Campo TELEFONO obligatorio"); if(leng=="EN")alert("TELEPHONE obligatory"); if(leng=="GE")alert("TELEFON ist Pflichtfeld"); form.TELEFONO.focus(); return false; } if (form.MAIL.value==""){ if(leng=="ES")alert("Campo MAIL obligatorio"); if(leng=="EN")alert("MAIL obligatory"); if(leng=="GE")alert("E-MAIL ist Pflichtfeld"); form.MAIL.focus(); return false; } if (form.MAIL2.value==""){ if(leng=="ES")alert("Campo REPETICION MAIL obligatorio"); if(leng=="EN")alert("REPEAT MAIL obligatory"); if(leng=="GE")alert("WIEDERHOLUNG E-MAIL ist Pflichtfeld"); form.MAIL2.focus(); return false; } if (form.MAIL.value!=form.MAIL2.value){ if(leng=="ES")alert("LOS MAILS NO COINCIDEN "); if(leng=="EN")alert("MAILS DON’T COINCIDE "); if(leng=="GE")alert(" DIE E-MAILS STIMMEN NICHT ÜBEREIN "); form.MAIL.focus(); return false; } if (form.COMENTARIOS.value==""){ if(leng=="ES")alert("Campo COMENTARIOS obligatorio"); if(leng=="EN")alert("COMENTARIES obligatory"); if(leng=="GE")alert("KOMMENTARE ist Pflichtfeld"); form.COMENTARIOS.focus(); return false; } if (form.REAL.value!=form.USER.value){ if(leng=="ES")alert("Texto de confirmación INCORRECTO"); if(leng=="EN")alert("Confirmation text incorrect"); if(leng=="GE")alert("Bestätigungstext NICHT KORREKT"); form.USER.focus(); return false; } } /********************************************************************/ function nuevoAjax(){ /* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por lo que se puede copiar tal como esta aqui */ var xmlhttp=false; try { // Creacion del objeto AJAX para navegadores no IE xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { // Creacion del objet AJAX para IE xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch(E) { xmlhttp=false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp=new XMLHttpRequest(); } return xmlhttp; } /***********************************************************/ function recupera(){ var capa=document.getElementById("recupera_psw"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "ADMIN/rec.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("opcion=recupera"); ajax.onreadystatechange=function(){ if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } //**************************************************************** function recupera_seleccionado(obj){ var mail=obj.MAIL.value; var capa=document.getElementById("recupera_psw"); var ajax=nuevoAjax(); capa.innerHTML="Enviando e-Mail..."; ajax.open("POST", "ADMIN/rec.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("opcion=EnviaMail&mail="+mail+""); ajax.onreadystatechange=function(){ if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } //**************************************************************** function MailQuejas(){ var nombre=document.getElementById("NOMBRE").value; var apellidos=document.getElementById("APELLIDOS").value; var nacionalidad=document.getElementById("NACIONALIDAD").value; var direccion=document.getElementById("DIRECCION").value; var ciudad=document.getElementById("CIUDAD").value; var cp=document.getElementById("CP").value; var pais=document.getElementById("PAIS").value; var telefono=document.getElementById("TELEFONO").value; var mail=document.getElementById("MAIL").value; var tipoalojamiento=document.getElementById("TIPOALOJAMIENTO").value; var poblacionalojamiento=document.getElementById("POBLACIONALOJAMIENTO").value; var paisalojamiento=document.getElementById("PAISALOJAMIENTO").value; var entradaalojamiento=document.getElementById("ENTRADAALOJAMIENTO").value; var salidaalojamiento=document.getElementById("SALIDAALOJAMIENTO").value; var comentarios=document.getElementById("COMENTARIOS").value; var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML="Enviando e-Mail..."; ajax.open("POST", "INCLUDES/mails.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("Nombre="+nombre+"&Apellidos="+apellidos+"&Nacionalidad="+nacionalidad+"&Direccion="+direccion+"&Ciudad="+ciudad+"&CP="+cp+"&Pais="+pais+"&Telefono="+telefono+"&Mail="+mail+"&Tipo_de_Alojamiento="+tipoalojamiento+"&Poblacion_Alojamiento="+poblacionalojamiento+"&Pais_Alojamiento="+paisalojamiento+"&Entrada_Alojamiento="+entradaalojamiento+"&Salida_Alojammiento="+salidaalojamiento+"&Comentarios="+comentarios+"&opcion=Quejas"); ajax.onreadystatechange=function(){ if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /*****************************************/ //**************************************************************** function MailContactar(){ var nombre=document.getElementById("NOMBRE").value; var apellidos=document.getElementById("APELLIDOS").value; var direccion=document.getElementById("DIRECCION").value; var telefono=document.getElementById("TELEFONO").value; var fax=document.getElementById("FAX").value; var mail=document.getElementById("MAIL").value; var comentarios=document.getElementById("COMENTARIOS").value; var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML="Enviando e-Mail..."; ajax.open("POST", "INCLUDES/mails.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("Nombre="+nombre+"&Apellidos="+apellidos+"&Direccion="+direccion+"&Telefono="+telefono+"&Mail="+mail+"&Fax="+fax+"&Comentarios="+comentarios+"&opcion=Contactar"); ajax.onreadystatechange=function(){ if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /*****************************************/ function listado(id,sql){ var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); //if(leng=="ES")alert(borra); //capa.style.backgroundColor="#FFFFFF"; capa.innerHTML="......"; ajax.open("POST", "listados.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("id="+id+"&sql="+sql+""); //ajax.onreadystatechange=function() // { //if (ajax.readyState==4) //{ //Respuesta recibida. Coloco el texto plano en la capa correspondiente //capa.innerHTML=ajax.responseText; //if(leng=="ES")alert(inicio); //} //} } /*****************************************************/ function LimpiaExplicacion() { var capa=document.getElementById("explicacion"); capa.innerHTML=""; } /*****************************************************/ function CambiandoBanner(cambiandobanner) { var capa=document.getElementById(cambiandobanner); capa.innerHTML="CLICK AQUI para Actualizar"; } /***********************************************************/ function ficha(id){ var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/ficha.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("id="+id+""); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function pagina(pagina){ //if(leng=="ES")alert(pagina); var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/corporativa.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("accion="+pagina+""); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function paginaContactar(){ //if(leng=="ES")alert(pagina); var nombre=document.getElementById("NOMBRE").value; var apellidos=document.getElementById("APELLIDOS").value; var direccion=document.getElementById("DIRECCION").value; var telefono=document.getElementById("TELEFONO").value; var fax=document.getElementById("FAX").value; var mail=document.getElementById("MAIL").value; var comentarios=document.getElementById("COMENTARIOS").value; var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/corporativa.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("nombre="+nombre+"&apellidos="+apellidos+"&direccion="+direccion+"&telefono="+telefono+"&fax="+fax+"&mail="+mail+"&comentarios="+comentarios+"&envio=si&accion=contactar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function buscar(form,pagina){ var pais=document.getElementById("frmpais").value; var provincia=document.getElementById("frmprovincia").value; var ciudad=document.getElementById("frmciudad").value; var tipo=document.getElementById("frmtipo").value; var minimo=""; var maximo=""; var banyo=""; var internet=""; var ascensor=""; //if(leng=="ES")alert(tipo); var capa2=document.getElementById("explicacion"); capa2.innerHTML=""; var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/busquedas.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&tipo="+tipo+"&minimo="+minimo+"&maximo="+maximo+"&banyo="+banyo+"&internet="+internet+"&ascensor="+ascensor+"&pagina="+pagina+""); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function buscar2(form,pagina){ var pais=document.getElementById("frmpais").value; var provincia=document.getElementById("frmprovincia").value; var ciudad=document.getElementById("frmciudad").value; var tipo=document.getElementById("frmtipo").value; var minimo=document.getElementById("frmminimo").value; var maximo=document.getElementById("frmmaximo").value; if(document.getElementById("frmbanyo").checked){ var banyo="on"; }else{ var banyo="";} if(document.getElementById("frminternet").checked){ var internet="on"; }else{ var internet="";} if(document.getElementById("frmascensor").checked){ var ascensor="on"; }else{ var ascensor="";} var capa2=document.getElementById("explicacion"); capa2.innerHTML=""; var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/busquedas.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&tipo="+tipo+"&minimo="+minimo+"&maximo="+maximo+"&banyo="+banyo+"&internet="+internet+"&ascensor="+ascensor+"&pagina="+pagina+""); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function buscar_directamente(tipo){ var tipo=tipo; var ajax=nuevoAjax(); var capa=document.getElementById("derecha"); capa.innerHTML=""; ajax.open("POST", "INCLUDES/busquedas.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("tipo="+tipo+""); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function OLD_buscar2(form,pagina){ var pais=form.pais.value; var provincia=form.provincia.value; var ciudad=form.ciudad.value; var tipo=form.tipo.value; var minimo=form.minimo.value; var maximo=form.maximo.value; var banyo=form.banyo.value; var intenet=form.internet.value; var ascensor=form.ascensor.value; var capa2=document.getElementById("explicacion"); capa2.innerHTML=""; var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/busquedas.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&tipo="+tipo+"&minimo="+minimo+"&maximo="+maximo+"&banyo="+banyo+"&internet="+internet+"&ascensor="+ascensor+"&pagina="+pagina+""); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /*********************************************************/ function lista_simple(id){ var pais=""; var provincia=""; var ciudad=""; var idcategoria=id; var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/listados.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&idcategoria="+idcategoria+"&tipo_busqueda=busqueda_simple"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function VerMas(idestablecimiento,lugar,pagina,buscar,tipo,pais,provincia,ciudad,minimo,maximo,banyo,internet,ascensor){ //if(leng=="ES")alert(ascensor); var capa=document.getElementById(lugar); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/detalles.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&pagina="+pagina+"&buscar="+buscar+"&tipo="+tipo+"&pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&minimo="+minimo+"&maximo="+maximo+"&banyo="+banyo+"&internet="+internet+"&ascensor="+ascensor+"&accion=ver"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function VerMasLugar(idlugar,idguia,guia,pagina,ab){ var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/detallesLugar.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idlugar="+idlugar+"&pagina="+pagina+"&idguia="+idguia+"&guia="+guia+"&ab="+ab+"&accion=ver"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function VerMasPropietario(idestablecimiento,lugar,pagina,idpropietario){ //if(leng=="ES")alert(ascensor); var capa=document.getElementById(lugar); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/detalles.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&pagina="+pagina+"&idpropietario="+idpropietario+"&accion=ver"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**************************************************************/ function Reservar(idestablecimiento,lugar,pagina,buscar,tipo,pais,provincia,ciudad,minimo,maximo,banyo,internet,ascensor){ //if(leng=="ES")alert(tipo); var capa=document.getElementById(lugar); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/detalles.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&pagina="+pagina+"&buscar="+buscar+"&tipo="+tipo+"&pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&minimo="+minimo+"&maximo="+maximo+"&banyo="+banyo+"&internet="+internet+"&ascensor="+ascensor+"&accion=reservar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**************************************************************/ function ReservaHecha(idestablecimiento,lugar,pagina,buscar,tipo,pais,provincia,ciudad,minimo,maximo,banyo,internet,ascensor){ //if(leng=="ES")alert(tipo); var nombre=document.getElementById("NOMBRE").value; var apellidos=document.getElementById("APELLIDOS").value; var direccion=document.getElementById("DIRECCION").value; var telefono=document.getElementById("TELEFONO").value; var fax=document.getElementById("FAX").value; var mail=document.getElementById("MAIL").value; var entrada=document.getElementById("FECHA_ENTRADA").value; var salida=document.getElementById("FECHA_SALIDA").value; var noches=document.getElementById("NOCHES").value; var comentarios=document.getElementById("COMENTARIOS").value; var capa=document.getElementById(lugar); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/detalles.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&pagina="+pagina+"&buscar="+buscar+"&tipo="+tipo+"&pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&minimo="+minimo+"&maximo="+maximo+"&banyo="+banyo+"&internet="+internet+"&ascensor="+ascensor+"&nombre="+nombre+"&apellidos="+apellidos+"&direccion="+direccion+"&telefono="+telefono+"&fax="+fax+"&mail="+mail+"&entrada="+entrada+"&salida="+salida+"&noches="+noches+"&comentarios="+comentarios+"&accion=reservar_hecho"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } function AgrandaImagen(ruta){ //if(leng=="ES")alert(ruta); var capa=document.getElementById("detalle_imagen"); capa.innerHTML=""; } function Votando(idestablecimiento,lugar,pagina,buscar,tipo,pais,provincia,ciudad,minimo,maximo,banyo,internet,ascensor){ //if(leng=="ES")alert(idestablecimiento); var capa=document.getElementById("ficha"); var ajax=nuevoAjax(); capa.innerHTML=""; //capa.style.width="400px"; //capa.style.background="#EEEEEE"; capa.style.color="#990000"; ajax.open("POST", "INCLUDES/detalles.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&pagina="+pagina+"&buscar="+buscar+"&tipo="+tipo+"&pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&minimo="+minimo+"&maximo="+maximo+"&banyo="+banyo+"&internet="+internet+"&ascensor="+ascensor+"&accion=votar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function Contactar(idestablecimiento,pagina,buscar,tipo,pais,provincia,ciudad,minimo,maximo,banyo,internet,ascensor){ //if(leng=="ES")alert(idestablecimiento); var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/detalles.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&pagina="+pagina+"&buscar="+buscar+"&tipo="+tipo+"&pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&minimo="+minimo+"&maximo="+maximo+"&banyo="+banyo+"&internet="+internet+"&ascensor="+ascensor+"&accion=contactaconpropietario"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } function contactar_envio(idestablecimiento,pagina,buscar,tipo,pais,provincia,ciudad,minimo,maximo,banyo,internet,ascensor){ //if(leng=="ES")alert(idestablecimiento); var nombre=document.getElementById("nombre").value; var mail=document.getElementById("mail").value; var comentarios=document.getElementById("comentarios").value; var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/detalles.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&comentarios="+comentarios+"&pagina="+pagina+"&nombre="+nombre+"&mail="+mail+"&buscar="+buscar+"&tipo="+tipo+"&pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&minimo="+minimo+"&maximo="+maximo+"&banyo="+banyo+"&internet="+internet+"&ascensor="+ascensor+"&accion=contactar_enviar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function VerTodasOpiniones(idestablecimiento,lugar,pagina,buscar,tipo,pais,provincia,ciudad,minimo,maximo,banyo,internet,ascensor){ //if(leng=="ES")alert(idestablecimiento); var capa=document.getElementById("ficha"); var ajax=nuevoAjax(); capa.innerHTML=""; //capa.style.width="400px"; //capa.style.background="#EEEEEE"; capa.style.color="#990000"; ajax.open("POST", "INCLUDES/detalles.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&pagina="+pagina+"&buscar="+buscar+"&tipo="+tipo+"&pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&minimo="+minimo+"&maximo="+maximo+"&banyo="+banyo+"&internet="+internet+"&ascensor="+ascensor+"&accion=vertodasopiniones"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function FijaPuntuacion(idestablecimiento,pagina,buscar,tipo,pais,provincia,ciudad,minimo,maximo,banyo,internet,ascensor){ nick=document.getElementById("NICK").value; nombre=document.getElementById("NOMBRE").value; apellidos=document.getElementById("APELLIDOS").value; direccion=document.getElementById("DIRECCION").value; telefono=document.getElementById("TELEFONO").value; mail=document.getElementById("MAIL").value; fecha_estancia=document.getElementById("FECHA_ESTANCIA").value; opinion=document.getElementById("OPINION").value; puntuacion=document.getElementById("PUNTOS").value; var capa=document.getElementById("ficha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/detalles.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&nick="+nick+"&nombre="+nombre+"&apellidos="+apellidos+"&direccion="+direccion+"&telefono="+telefono+"&mail="+mail+"&fecha_estancia="+fecha_estancia+"&opinion="+opinion+"&puntuacion="+puntuacion+"&pagina="+pagina+"&buscar="+buscar+"&tipo="+tipo+"&pais="+pais+"&provincia="+provincia+"&ciudad="+ciudad+"&minimo="+minimo+"&maximo="+maximo+"&banyo="+banyo+"&internet="+internet+"&ascensor="+ascensor+"&accion=votar_pon"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /******************************************************************/ function Menu(leng){ //if(leng=="ES")alert(idestablecimiento); var capa=document.getElementById("posibles"); var ajax=nuevoAjax(); //capa.innerHTML=""; document.getElementById("cual_seleccion_1").style.backgroundColor="#EEEEEE"; document.getElementById("cual_seleccion_2").style.backgroundColor="#FFFFFF"; ajax.open("POST", "INCLUDES/cambio_menu.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("leng="+leng+"&accion=MenuGuias"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function PonCategoriasMenu(leng){ //if(leng=="ES")alert(idestablecimiento); var capa=document.getElementById("posibles"); var ajax=nuevoAjax(); //capa.innerHTML=""; document.getElementById("cual_seleccion_1").style.backgroundColor="#FFFFFF"; document.getElementById("cual_seleccion_2").style.backgroundColor="#EEEEEE"; ajax.open("POST", "INCLUDES/cambio_menu.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("leng="+leng+"&accion=MenuCategorias"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function PonGuiasMenu(leng,idguia,ab){ //alert(ab); var capa=document.getElementById("posibles"); var ajax=nuevoAjax(); //capa.innerHTML=""; document.getElementById("cual_seleccion_1").style.backgroundColor="#EEEEEE"; document.getElementById("cual_seleccion_2").style.backgroundColor="#FFFFFF"; ajax.open("POST", "INCLUDES/cambio_menu.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("leng="+leng+"&idguia="+idguia+"&ab="+ab+"&accion=MenuGuias"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /*************************************************************************/ /*************ZONA PROPIETARIO***********************************************/ function valida(form){ document.getElementById("derecha").innerHTML=""; var usr=form.user.value; var psw=form.psw.value; var capa=document.getElementById("acceso"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/valida.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("usr="+usr+"&psw="+psw+"&accion=valida"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /*****************************************************************/ function logout(){ document.getElementById("derecha").innerHTML=""; var capa=document.getElementById("acceso"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/valida.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("accion=logout"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; window.location.reload(); } } } /*******************************************************/ /***********ZONA PROPIETARIOS************************/ function registro(){ var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/registro.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("accion=nuevo"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /*******************************************************************************/ function nuevoPropietario(form){ var mail=document.getElementById("frm_nuevo").mail.value; var psw=document.getElementById("frm_nuevo").psw.value; var psw2=document.getElementById("frm_nuevo").psw2.value; var nombre=document.getElementById("frm_nuevo").nombre.value; var direccion=document.getElementById("frm_nuevo").direccion.value; var ciudad=document.getElementById("frm_nuevo").ciudad.value; var cp=document.getElementById("frm_nuevo").cp.value; var provincia=document.getElementById("frm_nuevo").provincia.value; var pais=document.getElementById("frm_nuevo").pais.value; var mail2=document.getElementById("frm_nuevo").mail2.value; var telefono=document.getElementById("frm_nuevo").telefono.value; var fax=document.getElementById("frm_nuevo").fax.value; var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/registro.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("mail="+mail+"&psw="+psw+"&psw2="+psw2+"&nombre="+nombre+"&direccion="+direccion+"&ciudad="+ciudad+"&cp="+cp+"&provincia="+provincia+"&pais="+pais+"&mail2="+mail2+"&telefono="+telefono+"&fax="+fax+"&accion=valida"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function propietario(idpropietario){ if(document.getElementById("corporativo")){ var temp=document.getElementById("corporativo"); temp.innerHTML=""; } var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/adm_propietarios.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idpropietario="+idpropietario+"&accion=administrar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function datosPropietario(idpropietario){ //if(leng=="ES")alert(idpropietario); var capa=document.getElementById("propietario"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/adm_propietarios.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idpropietario="+idpropietario+"&accion=datos"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function EditarEstablecimiento(idestablecimiento){ //if(leng=="ES")alert(idestablecimiento); var capa=document.getElementById("propietario"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/adm_propietarios.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&accion=edita_establecimiento"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /*******************************************************************************/ function editarPropietario(form){ var idpropietario=document.getElementById("frm_nuevo").idpropietario.value; var psw=document.getElementById("frm_nuevo").psw.value; var psw2=document.getElementById("frm_nuevo").psw2.value; var nombre=document.getElementById("frm_nuevo").nombre.value; var direccion=document.getElementById("frm_nuevo").direccion.value; var ciudad=document.getElementById("frm_nuevo").ciudad.value; var cp=document.getElementById("frm_nuevo").cp.value; var provincia=document.getElementById("frm_nuevo").provincia.value; var pais=document.getElementById("frm_nuevo").pais.value; var mail2=document.getElementById("frm_nuevo").mail2.value; var telefono=document.getElementById("frm_nuevo").telefono.value; var fax=document.getElementById("frm_nuevo").fax.value; var capa=document.getElementById("propietario"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/adm_propietarios.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idpropietario="+idpropietario+"&psw="+psw+"&psw2="+psw2+"&nombre="+nombre+"&direccion="+direccion+"&ciudad="+ciudad+"&cp="+cp+"&provincia="+provincia+"&pais="+pais+"&mail2="+mail2+"&telefono="+telefono+"&fax="+fax+"&accion=edita"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function alojamientosPropietario(idpropietario){ //if(leng=="ES")alert(idpropietario); var capa=document.getElementById("propietario"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/adm_propietarios.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idpropietario="+idpropietario+"&accion=alojamientos"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function alojamientoNuevo(idpropietario){ //if(leng=="ES")alert(idpropietario); var capa=document.getElementById("propietario"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/adm_propietarios.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idpropietario="+idpropietario+"&accion=NuevoAlojamiento"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function CambiandoImagen(idestablecimiento,imagen){ //if(leng=="ES")alert(idpropietario); var capa=document.getElementById("propietario"); var ajax=nuevoAjax(); capa.innerHTML="Por favor... espere"; ajax.open("POST", "INCLUDES/adm_propietarios.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&imagen="+imagen+"&accion=CambiaImagen"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function ComprandoImagenes(idestablecimiento,actuales){ var capa=document.getElementById("compraimagenes"); var num=document.getElementById("COMPRARFOTOS").value; var ajax=nuevoAjax(); capa.innerHTML="Por favor... espere"; ajax.open("POST","INCLUDES/adm_propietarios.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&num="+num+"&actuales="+actuales+"&accion=CompraMasImagenes"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************/ function VerMiAlojamiento(idestablecimiento,idpropietario){ //if(leng=="ES")alert(idpropietario); var capa=document.getElementById("propietario"); var ajax=nuevoAjax(); capa.innerHTML="Por favor... espere"; ajax.open("POST", "INCLUDES/adm_propietarios.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&idpropietario="+idpropietario+"&accion=veralojamiento"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************/ function ver_peticiones_informacion(idestablecimiento,idpropietario){ var capa=document.getElementById("propietario"); var ajax=nuevoAjax(); capa.innerHTML="Por favor... espere"; ajax.open("POST", "INCLUDES/adm_propietarios.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&idpropietario="+idpropietario+"&accion=listar_peticiones_informacion"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /****************************************************************/ function PublicarMasTiempo(idestablecimiento,idpropietario){ var capa=document.getElementById("propietario"); var ajax=nuevoAjax(); capa.innerHTML="Por favor... espere"; ajax.open("POST", "INCLUDES/adm_propietarios.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&idpropietario="+idpropietario+"&accion=publicar_mas_tiempo"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /******************************************************************************/ /**********************************************************************************/ /*********************** ZONA ADMIN************************************************ /**********************************************************************************/ function admin(){ if(document.getElementById("corporativo")){ var temp=document.getElementById("corporativo"); temp.innerHTML=""; } var capa=document.getElementById("derecha"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("accion=administrador"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ /***************CONFIG PORTAL*******************************************************************/ function ConfPortal(){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("accion=admin_portal"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function Config(campo){ var valor=document.getElementById(campo).value; var campo=document.getElementById(campo).name; //alert(campo); //alert(valor); if(campo=="TEXTO_LEGAL_ES" || campo=="TEXTO_LEGAL_EN" || campo=="TEXTO_LEGAL_GE"){ valor=encodeURIComponent(valor); } var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("valor="+valor+"&campo="+campo+"&accion=config_guarda"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ /**********************************************************************************/ function ConfOpiniones(){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("accion=config_opiniones"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function ConfCategorias(){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("accion=config_categorias"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function ActivaOpinion(idopinion,puntuacion,idestablecimiento){ var capa=document.getElementById("administrador"); var capa2=document.getElementById(idopinion); var ajax=nuevoAjax(); capa2.innerHTML="OPINION ACTIVADA"; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idopinion="+idopinion+"&puntuacion="+puntuacion+"&idestablecimiento="+idestablecimiento+"&accion=config_activaopinion"); //ajax.onreadystatechange=function() // { // if (ajax.readyState==4) // { // capa.innerHTML=ajax.responseText; // } // } } /**********************************************************************************/ function BorraOpinion(idopinion){ var capa=document.getElementById("administrador"); var capa2=document.getElementById(idopinion); var ajax=nuevoAjax(); capa2.innerHTML="OPINION ELIMINADA"; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idopinion="+idopinion+"&accion=config_borraopinion"); //ajax.onreadystatechange=function() // { // if (ajax.readyState==4) // { // capa.innerHTML=ajax.responseText; // } // } } /**********************************************************************************/ function VerOpinion(idopinion){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idopinion="+idopinion+"&accion=config_veropinion"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function ConfigCategorias(id){ var idcategoria=id; //if(leng=="ES")alert(id); //if(leng=="ES")alert(id + "ES"); if(document.getElementById(id + "PADRE")){ var padre=document.getElementById(id + "PADRE").value; } var valorES=document.getElementById(id + "ES").value; var valorEN=document.getElementById(id + "EN").value; var valorGE=document.getElementById(id + "GE").value; var precio=document.getElementById(id + "PRECIO").value; var url=document.getElementById(id + "URL").value; //if(leng=="ES")alert(valorES); //if(leng=="ES")alert(campo); //if(leng=="ES")alert(valor); var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("valorES="+valorES+"&valorEN="+valorEN+"&padre="+padre+"&valorGE="+valorGE+"&precio="+precio+"&url="+url+"&idcategoria="+idcategoria+"&accion=config_guardacategoria"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function NuevaCategoria(){ var valorES=document.getElementById("nueva_categoria_ES").value; var valorEN=document.getElementById("nueva_categoria_EN").value; var valorGE=document.getElementById("nueva_categoria_GE").value; var precio=document.getElementById("PRECIO").value; var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("valorES="+valorES+"&valorEN="+valorEN+"&valorGE="+valorGE+"&precio="+precio+"&accion=config_nuevacategoria"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function EliminarCategoria(idcategoria){ var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idcategoria="+idcategoria+"&accion=config_eliminacategoria"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ /**********************************************************************************/ function ConfEstablecimientos(buscar){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("buscar="+buscar+"&accion=admin_establecimientos"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function ConfEstablecimientosPaginando(buscar,pagina){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("buscar="+buscar+"&pagina="+pagina+"&accion=admin_establecimientos"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function ConfPropietarios(){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("accion=admin_propietarios"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function VerDatosPropietario(idpropietario){ //if(leng=="ES")alert(idpropietario); var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idpropietario="+idpropietario+"&accion=admin_verpropietario"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function BorrarPropietario(idpropietario){ //if(leng=="ES")alert(idpropietario); var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idpropietario="+idpropietario+"&accion=admin_borrarpropietario"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function BorrarEstablecimiento(idestablecimiento,nombre){ //if(leng=="ES")alert(idestablecimiento); var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&nombre="+nombre+"&accion=admin_borrarestablecimiento"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function ConfirmadoBorradoEstablecimiento(idestablecimiento){ //if(leng=="ES")alert(idestablecimiento); var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&accion=admin_borrarestablecimientoconfirmado"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function CambiarEstadoEstablecimiento(idestablecimiento,estado){ //if(leng=="ES")alert(idpropietario); var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&estado="+estado+"&accion=admin_cambiarestadoestablecimiento"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function CambioEstadoConfirmado(idestablecimiento,estado){ //if(leng=="ES")alert(idestablecimiento); //if(leng=="ES")alert(estado); var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&estado="+estado+"&accion=admin_cambioestadoconfirmado"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function EliminarAlojamientos(idpropietario){ //if(leng=="ES")alert(idestablecimiento); //if(leng=="ES")alert(estado); var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idpropietario="+idpropietario+"&accion=admin_elimianarestablecimientos"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***************************************************/ function PuntuarAdmin(idestablecimiento){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&accion=admin_puntuar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***************************************************/ function puntuando(idestablecimiento){ valor=document.getElementById("puntos").value; //if(leng=="ES")alert(valor); //if(leng=="ES")alert(estado); var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idestablecimiento="+idestablecimiento+"&valor="+valor+"&accion=admin_fijapuntuacion"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***************************************************/ function MailAviso(idpropietario,establecimiento,idestablecimiento){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idpropietario="+idpropietario+"&establecimiento="+establecimiento+"&idestablecimiento="+idestablecimiento+"&accion=admin_mail"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***************************************************/ function MailAvisoRenovacion(idpropietario,establecimiento,idestablecimiento){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idpropietario="+idpropietario+"&establecimiento="+establecimiento+"&idestablecimiento="+idestablecimiento+"&accion=admin_mailrenovacion"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**************************************************************/ function ConfGuias(){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("accion=config_guias"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function ModificaSubGuia(idguia){ var capa=document.getElementById("administrador"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idguia="+idguia+"&accion=config_sub_guias"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } function NuevaGuia(){ var padre=document.getElementById("PADRE").value; var valorES=document.getElementById("nueva_guia_ES").value; var valorEN=document.getElementById("nueva_guia_EN").value; var valorGE=document.getElementById("nueva_guia_GE").value; var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("valorES="+valorES+"&valorEN="+valorEN+"&valorGE="+valorGE+"&padre="+padre+"&accion=config_nuevaguia"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function ConfigGuias(id){ var idguia=id; //if(leng=="ES")alert(id); //if(leng=="ES")alert(id + "ES"); var valorES=document.getElementById(id + "ES").value; var valorEN=document.getElementById(id + "EN").value; var valorGE=document.getElementById(id + "GE").value; //if(leng=="ES")alert(valorES); //if(leng=="ES")alert(campo); //if(leng=="ES")alert(valor); var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("valorES="+valorES+"&valorEN="+valorEN+"&valorGE="+valorGE+"&idguia="+idguia+"&accion=config_guardaguia"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ /**********************************************************************************/ function ConfigSubGuias(id){ var idguia=id; //if(leng=="ES")alert(id); //if(leng=="ES")alert(id + "ES"); var padre=document.getElementById("PADRE").value; var valorES=document.getElementById(id + "ES").value; var valorEN=document.getElementById(id + "EN").value; var valorGE=document.getElementById(id + "GE").value; //if(leng=="ES")alert(valorES); //if(leng=="ES")alert(campo); //if(leng=="ES")alert(valor); var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("valorES="+valorES+"&valorEN="+valorEN+"&valorGE="+valorGE+"&padre="+padre+"&idguia="+idguia+"&accion=config_guardaSUBguia"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function EliminarGuia(idguia){ var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idguia="+idguia+"&accion=config_eliminaguia"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function NuevoLugar(){ var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("accion=config_nuevolugar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function GuardaLugar(id){ var idguia=id; //if(leng=="ES")alert(id); //if(leng=="ES")alert(id + "ES"); var idguia=document.getElementById("idguia").value; var tituloES=document.getElementById("tituloES").value; var tituloEN=document.getElementById("tituloEN").value; var tituloGE=document.getElementById("tituloGE").value; var descripcionES=document.getElementById("descripcionES").value; var descripcionEN=document.getElementById("descripcionEN").value; var descripcionGE=document.getElementById("descripcionGE").value; var datosES=document.getElementById("datosES").value; var datosEN=document.getElementById("datosEN").value; var datosGE=document.getElementById("datosGE").value; var url=document.getElementById("url").value; //if(leng=="ES")alert(valorES); //if(leng=="ES")alert(campo); //if(leng=="ES")alert(valor); var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("tituloES="+tituloES+"&tituloEN="+tituloEN+"&tituloGE="+tituloGE+"&descripcionES="+descripcionES+"&descripcionEN="+descripcionEN+"&descripcionGE="+descripcionGE+"&datosES="+datosES+"&datosEN="+datosEN+"&datosGE="+datosGE+"&url="+url+"&idguia="+idguia+"&accion=config_guardalugar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function ListarLugares(){ var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("accion=config_lugares"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function BuscarLugar(busca,pagina,guia){ if(busca==""){ var busca=document.getElementById("BuscaLugar").value; } var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("busca="+busca+"&pagina="+pagina+"&guia="+guia+"&accion=config_lugares"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function EliminarLugar(idlugar){ var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idlugar="+idlugar+"&accion=config_lugareliminar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function EliminarLugarConfirmado(idlugar){ var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idlugar="+idlugar+"&accion=config_lugareliminarconfirmado"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function EditarLugar(idlugar){ var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idlugar="+idlugar+"&accion=config_lugareditar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function GuardaCambiosLugar(idlugar){ var idguia=document.getElementById("idguia").value; var tituloES=document.getElementById("tituloES").value; var tituloEN=document.getElementById("tituloEN").value; var tituloGE=document.getElementById("tituloGE").value; var descripcionES=document.getElementById("descripcionES").value; var descripcionEN=document.getElementById("descripcionEN").value; var descripcionGE=document.getElementById("descripcionGE").value; var datosES=document.getElementById("datosES").value; var datosEN=document.getElementById("datosEN").value; var datosGE=document.getElementById("datosGE").value; var url=document.getElementById("url").value; //if(leng=="ES")alert(valorES); //if(leng=="ES")alert(campo); //if(leng=="ES")alert(valor); var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML=""; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("tituloES="+tituloES+"&tituloEN="+tituloEN+"&tituloGE="+tituloGE+"&descripcionES="+descripcionES+"&descripcionEN="+descripcionEN+"&descripcionGE="+descripcionGE+"&datosES="+datosES+"&datosEN="+datosEN+"&datosGE="+datosGE+"&url="+url+"&idguia="+idguia+"&idlugar="+idlugar+"&accion=config_guardacambioslugar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /**********************************************************************************/ function CambiandoImagenLugar(idlugar,imagen){ //if(leng=="ES")alert(idpropietario); var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML="Por favor... espere"; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idlugar="+idlugar+"&imagen="+imagen+"&accion=CambiaImagenLugar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function EliminandoImagenLugar(idlugar,imagen){ //if(leng=="ES")alert(idpropietario); var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); capa.innerHTML="Por favor... espere"; ajax.open("POST", "INCLUDES/administrador.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("idlugar="+idlugar+"&imagen="+imagen+"&accion=EliminaImagenLugar"); ajax.onreadystatechange=function() { if (ajax.readyState==4) { capa.innerHTML=ajax.responseText; } } } /***********************************************************/ function Control_ir_a_web(id,web){ //var capa=document.getElementById("establecimientos"); var ajax=nuevoAjax(); //capa.innerHTML="Por favor... espere"; ajax.open("POST", "INCLUDES/controles.php", true); ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajax.send("id="+id+"&accion=AccesoWebPropietario"); var WEB="http://" + web; ajax.onreadystatechange=function() { if (ajax.readyState==4) { window.open(WEB); } } } /****************************************/ function borra_texto(ctrl){ document.getElementById(ctrl).value=""; }