var arrMenuId = ["top_sub_menu_01","top_sub_menu_02","top_sub_menu_03", "top_sub_menu_04","top_sub_menu_05","top_sub_menu_06", "top_sub_menu_07","top_sub_menu_08"]; var arrWidth = [123,103,96,157,136,146,82,101]; //["","Vida a Bordo - Azamara Cruises","javascript:abrirVideoCc()","2","8"], var arrSubMenuConfig = [ [ ["","Buscador de cruceros","FindACruise.php","2","1"], ["","Destinos","seccion.php?seccion=destinos&r=2&c=1","2","2"], ["","Nuesta Flota - Royal Caribbean","seccion.php?seccion=flota-royal-caribbean&r=2&c=3","2","3"], ["","Vida a Bordo - Royal Caribbean","javascript:abrirVideoRc()","2","4"], ["","Nuesta Flota - Azamara Cruises","seccion.php?seccion=flota-azamara-cruises&r=2&c=5","2","5"], ["","Vida a Bordo - Azamara Cruises","javascript:abrirVideoAz()","2","4"], ["","Nuesta Flota - Celebrity Cruises","seccion.php?seccion=flota-celebrity-cruises&r=2&c=6","2","6"], ["","Vida a Bordo - Celebrity Cruises","javascript:abrirVideoCc()","2","7"] ], [ ["","CARIBE SIN VISA","promos.php?idPromo=42","3","42"],["","Caribe SIN VISA!","promos.php?idPromo=43","3","43"],["","Caribe Este","promos.php?idPromo=26","3","26"],["","Mediterraneo Este","promos.php?idPromo=40","3","40"],["","Lo mejor de Sudamérica a bordo del Celebriy Infinity!!","promos.php?idPromo=27","3","27"],["","Transcanal y Sudamérica","promos.php?idPromo=45","3","45"],["","Emiratos Arabes","promos.php?idPromo=39","3","39"] ], [ ["","Nuevo Celebrity Silhouetta","noticias.php?idNoticia=4","4","4"],["","All AccessTour ahora disponible en Royal Caribbean","noticias.php?idNoticia=9","4","9"],["","Mas de USD 300 millones de inversiones en Royal Caribbean","noticias.php?idNoticia=10","4","10"],["","CELEBRITY CRUISES AMPLIA CONCEPTO DE PAQUETES A BORDO CON INCLUSION DE RESTAURANTES ESPECIALES","noticias.php?idNoticia=11","4","11"],["","PREMIOS Y RECONOCIMIENTOS PARA AZAMARA CLUB CRUISES","noticias.php?idNoticia=12","4","12"],["","CELEBRITY CRUISES Y MEYER WERFT CELEBRAN INSTALACION DE LA QUILLA DEL CELEBRITY REFLECTION","noticias.php?idNoticia=13","4","13"],["","CELEBRITY CRUISES CREA ALIANZA CON "NERDEL"","noticias.php?idNoticia=14","4","14"],["","NUEVO CHEF PARA CELEBRITY CRUISES","noticias.php?idNoticia=15","4","15"],["","NUEVAS OPCIONES CULINARIAS A BORDO DEL SPLENDOUR OF THE SEAS","noticias.php?idNoticia=22","4","22"],["","CELEBRITY CRUISES INVITA A LOS VACACIONISTAS A DESCANSAR A SU GUSTO CON eXhale","noticias.php?idNoticia=24","4","24"],["","ROYAL CARIBBEAN Y STARBUCKS COFFEE COMPANY INAUGURAN NUEVO ESTABLECIMIENTO A BORDO DEL OASIS OF THE SEAS","noticias.php?idNoticia=23","4","23"],["","El Splendour of the Seas de Royal Caribbean International","noticias.php?idNoticia=20","4","20"] ], [ ["","Royal Caribbean","seccion.php?seccion=preguntas-frecuentes-rc&r=1&c=1","1","1"], ["","Azamara Cruises","seccion.php?seccion=preguntas-frecuentes-az&r=1&c=2","1","2"], ["","Celebrity Cruises","seccion.php?seccion=preguntas-frecuentes-cc&r=1&c=3","1","3"] ], [ ["","Ultimos consejos - Royal Caribbean","seccion.php?seccion=ultimos-consejos&r=5&c=1","5","1"], ["","Check in On-line - Royal Caribbean","https://secure.royalcaribbean-espanol.com/beforeyouboard/boardingDocuments.do;jsessionid=0000q0ynLikdXPyysvZB1QHCzN5:13dljlsvq?cS=NAVBAR","5","2","_blank"], ["","Check in On-line - Azamara Cruises","https://secure.azamaraclubcruises.com/beforeyourcruise/onlineDocumentation/home.do;jsessionid=0000PODITPq6NeALpEjqcb0W5Am:12odfrvug","5","4","_blank"], ["","Check in On-line - Celebrity Cruises","https://secure.celebritycruises.com/beforeyourcruise/onlineDocumentation/home.do;jsessionid=00009AxW-hEO7J2Ml9b7jrS9-Nx:12hdebcnj","5","6","_blank"], ["","Documentación del Viaje","seccion.php?seccion=documentacion&r=5&c=7","5","7"] ], [ ["","Crown & Anchor Society","seccion.php?seccion=Crow-and-Anchor/beneficios&r=6&c=1","6","1"], ["","Captain`s Club","seccion.php?seccion=captains-club&r=6&c=2","6","2"], ["","Le Club Voyage","seccion.php?seccion=le-club-voyage&r=6&c=3","6","3"] ], [ ["","Flight Center","http://www.organfur-flightcenter.com/","7","1","_blank"], ["","Eventos Organfur","http://www.organfur.com.ar/ei/","7","2","_blank"] ], [ ["","Beneficios","contacto.php","7","1"] ] ]; function mapMenuID(menuName) { if(menuName == "top_sub_menu_01") { return "plan_a_cruise"; } if(menuName == "top_sub_menu_02") { return "deals_gifts"; } if(menuName == "top_sub_menu_03") { return "before_you_board"; } if(menuName == "top_sub_menu_04") { return "all_about_cruising"; } if(menuName == "top_sub_menu_05") { return "customer_support"; } if(menuName == "top_sub_menu_06") { return "crown_anchor"; } if(menuName == "top_sub_menu_07") { return "service"; } if(menuName == "top_sub_menu_08") { return "contact"; } } function abrirVideoRc(){ var a=hs.htmlExpand(document.getElementById('videoRc'), { objectType: 'swf', width: 500, objectWidth: 500, objectHeight: 400, maincontentText: 'You need to upgrade your Flash player' } ) } function abrirVideoAz(){ var a=hs.htmlExpand(document.getElementById('videoAz'), { objectType: 'swf', width: 660,height: 393, objectWidth: 660, objectHeight: 363, maincontentText: 'You need to upgrade your Flash player' } ) } function abrirVideoCc(){ var a=hs.htmlExpand(document.getElementById('videoCc'), { objectType: 'swf', width: 500, objectWidth: 500, objectHeight: 400, maincontentText: 'You need to upgrade your Flash player' } ) }$(document).ready(function() { setInterval(function (){ $('#div0800').fadeOut('slow', function() { $('#div0800').slideDown(); }); },5000); }); function cargarContenido(seccion) { $('#divContenido').slideUp(); $('#preloading').fadeIn(); document.getElementById('divContenido').innerHTML = ""; setTimeout( function() { var conn = new Ext.data.Connection(); conn .request( { url : 'cargarContenido.php', method : 'POST', params : { "seccion" : seccion }, success : function(responseObject) { $('#preloading').fadeOut(); document.getElementById('divContenido').innerHTML = responseObject.responseText; $('#divContenido').slideDown(); } }); }, 2000); } function validarContacto() { var regex = new RegExp( "^[^@ ]+@([a-zA-Z0-9-]+.)+([a-zA-Z0-9-]{2}|net|com|gov|mil|org|edu|int|biz|info|name|pro)$"); var faltan = ""; var email = document.getElementById('contact_email'); if (regex.test(email.value) == false) { faltan = " - Email
"; email.className = 'cajaContactoError'; email.onclick = function() { this.className = 'cajaContacto'; }; } var pars = "tipo=contacto&email=" + email.value + "&"; var campos = new Array("nombre", "apellido", "telefono", "comentario", "movil", "prov", "direccion", "ciudad", "pais", "cp"); var obligatorios = new Array("Nombre", "Apellido", "Telefono","", "", "Provincia", "", "Ciudad", "", ""); for (i = 0; i < campos.length; i++) { campo = document.getElementById('contact_' + campos[i]); if (campo.value == "" && obligatorios[i] != "") { faltan += " - " + obligatorios[i] + "
"; campo.className = 'cajaContactoError'; campo.onclick = function() { this.className = 'cajaContacto'; }; } pars += campos[i] + "=" + campo.value + "&"; } pars += "deseo=" + document.getElementById('contact_deseo').checked; if (faltan != "") { // Dialog document.getElementById('dialog').innerHTML = 'Por favor complete todos los campos obligatorios.'; } else { document.getElementById('divContacto').innerHTML = '
Enviando, por favor espere...
'; var conn = new Ext.data.Connection(); conn .request( { url : 'enviarContacto.php', method : 'POST', params : pars, success : function(responseObject) { document.getElementById('divContacto').innerHTML = responseObject.responseText; } }); } } function validarReservar() { var regex = new RegExp( "^[^@ ]+@([a-zA-Z0-9-]+.)+([a-zA-Z0-9-]{2}|net|com|gov|mil|org|edu|int|biz|info|name|pro)$"); var faltan = ""; var email = document.getElementById('contact_email'); if (regex.test(email.value) == false) { faltan = " - Email
"; } var pars = "tipo=contacto&email=" + email.value + "&"; var campos = new Array("nombre", "apellido", "telefono", "celular", "ciudad", "pais", "idPromo"); var obligatorios = new Array("Nombre", "Apellido", "Teléfono", "Celular", "", "", "Promo"); for (i = 0; i < campos.length; i++) { campo = document.getElementById('contact_' + campos[i]); if (campo.value == "" && obligatorios[i] != "") { faltan += " - " + obligatorios[i] + "
"; campo.className = 'cajaContactoError'; campo.onclick = function() { this.className = 'cajaContacto'; }; } pars += campos[i] + "=" + campo.value + "&"; } if (faltan != "") { // Dialog document.getElementById('dialog').innerHTML = 'Por favor complete todos los campos obligatorios.'; } else { document.getElementById('divContacto').innerHTML = '
Enviando, por favor espere...
'; var conn = new Ext.data.Connection(); conn .request( { url : 'enviarReservar.php', method : 'POST', params : pars, success : function(responseObject) { document.getElementById('divContacto').innerHTML = responseObject.responseText; } }); } } function CruiseSearch() { $('#divCruiseResults').slideUp(); $('#preloadingsearch').fadeIn(); document.getElementById('divCruiseResults').innerHTML = ""; document.getElementById('mySearchForm').submit(); } function CruiseSearchPaginado(pag, order) { $('#divCruiseResults').slideUp(); $('#preloadingcargando').fadeIn(); document.getElementById('divCruiseResults').innerHTML = ""; setTimeout( function() { var conn = new Ext.data.Connection(); conn .request( { url : 'CruiseSearch.php', method : 'POST', params : { "pag" : pag, "order" : order }, success : function(responseObject) { $('#preloadingcargando').fadeOut(); document.getElementById('divCruiseResults').innerHTML = responseObject.responseText; $('#divCruiseResults').slideDown(); } }); }, 100); } var CruiseSearchVolverContenidos = ""; function CruiseSearchVolver() { document.getElementById('divCruiseResults').innerHTML = CruiseSearchVolverContenidos; } function CruiseDetails(DepartureDate, CruiseLength, GeoCode, ShipCode, PackageId) { divCategoriesPrices = ""; divItinerary = ""; divDinings = ""; divBarco = ""; divPort = ""; $('.DetalleCrucerosPestLink').click( function() { $('.DetalleCrucerosPestLink') .removeClass('pestOn'); $(this).addClass('pestOn'); }); $('.DetalleCrucerosPestLink').mouseover( function() { $(this).addClass('pestOver'); }); $('.DetalleCrucerosPestLink').mouseout( function() { $(this).removeClass('pestOver'); }); CategoriesPrices(ShipCode, DepartureDate, PackageId); } var divCategoriesPrices = ""; function CategoriesPrices(ShipCode, DepartureDate, PackageId) { $('#divCruiseSubDetails').slideUp(); $('#preloadingdetails').fadeIn(); document.getElementById('divCruiseSubDetails').innerHTML = ""; setTimeout( function() { if (divCategoriesPrices == "") { var conn = new Ext.data.Connection(); conn .request( { url : 'CategoriesPrices.php', method : 'POST', params : { "ShipCode" : ShipCode, "DepartureDate" : DepartureDate, "PackageId" : PackageId }, success : function(responseObject) { $('#preloadingdetails').fadeOut(); document .getElementById('divCruiseSubDetails').innerHTML = responseObject.responseText; $('#divCruiseSubDetails').slideDown(); divCategoriesPrices = responseObject.responseText; } }); } else { $('#preloadingdetails').fadeOut(); document.getElementById('divCruiseSubDetails').innerHTML = divCategoriesPrices; $('#divCruiseSubDetails').slideDown(); } }, 100); } var divItinerary = ""; function Itinerary(ShipCode, DepartureDate, PackageId) { $('#divCruiseSubDetails').slideUp(); $('#preloadingdetails').fadeIn(); document.getElementById('divCruiseSubDetails').innerHTML = ""; setTimeout( function() { if (divItinerary == "") { var conn = new Ext.data.Connection(); conn .request( { url : 'Itinerary.php', method : 'POST', params : { "ShipCode" : ShipCode, "DepartureDate" : DepartureDate, "PackageId" : PackageId }, success : function(responseObject) { $('#preloadingdetails').fadeOut(); document .getElementById('divCruiseSubDetails').innerHTML = responseObject.responseText; $('#divCruiseSubDetails').slideDown(); divItinerary = responseObject.responseText; } }); } else { $('#preloadingdetails').fadeOut(); document.getElementById('divCruiseSubDetails').innerHTML = divItinerary; $('#divCruiseSubDetails').slideDown(); } }, 100); } var divDinings = ""; function Dinings(ShipCode, DepartureDate, PackageId) { $('#divCruiseSubDetails').slideUp(); $('#preloading').fadeIn(); document.getElementById('divCruiseSubDetails').innerHTML = ""; setTimeout( function() { if (divDinings == "") { var conn = new Ext.data.Connection(); conn .request( { url : 'Dinings.php', method : 'POST', params : { "ShipCode" : ShipCode, "DepartureDate" : DepartureDate, "PackageId" : PackageId }, success : function(responseObject) { $('#preloading').fadeOut(); document .getElementById('divCruiseSubDetails').innerHTML = responseObject.responseText; $('#divCruiseSubDetails').slideDown(); divDinings = responseObject.responseText; } }); } else { $('#preloading').fadeOut(); document.getElementById('divCruiseSubDetails').innerHTML = divDinings; $('#divCruiseSubDetails').slideDown(); } }, 100); } var divBarco = ""; function Barco(ShipCode, DepartureDate, PackageId) { $('#divCruiseSubDetails').slideUp(); $('#preloadingdetails').fadeIn(); document.getElementById('divCruiseSubDetails').innerHTML = ""; setTimeout( function() { if (divBarco == "") { var conn = new Ext.data.Connection(); conn .request( { url : 'Barco.php', method : 'GET', params : { "ShipCode" : ShipCode, "carga" : "blanco" }, success : function(responseObject) { $('#preloadingdetails').fadeOut(); document .getElementById('divCruiseSubDetails').innerHTML = responseObject.responseText; $('#divCruiseSubDetails').slideDown(); divBarco = responseObject.responseText; } }); } else { $('#preloadingdetails').fadeOut(); document.getElementById('divCruiseSubDetails').innerHTML = divBarco; $('#divCruiseSubDetails').slideDown(); } }, 100); } var divPort = ""; function Port(PortCode) { $('#divCruiseSubDetails').slideUp(); $('#preloadingdetails').fadeIn(); document.getElementById('divCruiseSubDetails').innerHTML = ""; setTimeout( function() { if (divPort == "") { var conn = new Ext.data.Connection(); conn .request( { url : 'Port.php', method : 'GET', params : { "PortCode" : PortCode, "carga" : "blanco" }, success : function(responseObject) { $('#preloadingdetails').fadeOut(); document .getElementById('divCruiseSubDetails').innerHTML = responseObject.responseText; $('#divCruiseSubDetails').slideDown(); divPort = responseObject.responseText; } }); } else { $('#preloadingdetails').fadeOut(); document.getElementById('divCruiseSubDetails').innerHTML = divPort; $('#divCruiseSubDetails').slideDown(); } }, 100); } function esFechaValida(fecha){ if (fecha != undefined && fecha.value != "" ){ if (!/^\d{2}\/\d{2}\/\d{4}$/.test(fecha.value)){ return false; } var dia = parseInt(fecha.value.substring(0,2),10); var mes = parseInt(fecha.value.substring(3,5),10); var anio = parseInt(fecha.value.substring(6),10); switch(mes){ case 1: case 3: case 5: case 7: case 8: case 10: case 12: numDias=31; break; case 4: case 6: case 9: case 11: numDias=30; break; case 2: numDias=29; break; default: return false; } if (dia>numDias || dia==0){ return false; } return true; } } function validarFecha(fecha){ if(esFechaValida(fecha)==true || fecha==""){ return 0; }else{ alert('Ingrese una fecha válida con el formato DD/MM/AAAA o en el caso que no corresponda dejar en blanco.'); fecha.value=''; } } function validarNumero(nro){ if (/^([0-9])*$/.test(nro.value)){ return 0; }else{ alert('Ingrese solo un número o en el caso que no corresponda dejar en blanco.'); nro.value=''; } } function validarReserva() { document.getElementById('divObligatorios').innerHTML = ""; document.getElementById('divObligatorios2').innerHTML = ""; document.getElementById('divObligatorios3').innerHTML = ""; var regex = new RegExp( "^[^@ ]+@([a-zA-Z0-9-]+.)+([a-zA-Z0-9-]{2}|net|com|gov|mil|org|edu|int|biz|info|name|pro)$"); var faltan = ""; var faltan2 = ""; var email = document.getElementById('emailReserva'); if (regex.test(email.value) == false) { faltan = " - Email
"; email.className = 'cajaContactoError'; email.onclick = function() { this.className = 'cajaContacto'; }; } var pars = "tipo=contacto&emailReserva=" + email.value + "&"; var campos = new Array("nombre", "apellido", "privado", "direccion", "ciudad", "cp"); var obligatorios = new Array("Nombre", "Apellido", "Teléfono", "Dirección", "Ciudad", "CP"); for (i = 0; i < campos.length; i++) { campo = document.getElementById(campos[i]); if (campo.value == "" && obligatorios[i] != "") { faltan += " - " + obligatorios[i] + "
"; campo.className = 'cajaContactoError'; campo.onclick = function() { this.className = 'cajaContacto'; }; } } if (faltan != "") { document.getElementById('divObligatorios').innerHTML = 'Por favor complete todos campos obligatorios'; } for (ii = 1; ii <= 2; ii++) { var campos = new Array("nombre" + ii, "apellido" + ii, "nacimiento" + ii, "nacionalidad" + ii); var obligatorios = new Array("Nombre", "Apellido", "Fecha de Nacimiento", "Nacionalidad"); for (i = 0; i < campos.length; i++) { campo = document.getElementById(campos[i]); if (campo.value == "" && obligatorios[i] != "") { faltan2 += " - " + obligatorios[i] + "
"; campo.className = 'cajaContactoError'; campo.onclick = function() { this.className = 'cajaContacto'; }; } } } var mayores=0; for (ii = 1; ii <= 2; ii++) { var campos = new Array("nacimiento" + ii); var obligatorios = new Array("Fecha"); for (i = 0; i < campos.length; i++) { campo = document.getElementById(campos[i]); if (calcular_edad(campo.value)>=21) { mayores++; } } } if(mayores==0){ document.getElementById('divObligatorios2').innerHTML = 'NO SE PERMITE MENORES DE 21 AÑOS VIAJANDO SOLO EN LA CABINA
'; } for (ii = 1; ii <= 2; ii++) { var campos = new Array("nacimiento" + ii); var obligatorios = new Array("Fecha"); for (i = 0; i < campos.length; i++) { campo = document.getElementById(campos[i]); if (esFechaValida(campo)==false) { faltan2 += " - " + obligatorios[i] + "
"; campo.className = 'cajaContactoError'; document.getElementById('divObligatorios2').innerHTML = 'Fecha de Nacimiento errónea, debe tener el formato DD/MM/AAAA. Por Ejemplo: 21/03/1980
'; campo.onclick = function() { this.className = 'cajaContacto'; }; } } } if (faltan2 != "") { document.getElementById('divObligatorios2').innerHTML += 'Por favor complete todos campos obligatorios'; } var acepto = document.getElementById('acepto'); if (acepto.checked == false) { faltan = " - Acepto
"; acepto.className = 'checkContactoError'; acepto.onclick = function() { this.className = 'checkContacto'; }; document.getElementById('divObligatorios3').innerHTML = 'Por favor, lea los Terminos y Condiciones y si está de acuerdo marque para aceptarlos.'; } if (faltan == "" && faltan2 == "") { habilitarPropina(); document.getElementById('formGuests').submit(); } } function calcular_edad(fecha){ // calculo la fecha de hoy hoy=new Date() // alert(hoy) // calculo la fecha que recibo // La descompongo en un array var array_fecha = fecha.split("/") // si el array no tiene tres partes, la fecha es incorrecta if (array_fecha.length!=3) return false // compruebo que los ano, mes, dia son correctos var ano ano = parseInt(array_fecha[2]); if (isNaN(ano)) return false var mes mes = parseInt(array_fecha[1]); if (isNaN(mes)) return false var dia dia = parseInt(array_fecha[0]); if (isNaN(dia)) return false // si el año de la fecha que recibo solo tiene 2 cifras hay que cambiarlo a // 4 if (ano<=99) ano +=1900 // resto los años de las dos fechas edad=hoy.getFullYear()- ano - 1; // -1 porque no se si ha cumplido años ya // este año // si resto los meses y me da menor que 0 entonces no ha cumplido años. Si // da mayor si ha cumplido if (hoy.getMonth() + 1 - mes < 0) // + 1 porque los meses empiezan en 0 return edad if (hoy.getMonth() + 1 - mes > 0) return edad+1 // entonces es que eran iguales. miro los dias // si resto los dias y me da menor que 0 entonces no ha cumplido años. Si da // mayor o igual si ha cumplido if (hoy.getUTCDate() - dia >= 0) return edad + 1 return edad } var intentos = 0; function cargarCategoriePorTipo(DeckLoc) { $('divCat' + DeckLoc).fadeIn(); document.getElementById('divCat' + DeckLoc).innerHTML = document .getElementById('preloading').innerHTML; var conn = new Ext.data.Connection(); conn .request( { url : 'CategoriesCargarPorTipo.php', method : 'POST', params : { "DeckLoc" : DeckLoc }, success : function(responseObject) { document.getElementById('divCat' + DeckLoc).innerHTML = responseObject.responseText; }, failure : function(response, opts) { document.getElementById('preloading').innerHTML = ' Cargando, esto puede tardar un minuto por favor espere...'; if (intentos < 4) { cargarCategoriePorTipo(DeckLoc); intentos++; } else { location.reload(); } } }); } function cargarCategoriePorRate(Rate) { var conn = new Ext.data.Connection(); conn .request( { url : 'CategoriesCargarPorRate.php', method : 'POST', params : { "Rate" : Rate }, success : function(responseObject) { document.getElementById('divRate_' + Rate).innerHTML = responseObject.responseText; }, timeOut:55000, failure : function(response, opts) { document.getElementById('divCargandoRate_' + Rate).innerHTML = ' Procesando datos, por favor espere...'; setTimeout(function(){ cargarCategoriePorRate(Rate); },aleatorio(1000,5000)); } }); } function aleatorio(inferior, superior) { numPosibilidades = superior - inferior aleat = Math.random() * numPosibilidades aleat = Math.floor(aleat) return parseInt(inferior) + aleat } function loginAgencia(){ var faltan=""; var email=document.getElementById('email').value; if (email=="") { faltan=" - E-mail
"; } var clave=document.getElementById('clave').value; if (clave=="") { faltan=faltan+" - Clave
"; } if(faltan!=""){ Ext.Msg.show({ title:'ORGANFUR - Agentes de Viajes', msg: "Por favor ingrese su E-mail y Clave:", buttons: Ext.Msg.OK, minWidth: 250, animEl: document.body }); }else{ document.getElementById('divLogin').innerHTML="
 
 Verificando datos, por favor espere...
 
