String.prototype.trim = function() {return this.replace(/^\s+|\s+$/g,'');} var imgs_lang="/artworks/es"; var lang="/artworks/es"; var DIR=""; var imgs="/artworks"; var url_tobookmark="ICONICA"; var id_idioma=1 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=="onload" || prop=="onmouseover" || prop=="onmouseout" || prop=="onclick" || typeof val=="function") { if (obj.id=="fotogal") { } 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", 1024, 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;i1) { aux=aux[1].split("&"); n=""; for (var i=0;i 0) { DHTMLALERT(mensaje); obj_focus=form.email; return false; } if (valor!=confirm_email) {DHTMLALERT(mensaje_extra);obj_focus=form.email;return false;} } else { if (valor=="") {DHTMLALERT(mensaje);obj_focus=eval("form."+campo);return false;} } } var chk_terminos_y_condiciones=getObj("chk_terminos_y_condiciones"); if (chk_terminos_y_condiciones!=null) { if (!chk_terminos_y_condiciones.checked) { DHTMLALERT("Debes aceptar los términos y condiciones."); obj_focus=chk_terminos_y_condiciones; return false; } } /*PARCHE ICONICA*/ if (form.id=="frmregistro") { opais=getObj("id_pais"); if (opais!=null) { if (opais.value==858) { select_zona(opais); id_zona=getObj("id_pais"); if (id_zona==null || id_zona=="") { DHTMLALERT("Seleccione departamento/zona por favor"); getObj("cmb_categorias").focus(); return false; } } } } var o=getObj("btn_submit"); if (o!=null) {o.disabled=true;} return true; } var buscador_tocado=false; function validar_buscador(form) { if (!buscador_tocado) { DHTMLALERT("Por favor, Ingrese un texto válido a buscar"); return false; } var o=form.buscar.value; if (o.length<3) { DHTMLALERT("Por favor, Ingrese un texto válido a buscar"); return false; } return true; } function limpiar_buscador(obj) { if (obj.value=="Buscar") obj.value=""; buscador_tocado=true; } function clear_input(o,l) { if (o.value==l) {o.value='';} } function clear_input(o,l) { if (o.value==l) {o.value='';} } function check_form_registro_home(form) { var aux="Dirección de correo incorrecta ó E-mail no válido. Los E-mails no coinciden.".split("|"); if (form.tiny_email.value.indexOf('@') < 0 || form.tiny_email.value.indexOf('.') < 0 || form.tiny_email.value.indexOf(',') > 0) { DHTMLALERT(aux[0]); form.tiny_email.focus();return false;} return true; } function validar_olvidemiclave(form) { var aux="Dirección de correo incorrecta ó E-mail no válido. Los E-mails no coinciden.".split("|"); if (form.olvideemail.value.indexOf('@') < 0 || form.olvideemail.value.indexOf('.') < 0 || form.email.value.indexOf(',') > 0) { DHTMLALERT(aux[0]); form.olvideemail.focus(); return false;} return true; } function mostrarcargando() { var o = getObj("ly_cargando_dinamico"); showAndCenter("ly_cargando_dinamico"); o=getObj("ly_transparente"); o.style.display=""; o.style.width=getPageSize()[0]; o.style.height=getPageSize()[1]; } function cerrarcargando() { var o = getObj("ly_cargando_dinamico"); if (o==null) {return;} o.style.display="none"; o=getObj("ly_transparente"); o.style.display="none"; } function crear_script_tag(file,tagname) { var head_html = document.getElementsByTagName('head'); if (head_html==null) head_html=document; else head_html=head_html[0]; if (tagname==undefined) tagname="jscript_gen"; scriptTag = getObj(tagname); if(scriptTag!=null) { head_html.removeChild(scriptTag); delete(scriptTag); scriptTag=null; } var script = document.createElement('script'); var vch="?"; if (file.indexOf("?")!=-1) vch="&"; script.src = file+vch+Math.random()*1000000; script.type = "text/javascript"; script.id = tagname; head_html.appendChild(script); } function unc_datos(id_obj) { obj=getObj("olvidemisdatos"); if(obj==null) {return;} if (obj.style.display=="") { obj.style.display="none"; } else { obj.style.display=""; obj=getObj("olvideemail"); if (obj!=null) {obj.focus();} } } function lista_de_precios() { abrirVentana("/productos/listadeprecios.php", 800, 600, "listap") } function validar_recomendar(form) { if (form.miemail.value.indexOf('@') < 0 || form.miemail.value.indexOf('.') < 0 || form.miemail.value.indexOf(',') > 0) { DHTMLALERT('Indique su email'); form.miemail.focus(); return false; } if (form.minombre.value == '') { DHTMLALERT('Indique su nombre'); form.minombre.focus(); return false; } if (form.tunombre.value == '') { DHTMLALERT('Indique el nombre de la persona a quien nos recomienda'); form.tunombre.focus(); return false; } if (form.tuemail.value.indexOf('@') < 0 || form.tuemail.value.indexOf('.') < 0 || form.tuemail.value.indexOf(',') > 0) { DHTMLALERT('Indique el email de la persona a quien nos recomienda'); form.tuemail.focus(); return false; } return true; }