function abrirVentana(url, width, height, name) { if (name==null) {name='nueva_ventana';} var str = "height=" + height + ",innerHeight=" + height; str += ",width=" + width + ",innerWidth=" + width; if (window.screen) { var ah = screen.availHeight - 30; var aw = screen.availWidth - 10; var xc = (aw - width) / 2; var yc = (ah - height) / 2; str += ",left=" + xc + ",screenX=" + xc; str += ",top=" + yc + ",screenY=" + yc; } str += ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no"; objwin=window.open(url, name, str); objwin.focus(); } function getObj(id) {if (document.getElementById) {return document.getElementById(id)} else if (document.all) {return document.all[id]} else {return document.all[id]}} function setget_attr(obj, prop, val) { if (!val) return obj.getAttribute(prop); else { if (prop=="onmouseover" || prop=="onmouseout" || prop=="onclick" || typeof val=="function") { if (BrowserDetect.browser=="Explorer") val = Function(val); } obj.setAttribute(prop,val); } } function rnd(max) { var x = Math.random() * max; x = x + 1; return parseInt(x); } function goprint(url) { abrirVentana(getUrlPrint(location.href)+"&imprimir=ok", 999, 600, "_imprimir") } function getUrlPrint(url) { var aux=url.split("?"); var dir=aux[0]; if (aux.length>1) { aux=aux[1].split("&"); n=""; for (var i=0;i 0) { alert('Dirección de correo incorrecta o email no válido.Los emails no coinciden.'); form.email.focus(); return false; } return true; } function validar_recomendar(form) { if (form.miemail.value.indexOf('@') < 0 || form.miemail.value.indexOf('.') < 0 || form.miemail.value.indexOf(',') > 0) { DHTMLALERT('Por favor, indique su dirección de email'); form.miemail.focus(); return false; } if (form.minombre.value == '') { DHTMLALERT('Por favor, indique su nombre'); form.minombre.focus(); return false; } if (form.tunombre.value == '') { DHTMLALERT('Por favor, indique el nombre de su amigo'); form.tunombre.focus(); return false; } if (form.tuemail.value.indexOf('@') < 0 || form.tuemail.value.indexOf('.') < 0 || form.tuemail.value.indexOf(',') > 0) { DHTMLALERT('Por favor, indique la dirección de email de su amigo'); form.tuemail.focus(); return false; } return true;} var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i 0) { DHTMLALERT(mensaje); form.email.focus(); return false; } if (valor!=confirm_email) {DHTMLALERT(mensaje_extra);form.email.focus();return false;} } else { if (valor=="") {DHTMLALERT(mensaje);eval("form."+campo+".focus()");return false;} } } var o=getObj("btn_submit"); if (o!=null) {o.disabled=true;} return true; } function validar_form_update(form) { var campo,mensaje,valor; for (var i=0;i 0) { DHTMLALERT(mensaje); form.email.focus(); return false; } } else { if (valor=="") {DHTMLALERT(mensaje);eval("form."+campo+".focus()");return false;} } } return true; } function updown_carrito(despl,id,limit) { if (limit==null) {limit=0;} var objcant=getObj("cantidad_"+id); if (isNaN(objcant.value)) {objcant.value=1;return;} var cant=objcant.value; cant=parseInt(cant)+despl; if (cant 0) { DHTMLALERT(aux[0]); form.tiny_email.focus(); return false; } if (form.tiny_nombres.value=="" || form.tiny_nombres.value=="Nombre") {DHTMLALERT('Por favor, ingrese su nombre.');return false;} return true; } function hide_testimonio() { var ly_transparente=getObj("ly_transparente"); ly_transparente.style.display="none"; force_hide('ly_testimonio_form'); } function validar_recomendar_usuarios(form) { if (form.nombres.value=="") {DHTMLALERT("Por favor, ingrese su nombre.");form.nombres.focus();return false;} if (form.apellidos.value=="") {DHTMLALERT("Por favor, ingrese su apellido.");form.apellidos.focus();return false;} m="Dirección de correo incorrecta o email no válido.Los emails no coinciden.".split("|"); if (form.email.value.indexOf('@') < 0 || form.email.value.indexOf('.') < 0 || form.email.value.indexOf(',') > 0) { DHTMLALERT(m[0]); form.email.focus(); return false; } if (form.id_pais.value=="") {DHTMLALERT("Por favor, seleccione su país.");form.id_pais.focus();return false;} if (form.texto.value=="") {DHTMLALERT("Por favor, indique el mensaje.");form.texto.focus();return false;} var o=getObj("btnsubmit_rec2"); o.disabled=true; return true; } var imgs_resumenejecutivo=Array(); function mostrar_resumen(i) { var ly,td,o,lc,imagen; for(o=1;o<=max_resumen;o++) { lc=getObj("div_cargando2"+o); ly=getObj("ly_cont"+o); td=getObj("td_destacado"+o); sp=getObj("span_img_resumenejecutivo"+o); if (o==i) { ly.style.display=""; td.className="reje_item_active"; if (sp.innerHTML=="") { imagen=""; lc.style.display=""; sp.innerHTML=imagen; } } else { lc.style.display="none"; ly.style.display="none"; td.className=""; } } } function hide_cargando2(i) { var lc=getObj("div_cargando2"+i); lc.style.display="none"; }