"; var conn = new Ext.data.Connection(); conn.request({ url: 'agenciasLogin.php', method: 'POST', params: {"email": email,"clave":clave}, success: function(responseObject) { obj = Ext.util.JSON.decode(responseObject.responseText); document.getElementById('divLogin').innerHTML=obj.data.estadoLogin; if(obj.data.login=="false"){ Ext.Msg.show({ title:'ORGANFUR - Agentes de Viajes', msg: "Login incorrecto, por favor vuelva a intentar", buttons: Ext.Msg.OK, minWidth: 250, animEl: document.body }); document.getElementById('clave').value=""; Ext.MessageBox.hide(); }else if(obj.data.login=="desactivo"){ Ext.Msg.show({ title:'ORGANFUR - Agentes de Viajes', msg: "Cuenta Desactiva, usted se encuentra registrado pero su cuenta no ha sido Activada.", buttons: Ext.Msg.OK, minWidth: 250, animEl: document.body }); document.getElementById('clave').value=""; Ext.MessageBox.hide(); }else{ document.getElementById('divLogin').innerHTML=obj.data.estadoLogin; window.open('FindACruise.php?seccion=agencias'); Ext.MessageBox.hide(); } } }); } } function loginPasajero(){ var faltan=""; var email=document.getElementById('emailPasajero').value; if (email=="") { faltan=" - E-mail
"; } var clave=document.getElementById('clavePasajero').value; if (clave=="") { faltan=faltan+" - Clave
"; } if(faltan!=""){ Ext.Msg.show({ title:'ORGANFUR - Pasajeros frecuentes', msg: "Por favor ingrese su E-mail y Clave:", buttons: Ext.Msg.OK, minWidth: 250, animEl: document.body }); }else{ document.getElementById('divLoginPasajeros').innerHTML="
 
 Verificando datos, por favor espere...
 
"; var conn = new Ext.data.Connection(); conn.request({ url: 'pasajerosLogin.php', method: 'POST', params: {"email": email,"clave":clave}, success: function(responseObject) { obj = Ext.util.JSON.decode(responseObject.responseText); if(obj.data.login=="false"){ Ext.Msg.show({ title:'ORGANFUR - Pasajeros frecuentes', msg: "Login incorrecto, por favor vuelva a intentar", buttons: Ext.Msg.OK, minWidth: 250, animEl: document.body }); document.getElementById('clavePasajero').value=""; Ext.MessageBox.hide(); }else if(obj.data.login=="desactivo"){ Ext.Msg.show({ title:'ORGANFUR - Pasajeros frecuentes', msg: "Cuenta Desactiva, usted se encuentra registrado pero su cuenta no ha sido Activada.", buttons: Ext.Msg.OK, minWidth: 250, animEl: document.body }); document.getElementById('clavePasajero').value=""; Ext.MessageBox.hide(); }else{ document.getElementById('divLoginPasajeros').innerHTML=obj.data.estadoLogin; window.open('pasajeros.php'); Ext.MessageBox.hide(); } } }); } } function logoutAgencia(){ Ext.MessageBox.show({ msg: '
Cerrando Sesión, por favor espere...', title: "ORGANFUR - Agentes de Viajes", width:280, closable :false, icon:'x-window-preload', // custom class in msg-box.html animEl: 'divContenidos' }); var conn = new Ext.data.Connection(); conn.request({ url: 'agenciasLogout.php', method: 'POST', success: function(responseObject) { obj = Ext.util.JSON.decode(responseObject.responseText); document.getElementById('divLogin').innerHTML=obj.data.estadoLogin; Ext.MessageBox.hide(); } }); } function logoutPasajero(){ Ext.MessageBox.show({ msg: '
Cerrando Sesión, por favor espere...', title: "ORGANFUR - Pasajeros frecuentes", width:280, closable :false, icon:'x-window-preload', // custom class in msg-box.html animEl: 'divContenidos' }); var conn = new Ext.data.Connection(); conn.request({ url: 'pasajerosLogout.php', method: 'POST', success: function(responseObject) { obj = Ext.util.JSON.decode(responseObject.responseText); document.getElementById('divLoginPasajeros').innerHTML=obj.data.estadoLogin; Ext.MessageBox.hide(); } }); } function cargarBarcosFechas(fecha){ var conn = new Ext.data.Connection(); conn.request({ url: 'cargarBarcosFechas.php', method: 'POST', params: {"fecha": fecha}, success: function(responseObject) { document.getElementById('divBarcosFechas').innerHTML=responseObject.responseText; } }); } function enviarConsultarTarifa() { var faltan=""; var cabinas=document.getElementById('cabinas').value; if (cabinas=="") { faltan=faltan+" - Cabinas
"; } var fechasSeleccionadas=""; var elementos = document.getElementsByName("fechas"); for(var i=0; i"; }else{ fechasSeleccionadas=fechasSeleccionadas.substring(0,(fechasSeleccionadas.length)-2); } if(faltan!=""){ Ext.Msg.show({ title:'ORGANFUR - Formulario de Contacto', msg: "Por favor complete los siguientes campos obligatorios:
"+faltan, buttons: Ext.Msg.OK, minWidth: 250, animEl: document.body }); }else{ document.getElementById('divContenido').innerHTML="
 
 Enviando Solicitud, por favor espere...
 
"; var conn = new Ext.data.Connection(); conn.request({ url: 'enviarConsultarTarifas.php', method: 'POST', params: {"cabinas":cabinas,"fechas":fechasSeleccionadas}, success: function(responseObject) { document.getElementById('divContenido').innerHTML=responseObject.responseText; Ext.MessageBox.hide(); } }); } } function enviarSolicitudMaterial() { var faltan=""; var otros=document.getElementById('otros').value; var comentarios = document.getElementById('comentarios').value; var campo1; if(document.getElementById('campo1').checked){campo1=document.getElementById('campo1').value;}; var campo2; if(document.getElementById('campo2').checked){campo2=document.getElementById('campo2').value;}; var campo3; if(document.getElementById('campo3').checked){campo3=document.getElementById('campo3').value;}; var campo4; if(document.getElementById('campo4').checked){campo4=document.getElementById('campo4').value;}; if(faltan!=""){ Ext.Msg.show({ title:'ORGANFUR - Formulario de Contacto', msg: "Por favor complete los siguientes campos obligatorios:
"+faltan, buttons: Ext.Msg.OK, minWidth: 250, animEl: document.body }); }else{ document.getElementById('divContenido').innerHTML="
 
 Enviando Solicitud, por favor espere...
 
"; var conn = new Ext.data.Connection(); conn.request({ url: 'enviarSolicitudMaterial.php', method: 'POST', params: {"otros":otros,"comentarios":comentarios,"campo1":campo1,"campo2":campo2,"campo3":campo3,"campo4":campo4}, success: function(responseObject) { document.getElementById('divContenido').innerHTML=responseObject.responseText; Ext.MessageBox.hide(); } }); } } function validarAgenciaRegistro() { var regex = new RegExp( "^[^@ ]+@([a-zA-Z0-9-]+.)+([a-zA-Z0-9-]{2}|net|com|gov|mil|org|edu|int|biz|info|name|pro)$"); var faltan = ""; var email = document.getElementById('contact_email'); if (regex.test(email.value) == false) { faltan = " - Email
"; email.className = 'cajaContactoError'; email.onclick = function() { this.className = 'cajaContacto'; }; } var pars = "tipo=contacto&email=" + email.value + "&"; var campos = new Array("razonSocial","nombre", "apellido", "telefono", "movil", "prov", "direccion", "ciudad", "pais", "cp", "clave", "legajo", "cuit"); var obligatorios = new Array("Razon Social","Nombre", "Apellido", "Telefono", "Celular", "Provincia", "Direccion", "Ciudad", "Pais", "", "Clave", "Legajo", "CUIT"); for (i = 0; i < campos.length; i++) { campo = document.getElementById('contact_' + campos[i]); if (campo.value == "" && obligatorios[i] != "") { faltan += " - " + obligatorios[i] + "
"; campo.className = 'cajaContactoError'; campo.onclick = function() { this.className = 'cajaContacto'; }; } pars += campos[i] + "=" + campo.value + "&"; } if (faltan != "") { // Dialog document.getElementById('dialog').innerHTML = 'Por favor complete todos los campos obligatorios.'; } else { document.getElementById('divContacto').innerHTML = '
Enviando, por favor espere...
'; var conn = new Ext.data.Connection(); conn .request( { url : 'guardarAgencia.php', method : 'POST', params : pars, success : function(responseObject) { document.getElementById('divContacto').innerHTML = responseObject.responseText; } }); } } function validarPasajeroRegistro() { var regex = new RegExp( "^[^@ ]+@([a-zA-Z0-9-]+.)+([a-zA-Z0-9-]{2}|net|com|gov|mil|org|edu|int|biz|info|name|pro)$"); var faltan = ""; var email = document.getElementById('contact_email'); if (regex.test(email.value) == false) { faltan = " - Email
"; email.className = 'cajaContactoError'; email.onclick = function() { this.className = 'cajaContacto'; }; } var pars = "tipo=contacto&email=" + email.value + "&"; var campos = new Array("nombre", "apellido", "telefono", "movil", "prov", "direccion", "ciudad", "pais", "cp", "clave", "numeroPasajero", "fechaNacimiento"); var obligatorios = new Array("Nombre", "Apellido", "Telefono", "", "Provincia", "Direccion", "Ciudad", "Pais", "", "Clave", "Numero de Pasajero", "Fecha Nacimiento"); for (i = 0; i < campos.length; i++) { campo = document.getElementById('contact_' + campos[i]); if (campo.value == "" && obligatorios[i] != "") { faltan += " - " + obligatorios[i] + "
"; campo.className = 'cajaContactoError'; campo.onclick = function() { this.className = 'cajaContacto'; }; } pars += campos[i] + "=" + campo.value + "&"; } if (faltan != "") { // Dialog document.getElementById('dialog').innerHTML = 'Por favor complete todos los campos obligatorios.'; } else { document.getElementById('divContacto').innerHTML = '
Enviando, por favor espere...
'; var conn = new Ext.data.Connection(); conn .request( { url : 'guardarPasajero.php', method : 'POST', params : pars, success : function(responseObject) { document.getElementById('divContacto').innerHTML = responseObject.responseText; } }); } } function deshabilitarPropina(){ document.getElementById('propinas')[0].selected=true; document.getElementById('propinas').disabled=true; } function habilitarPropina(){ document.getElementById('propinas').disabled=false; } function validarHoteles() { var regex = new RegExp( "^[^@ ]+@([a-zA-Z0-9-]+.)+([a-zA-Z0-9-]{2}|net|com|gov|mil|org|edu|int|biz|info|name|pro)$"); var faltan = ""; var pars=""; var campos = new Array("ciudad", "fechaLlegada", "fechaSalida", "categoria", "habitaciones", "pasPorHab", "comentario"); var obligatorios = new Array("Nombre", "Apellido", "Telefono","Cate", "hab", "pasPorHab", ""); for (i = 0; i < campos.length; i++) { campo = document.getElementById('hoteles_' + campos[i]); if (campo.value == "" && obligatorios[i] != "") { faltan += " - " + obligatorios[i] + "
"; campo.className = 'cajaContactoError'; campo.onclick = function() { this.className = 'cajaContacto'; }; } pars += campos[i] + "=" + campo.value + "&"; } if (faltan != "") { // Dialog document.getElementById('dialog').innerHTML = 'Por favor complete todos los campos obligatorios.'; } else { document.getElementById('divHoteles').innerHTML = '
Enviando, por favor espere...
'; var conn = new Ext.data.Connection(); conn .request( { url : 'enviarHoteles.php', method : 'POST', params : pars, success : function(responseObject) { document.getElementById('divHoteles').innerHTML = responseObject.responseText; } }); } } function validarAereos() { var regex = new RegExp( "^[^@ ]+@([a-zA-Z0-9-]+.)+([a-zA-Z0-9-]{2}|net|com|gov|mil|org|edu|int|biz|info|name|pro)$"); var faltan = ""; var pars=""; var campos = new Array("ciudadSalida", "ciudadDestino", "fechaSalida", "pasajeros", "ciudadRegreso","ciaPref", "comentario"); var obligatorios = new Array("Nombre", "Apellido", "Telefono","Cate", "hab", "ciaPref", ""); for (i = 0; i < campos.length; i++) { campo = document.getElementById('aereo_' + campos[i]); if (campo.value == "" && obligatorios[i] != "") { faltan += " - " + obligatorios[i] + "
"; campo.className = 'cajaContactoError'; campo.onclick = function() { this.className = 'cajaContacto'; }; } pars += campos[i] + "=" + campo.value + "&"; } if (faltan != "") { // Dialog document.getElementById('dialogAereo').innerHTML = 'Por favor complete todos los campos obligatorios.'; } else { document.getElementById('divAereos').innerHTML = '
Enviando, por favor espere...
'; var conn = new Ext.data.Connection(); conn .request( { url : 'enviarAereos.php', method : 'POST', params : pars, success : function(responseObject) { document.getElementById('divAereos').innerHTML = responseObject.responseText; } }); } }function verRecuperarAgencia(){ Ext.onReady(function(){ Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'side'; var login = new Ext.FormPanel({ labelWidth:40, labelAlign:'right', waitMsgTarget: true, title:'Ingrese el e-mail de registro y le enviaremos la clave.', url:'recuperarAgencia.php', frame:true, // Specific attributes for the text fields for username / password. // The "name" attribute defines the name of variables sent to the server. items: [{ xtype:'textfield', fieldLabel: 'e-mail', name: 'email', allowBlank: false, anchor:'94%' }] }); // This just creates a window to wrap the login form. // The login object is passed to the items collection. var winLogin = new Ext.Window({ layout:'fit', width:350, title:'ORGANFUR - Recuperar clave', height:150, closable: true, resizable: true, modal:true, plain: true, items: [login], // All the magic happens after the user clicks the button buttons:[{ text:'Recuperar', formBind: true, // Function that fires when user clicks the button handler:function(){ if ( login.form.isValid() ) { login.getForm().submit({ method:'POST', waitTitle:'ORGANFUR - Recuperar clave', waitMsg:'Enviando Datos...', success:function(form, action){ obj = Ext.util.JSON.decode(action.response.responseText); Ext.Msg.alert('ORGANFUR', 'Le enviamos la clave, en unos instantes la recibirá en su E-mail!', function(btn, text){ if (btn == 'ok'){ winLogin.destroy(); } },{minWidth: 300}); }, failure:function(form, action){ if(action.failureType == 'server'){ obj = Ext.util.JSON.decode(action.response.responseText); Ext.Msg.alert('Login Error!', obj.errors.reason); }else{ Ext.Msg.alert('ORGANFUR', 'El E-mail ingresado no esta registrado, por favor vuelva a intentar!', function(btn, text){ },{minWidth: 300}); } login.getForm().reset(); } }); }else{ login.form.markInvalid([{id:'email', msg:'Campo obligatorio!'}]); Ext.Msg.show({ title:'ORGANFUR - Recupero de Clave', msg: 'Por favor ingrese el E-mail.', buttons: Ext.Msg.OK, minWidth: 250, animEl: document.body }); } } },{ text:'Cancelar', handler:function(){ winLogin.destroy(); } }] }); winLogin.show(); }); }function verRecuperarPasajero(){ Ext.onReady(function(){ Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'side'; var login = new Ext.FormPanel({ labelWidth:40, labelAlign:'right', waitMsgTarget: true, title:'Ingrese el e-mail de registro y le enviaremos la clave.', url:'recuperarPasajero.php', frame:true, // Specific attributes for the text fields for username / password. // The "name" attribute defines the name of variables sent to the server. items: [{ xtype:'textfield', fieldLabel: 'e-mail', name: 'email', allowBlank: false, anchor:'94%' }] }); // This just creates a window to wrap the login form. // The login object is passed to the items collection. var winLogin = new Ext.Window({ layout:'fit', width:350, title:'ORGANFUR - Recuperar clave', height:150, closable: true, resizable: true, modal:true, plain: true, items: [login], // All the magic happens after the user clicks the button buttons:[{ text:'Recuperar', formBind: true, // Function that fires when user clicks the button handler:function(){ if ( login.form.isValid() ) { login.getForm().submit({ method:'POST', waitTitle:'ORGANFUR - Recuperar clave', waitMsg:'Enviando Datos...', success:function(form, action){ obj = Ext.util.JSON.decode(action.response.responseText); Ext.Msg.alert('ORGANFUR', 'Le enviamos la clave, en unos instantes la recibirá en su E-mail!', function(btn, text){ if (btn == 'ok'){ winLogin.destroy(); } },{minWidth: 300}); }, failure:function(form, action){ if(action.failureType == 'server'){ obj = Ext.util.JSON.decode(action.response.responseText); Ext.Msg.alert('Login Error!', obj.errors.reason); }else{ Ext.Msg.alert('ORGANFUR', 'El E-mail ingresado no esta registrado, por favor vuelva a intentar!', function(btn, text){ },{minWidth: 300}); } login.getForm().reset(); } }); }else{ login.form.markInvalid([{id:'email', msg:'Campo obligatorio!'}]); Ext.Msg.show({ title:'ORGANFUR - Recupero de Clave', msg: 'Por favor ingrese el E-mail.', buttons: Ext.Msg.OK, minWidth: 250, animEl: document.body }); } } },{ text:'Cancelar', handler:function(){ winLogin.destroy(); } }] }); winLogin.show(); }); }function verAgencias(idAgencia){ Ext.onReady(function(){ Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'side'; var formAgencia = new Ext.FormPanel({ labelAlign: 'top', defaults: {style: 'font-size:10px'}, url:'guardarAgencia.php', waitMsgTarget: true, frame:true, // Specific attributes for the text fields for username / password. // The "name" attribute defines the name of variables sent to the server. items: [{ layout:'column', items:[{ columnWidth:.5, layout: 'form', items: [{ xtype:'textfield', fieldLabel: 'E-mail', name: 'mail', vtype:'email', allowBlank: false, anchor:'92%' },{ xtype:'textfield', fieldLabel: 'Nombre', name: 'nombre', allowBlank: false, anchor:'92%' },{ xtype:'textfield', fieldLabel: 'Razón Social', name: 'razonSocial', allowBlank: false, anchor:'92%' },{ xtype:'textfield', fieldLabel: 'Dirección', name: 'direccion', allowBlank: false, anchor:'92%' },new Ext.form.ComboBox({ fieldLabel: 'Provincia', hiddenName:'provincia', store: new Ext.data.SimpleStore({ fields: ['id', 'nombre'], data : Ext.provincias.states // from states.js }), valueField:'id', displayField:'nombre', typeAhead: true, mode: 'local', triggerAction: 'all', emptyText:'Seleccione...', selectOnFocus:true, anchor:'90%', style:'margin-bottom: 3px' }),{ xtype:'textfield', fieldLabel: 'Teléfono Fijo', name: 'telefono', allowBlank: false, anchor:'92%' },{ xtype:'textfield', fieldLabel: 'Legajo', name: 'legajo', allowBlank: false, anchor:'92%' }] },{ columnWidth:.5, layout: 'form', items: [{ xtype:'textfield', fieldLabel: 'Clave', name: 'clave', allowBlank: false, anchor:'92%' },{ xtype:'textfield', fieldLabel: 'Apellido', name: 'apellido', allowBlank: false, anchor:'92%' },{ xtype:'textfield', fieldLabel: 'CUIT', name: 'cuit', allowBlank: false, anchor:'92%' },{ xtype:'textfield', fieldLabel: 'Ciudad / Localidad', name: 'ciudad', allowBlank: false, anchor:'92%' },{ xtype:'textfield', fieldLabel: 'Código Postal', name: 'cp', allowBlank: false, anchor:'92%' },{ xtype:'textfield', fieldLabel: 'Celular', name: 'celular', anchor:'92%' }] }] }], /* Could use listeners to populate the form */ listeners:{ render:function() { if(idAgencia>0){ formAgencia.getForm().load({ method : 'GET', url : 'cargarAgencia.php', params : { 'idAgencia': idAgencia}, success :function(form, action) { //alert('Success:\n' + action.response.responseText); }, failure:function(form, action) { alert('Failure: ' + action.failureType); } }); } } } }); // This just creates a window to wrap the login form. // The login object is passed to the items collection. var win = new Ext.Window({ layout:'fit', modal:true, title:'ORGANFUR - Agencia', width:500, autoScroll:true, height:420, closable: true, resizable: true, maximizable:false, plain: true, items: [formAgencia], // All the magic happens after the user clicks the button buttons:[{ text:'Registrar', formBind: true, // Function that fires when user clicks the button handler:function(){ if ( formAgencia.form.isValid() ) { formAgencia.getForm().submit({ method:'POST', waitTitle:'ORGANFUR - Agencia', waitMsg:'Guardando Agencia...', params : { 'idAgencia': idAgencia}, success:function(){ Ext.Msg.alert('Estado', 'Agencia registrada con exito!', function(btn, text){ if (btn == 'ok'){ win.destroy(); } }); }, failure:function(form, action){ if(action.failureType == 'server'){ obj = Ext.util.JSON.decode(action.response.responseText); Ext.Msg.alert('Login Failed!', obj.errors.reason); }else{ Ext.Msg.alert('Warning!', 'Authentication server is unreachable : ' + action.response.responseText); } formAgencia.getForm().reset(); } }); }else{ formAgencia.form.markInvalid(); Ext.Msg.show({ title:'ORGANFUR - Agencia', msg: 'Por favor complete todos lo campos obligatorios.', buttons: Ext.Msg.OK, animEl: document.body }); } } },{ text:'Cancelar', handler:function(){ win.destroy(); } }] }); win.show(); }); }function verPasajeros(idPasajero){ Ext.onReady(function(){ Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'side'; var formPasajero = new Ext.FormPanel({ labelAlign: 'top', defaults: {style: 'font-size:10px'}, url:'guardarPasajero.php', waitMsgTarget: true, frame:true, // Specific attributes for the text fields for username / password. // The "name" attribute defines the name of variables sent to the server. items: [{ layout:'column', items:[{ columnWidth:.5, layout: 'form', defaults: {anchor: '92%'}, items: [{ xtype:'textfield', fieldLabel: 'E-mail', name: 'mail', vtype:'email', allowBlank: false, anchor:'92%' },{ xtype:'textfield', fieldLabel: 'Nombre', name: 'nombre', allowBlank:false, id: 'nombre' },{ xtype:'textfield', fieldLabel: 'Dirección', name: 'direccion', id: 'direccion' }, new Ext.form.ComboBox({ fieldLabel: 'Provincia', hiddenName:'provincia', store: new Ext.data.SimpleStore({ fields: ['id', 'nombre'], data : Ext.provincias.states // from states.js }), valueField:'id', displayField:'nombre', typeAhead: true, mode: 'local', triggerAction: 'all', emptyText:'Seleccione...', selectOnFocus:true, anchor:'90%', style:'margin-bottom: 3px' }),{ xtype:'textfield', fieldLabel: 'Cod. Postal', name: 'cp', id: 'cp' },{ xtype:'textfield', fieldLabel: 'Celular', name: 'celular', id: 'celular' }] },{ columnWidth:.5, layout: 'form', defaults: {anchor: '92%'}, items: [{ xtype:'textfield', fieldLabel: 'Clave', allowBlank:false, name: 'clave', id: 'clave' },{ xtype:'textfield', fieldLabel: 'Apellido', allowBlank:false, name: 'apellido', id: 'apellido' },{ xtype:'textfield', fieldLabel: 'Ciudad', name: 'ciudad', id: 'ciudad' },{ xtype:'textfield', fieldLabel: 'Teléfono', name: 'telefono', id: 'telefono' },{ xtype: 'datefield', format:'d/m/Y', fieldLabel: 'Fecha de Nacimiento', name: 'fechaNacimiento', id: 'fechaNacimiento', anchor:'95%' },{ xtype:'textfield', fieldLabel: 'Numero de Pasajero', name: 'numeroPasajero', allowBlank: false, id: 'numeroPasajero' }] }] }], /* Could use listeners to populate the form */ listeners:{ render:function() { if(idPasajero>0){ formPasajero.getForm().load({ method : 'GET', url : './admin/cargarPasajero.php', params : { 'idPasajero': idPasajero}, success :function(form, action) { //alert('Success:\n' + action.response.responseText); }, failure:function(form, action) { alert('Failure: ' + action.failureType); } }); } } } }); // This just creates a window to wrap the login form. // The login object is passed to the items collection. var win = new Ext.Window({ layout:'fit', modal:true, title:'ORGANFUR - Pasajeros frecuentes', width:500, autoScroll:true, height:420, closable: true, resizable: true, maximizable:false, plain: true, items: [formPasajero], // All the magic happens after the user clicks the button buttons:[{ text:'Registrar', formBind: true, // Function that fires when user clicks the button handler:function(){ if ( formPasajero.form.isValid() ) { formPasajero.getForm().submit({ method:'POST', waitTitle:'ORGANFUR - Pasajeros frecuentes', waitMsg:'Guardando Pasajero frecuente...', params : { 'idPasajero': idPasajero}, success:function(){ Ext.Msg.alert('Estado', 'Pasajero registrado con exito!', function(btn, text){ if (btn == 'ok'){ win.destroy(); } }); }, failure:function(form, action){ if(action.failureType == 'server'){ obj = Ext.util.JSON.decode(action.response.responseText); Ext.Msg.alert('Login Failed!', obj.errors.reason); }else{ Ext.Msg.alert('Warning!', 'Authentication server is unreachable : ' + action.response.responseText); } formPasajero.getForm().reset(); } }); }else{ formPasajero.form.markInvalid(); Ext.Msg.show({ title:'ORGANFUR - Pasajeros frecuentes', msg: 'Por favor complete todos lo campos obligatorios.', buttons: Ext.Msg.OK, animEl: document.body }); } } },{ text:'Cancelar', handler:function(){ win.destroy(); } }] }); win.show(); }); }Ext.namespace('Ext.provincias'); Ext.provincias.states = [ [0, 'Capital Federal'], [1, 'Buenos Aires'], [2, 'Catamarca'], [3, 'Chaco'], [4, 'Chubut'], [5, 'Córdoba'], [6, 'Corrientes'], [7, 'Entre Ríos'], [8, 'Formosa'], [9, 'Jujuy'], [10, 'La Pampa'], [11, 'La Rioja'], [12, 'Mendoza'], [13, 'Misiones'], [14, 'Neuquén'], [15, 'Río Negro'], [16, 'Salta'], [17, 'San Juan'], [18, 'San Luis'], [19, 'Santa Cruz'], [20, 'Santa Fe'], [21, 'Santiago del Estero'], [22, 'Tierra del Fuego'], [23, 'Tucumán'], [24, 'Otra'] ]; function verSolicitud(idNews){ var conn = new Ext.data.Connection(); conn.request({ url: 'cargarPedido.php', method: 'GET', params: {"idPedido": "1"}, success: function(responseObject) { obj = Ext.util.JSON.decode(responseObject.responseText); Ext.onReady(function(){ var formParrafo = new Ext.FormPanel({ labelAlign: 'top', frame:true, waitMsgTarget: true, style:'color:#000000', bodyStyle:'padding:5px', url:'enviarSolicitudMaterial.php', defaults: {anchor: '94%'}, width: 600, items: [{ xtype:'checkbox', boxLabel : obj.data.campo1, fieldLabel: 'Pedido de Material - Seleccione el material que desea que le enviemos.', name:'campo1', inputValue: obj.data.campo1 },{ xtype:'checkbox', boxLabel : obj.data.campo2, hideLabel: true, name:'campo2', inputValue: obj.data.campo2 },{ xtype:'checkbox', boxLabel : obj.data.campo3, hideLabel: true, name:'campo3', inputValue: obj.data.campo3 },{ xtype:'checkbox', boxLabel : obj.data.campo4, hideLabel: true, name:'campo4', inputValue: obj.data.campo4 },{ xtype:'textfield', fieldLabel: 'Otros', name: 'otros', allowBlank: true },{ xtype:'htmleditor', fieldLabel: 'Comentarios', id:'comentarios', enableFont :false, enableColors: false, enableAlignments: false, enableLinks :false, enableLists :false, enableSourceEdit:false, enableFontSize :false, height:160 }] }); // This just creates a window to wrap the login form. // The login object is passed to the items collection. var win = new Ext.Window({ layout:'fit', buttonAlign: 'center', modal:true, title:'ORGANFUR - Solicitar Material', width:600, height:480, closable: true, resizable: true, plain: true, items: [formParrafo], // All the magic happens after the user clicks the button buttons:[{ text:'Solicitar Material ahora!', formBind: true, // Function that fires when user clicks the button handler:function(){ if ( formParrafo.form.isValid() ) { formParrafo.getForm().submit({ method:'POST', waitTitle:'Solicitar Material', waitMsg:'Enviando solicitud', params : {'idNews':idNews}, success:function(form, action){ Ext.Msg.alert('Solicitar Material', 'Su Solicitud se envió con éxito', function(btn, text){ if (btn == 'ok'){ win.destroy(); } }); }, failure:function(form, action){ if(action.failureType == 'server'){ obj = Ext.util.JSON.decode(action.response.responseText); Ext.Msg.alert('Login Failed!', obj.errors.reason); }else{ Ext.Msg.alert('Warning!', 'Authentication server is unreachable : ' + action.response.responseText); } formParrafo.getForm().reset(); } }); }else{ formParrafo.form.markInvalid([{}]); Ext.Msg.show({ title:'Solicitar Material', msg: 'Por favor complete todos lo campos.', buttons: Ext.Msg.OK, animEl: document.body }); } } },{ text:'Cancelar', handler:function(){ win.destroy(); } }] }); win.show(); }); } }); } var arrMenuId = ["top_sub_menu_01","top_sub_menu_02","top_sub_menu_03", "top_sub_menu_04","top_sub_menu_05","top_sub_menu_06", "top_sub_menu_07","top_sub_menu_08"]; var arrWidth = [123,103,96,157,136,146,82,101]; //["","Vida a Bordo - Azamara Cruises","javascript:abrirVideoCc()","2","8"], var arrSubMenuConfig = [ [ ["","Buscador de cruceros","FindACruise.php","2","1"], ["","Destinos","seccion.php?seccion=destinos&r=2&c=1","2","2"], ["","Nuesta Flota - Royal Caribbean","seccion.php?seccion=flota-royal-caribbean&r=2&c=3","2","3"], ["","Vida a Bordo - Royal Caribbean","javascript:abrirVideoRc()","2","4"], ["","Nuesta Flota - Azamara Cruises","seccion.php?seccion=flota-azamara-cruises&r=2&c=5","2","5"], ["","Vida a Bordo - Azamara Cruises","javascript:abrirVideoAz()","2","4"], ["","Nuesta Flota - Celebrity Cruises","seccion.php?seccion=flota-celebrity-cruises&r=2&c=6","2","6"], ["","Vida a Bordo - Celebrity Cruises","javascript:abrirVideoCc()","2","7"] ], [ ["","CARIBE SIN VISA","promos.php?idPromo=42","3","42"],["","Caribe SIN VISA!","promos.php?idPromo=43","3","43"],["","Caribe Este","promos.php?idPromo=26","3","26"],["","Mediterraneo Este","promos.php?idPromo=40","3","40"],["","Lo mejor de Sudamérica a bordo del Celebriy Infinity!!","promos.php?idPromo=27","3","27"],["","Transcanal y Sudamérica","promos.php?idPromo=45","3","45"],["","Emiratos Arabes","promos.php?idPromo=39","3","39"] ], [ ["","Nuevo Celebrity Silhouetta","noticias.php?idNoticia=4","4","4"],["","All AccessTour ahora disponible en Royal Caribbean","noticias.php?idNoticia=9","4","9"],["","Mas de USD 300 millones de inversiones en Royal Caribbean","noticias.php?idNoticia=10","4","10"],["","CELEBRITY CRUISES AMPLIA CONCEPTO DE PAQUETES A BORDO CON INCLUSION DE RESTAURANTES ESPECIALES","noticias.php?idNoticia=11","4","11"],["","PREMIOS Y RECONOCIMIENTOS PARA AZAMARA CLUB CRUISES","noticias.php?idNoticia=12","4","12"],["","CELEBRITY CRUISES Y MEYER WERFT CELEBRAN INSTALACION DE LA QUILLA DEL CELEBRITY REFLECTION","noticias.php?idNoticia=13","4","13"],["","CELEBRITY CRUISES CREA ALIANZA CON "NERDEL"","noticias.php?idNoticia=14","4","14"],["","NUEVO CHEF PARA CELEBRITY CRUISES","noticias.php?idNoticia=15","4","15"],["","NUEVAS OPCIONES CULINARIAS A BORDO DEL SPLENDOUR OF THE SEAS","noticias.php?idNoticia=22","4","22"],["","CELEBRITY CRUISES INVITA A LOS VACACIONISTAS A DESCANSAR A SU GUSTO CON eXhale","noticias.php?idNoticia=24","4","24"],["","ROYAL CARIBBEAN Y STARBUCKS COFFEE COMPANY INAUGURAN NUEVO ESTABLECIMIENTO A BORDO DEL OASIS OF THE SEAS","noticias.php?idNoticia=23","4","23"],["","El Splendour of the Seas de Royal Caribbean International","noticias.php?idNoticia=20","4","20"] ], [ ["","Royal Caribbean","seccion.php?seccion=preguntas-frecuentes-rc&r=1&c=1","1","1"], ["","Azamara Cruises","seccion.php?seccion=preguntas-frecuentes-az&r=1&c=2","1","2"], ["","Celebrity Cruises","seccion.php?seccion=preguntas-frecuentes-cc&r=1&c=3","1","3"] ], [ ["","Ultimos consejos - Royal Caribbean","seccion.php?seccion=ultimos-consejos&r=5&c=1","5","1"], ["","Check in On-line - Royal Caribbean","https://secure.royalcaribbean-espanol.com/beforeyouboard/boardingDocuments.do;jsessionid=0000q0ynLikdXPyysvZB1QHCzN5:13dljlsvq?cS=NAVBAR","5","2","_blank"], ["","Check in On-line - Azamara Cruises","https://secure.azamaraclubcruises.com/beforeyourcruise/onlineDocumentation/home.do;jsessionid=0000PODITPq6NeALpEjqcb0W5Am:12odfrvug","5","4","_blank"], ["","Check in On-line - Celebrity Cruises","https://secure.celebritycruises.com/beforeyourcruise/onlineDocumentation/home.do;jsessionid=00009AxW-hEO7J2Ml9b7jrS9-Nx:12hdebcnj","5","6","_blank"], ["","Documentación del Viaje","seccion.php?seccion=documentacion&r=5&c=7","5","7"] ], [ ["","Crown & Anchor Society","seccion.php?seccion=Crow-and-Anchor/beneficios&r=6&c=1","6","1"], ["","Captain`s Club","seccion.php?seccion=captains-club&r=6&c=2","6","2"], ["","Le Club Voyage","seccion.php?seccion=le-club-voyage&r=6&c=3","6","3"] ], [ ["","Flight Center","http://www.organfur-flightcenter.com/","7","1","_blank"], ["","Eventos Organfur","http://www.organfur.com.ar/ei/","7","2","_blank"] ], [ ["","Beneficios","contacto.php","7","1"] ] ]; function mapMenuID(menuName) { if(menuName == "top_sub_menu_01") { return "plan_a_cruise"; } if(menuName == "top_sub_menu_02") { return "deals_gifts"; } if(menuName == "top_sub_menu_03") { return "before_you_board"; } if(menuName == "top_sub_menu_04") { return "all_about_cruising"; } if(menuName == "top_sub_menu_05") { return "customer_support"; } if(menuName == "top_sub_menu_06") { return "crown_anchor"; } if(menuName == "top_sub_menu_07") { return "service"; } if(menuName == "top_sub_menu_08") { return "contact"; } } function abrirVideoRc(){ var a=hs.htmlExpand(document.getElementById('videoRc'), { objectType: 'swf', width: 500, objectWidth: 500, objectHeight: 400, maincontentText: 'You need to upgrade your Flash player' } ) } function abrirVideoAz(){ var a=hs.htmlExpand(document.getElementById('videoAz'), { objectType: 'swf', width: 660,height: 393, objectWidth: 660, objectHeight: 363, maincontentText: 'You need to upgrade your Flash player' } ) } function abrirVideoCc(){ var a=hs.htmlExpand(document.getElementById('videoCc'), { objectType: 'swf', width: 500, objectWidth: 500, objectHeight: 400, maincontentText: 'You need to upgrade your Flash player' } ) }