String.prototype.trim = function() {return this.replace(/^\s+|\s+$/g,'');} var imgs_lang="/artworks/es"; var lang="/artworks/es"; var DIR=""; var DIR_MONSTER_EDITOR=""; var STYLESID="gateuruguay2012comuy"; var imgs="/artworks"; var url_tobookmark="GATEuruguay "; var id_idioma=1 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) return "?dmp=1"; 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 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,comp,toto) { if (typeof comp == "undefined") comp="Buscar"; if (obj.value==comp) obj.value=""; buscador_tocado=true; } function clear_input(o,l) { if (o.value==l) {o.value='';} } function check_form_registro(form) { var aux="Dirección de correo incorrecta o 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 o 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"); } function cerrarcargando() { var o = getObj("ly_cargando_dinamico"); if (o==null) {return;} 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 validar_login(formulario,msg) { if (formulario.usuario.value == '' || formulario.clave.value == '') { DHTMLALERT(msg); formulario.usuario.focus(); return false; return true; } } function lista_de_precios() { abrirVentana("/productos/listadeprecios.php", 800, 600, "listap") } function validar_recomendar(form) { if (form.minombre.value == '') {DHTMLALERT('Ingrese su nombre'); form.minombre.focus(); return false;} if (form.tunombre.value == '') {DHTMLALERT('Ingrese el Nombre de su amigo'); form.tunombre.focus(); return false;} if (form.miemail.value.indexOf('@') < 0 || form.miemail.value.indexOf('.') < 0 || form.miemail.value.indexOf(',') > 0) {DHTMLALERT('Ingrese su e-mail'); form.miemail.focus(); return false;} if (form.tuemail.value.indexOf('@') < 0 || form.tuemail.value.indexOf('.') < 0 || form.tuemail.value.indexOf(',') > 0) {DHTMLALERT('Ingrese el e-mail de su amigo'); form.tuemail.focus(); return false;} return true; } var last_video=0; function video(id,t) { var url="/videos/get_video.php?id="+id+"&t="+t; if (last_video>0) close_player(last_video); last_video=id; crear_script_tag(url); } function set_player(flv,id) { var o=getObj("ly_player"+id); if (o==null) {return;} o.innerHTML=flv; showAndCenter("ly_player_container"+id); var ly_transparente = getObj("ly_transparente"); if (ly_transparente != null) { ly_transparente.style.display=""; ly_transparente.style.width="100%"; ly_transparente.style.height=getPageSize()[1]+'px'; } } function close_player(id) { var o=getObj("ly_player"+id); if (o!=null) o.innerHTML=""; if (getObj("ly_player_container"+id)!=null) getObj("ly_player_container"+id).style.display="none"; var ly_transparente = getObj("ly_transparente"); if (ly_transparente != null) { ly_transparente.style.display="none"; } } function startvideos() {} var ahora = 1185; function updateClock() { ahora++; if (ahora>(24*60*60)) ahora=0; var horas=parseInt(ahora/(60*60)); var resto=ahora-(horas*(60*60)); var minutos=parseInt(resto/(60)); var segundos=resto-(minutos*60); minutos = ( minutos < 10 ? "0" : "" ) + minutos; segundos = ( segundos < 10 ? "0" : "" ) + segundos; horas = ( horas < 10 ? "0" : "" ) + horas; getObj("hora").innerHTML = horas + ":" + minutos + ":" + segundos + " hs."; } function send_to_fav(id_objeto,tipo_objeto_favorito) { var url="/usuarios/scripts/agregar_a_favoritos.php?id_objeto="+id_objeto+"&tipo_objeto="+tipo_objeto_favorito; crear_script_tag(url,"fav"); } function remove_from_fav(id_fav) { if (window.confirm("Remover este ítem de mis favoritos.")) { var url="/usuarios/scripts/remove_favoritos.php?id_fav="+id_fav; crear_script_tag(url,"fav"); } } function $$asp( objId ) { var o = document.getElementById( objId ); if ( o == null ) return; var nobj = document.createElement("INPUT"); var nombre_hidden = o.name + "_hidden_asp"; var keyup_on = true; nobj.id = nombre_hidden; nobj.name = nombre_hidden; nobj.type = "hidden"; // o.hidden_asp = nobj; o.form.appendChild( nobj ); o.onkeyup = function ( e ) { if (!keyup_on) return; try { var t; if ( window.event && window.event.srcElement ) t = window.event.srcElement; else t = e.target; nobj.value = this.value; //this.hidden_asp.value = this.value; } catch(err) { keyup_on = false; alert( "err="+err); var o2 = document.getElementById( nombre_hidden ); if (o2 != null ) o.form.removeChild( o2 ); } }; } function cambiar_src(id,img){ var o=getObj("prodzoom"+id); if ( o!=null && o.src.indexOf("")!=-1 ) o.src=img; } function disable_autocomplete() { var forms = document.getElementsByTagName("form"); for (var i=0;iAcceder ahora !"); } var timer_refresh_timer=0; function refresh_session() { if (timer_refresh_timer!=0) clearInterval(timer_refresh_timer); crear_script_tag("/usuarios/scripts/refresh_timer.php"); }function writeflash(o,m,w,h,wm,p,oid) { //alert(wm); var p=unescape(p); var obj = document.getElementById(o); if (obj==null){ alert(o+' MISSING'); return; } if (oid!=null && oid!=undefined) {tag_name="NAME='"+oid+"'";} else {tag_name="";} if (oid!=null && oid!=undefined) {oid="id='"+oid+"'";} else {oid="";} f=""; f+=""; f+=""; if (p!="") {f+="";} f+=""; f+=""; f+=" document.body.offsetHeight){ xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } if(xScroll < windowWidth){ pageWidth = windowWidth; } else { pageWidth = xScroll; } arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) return arrayPageSize; } function recomendar_web() { var ly_transparente=getObj("ly_transparente"); var obj=getObj("recomendar"); if (obj.style.display=="") { obj.style.display="none"; ly_transparente.style.display="none"; } else { obj.style.display=""; ly_transparente.style.display=""; showAndCenter('recomendar'); getObj("form_recomendar").minombre.focus(); } }function set_tab_new(obj) { var obj_id = obj.id; var prefijo="container_"; var obj_class = obj.className; var vec_tab_names = obj_id.split("_"); if (vec_tab_names.length<=1) { alert("Nombre Tag Inválido falta prefijo _#"); return; } vec_tab_names.pop(); var tab_name = vec_tab_names.join("_"); obj_class = obj_class.split("_off").join(""); obj_class = obj_class.split("_on").join(""); var i=1; var tab_actual=null; var no_flag=false; while ( tab_actual != null || !no_flag) { tab_actual=getObj(tab_name+"_"+i); container_actual=getObj(prefijo+tab_name+"_"+i); if (tab_actual==null || container_actual==null) break; tab_actual.className="off"; container_actual.style.display="none"; i++; no_flag = true; } tab_actual=getObj(obj_id); container_actual=getObj(prefijo+obj_id); tab_actual.className="active"; container_actual.style.display=""; }var autoexpandiendo=false; function init_cats() { var pdiv,phref; for (var i=0;i= 1.3 ? 0 : 1 }; $scrollTo.window = function( scope ){ return $(window)._scrollable(); }; $.fn._scrollable = function(){ return this.map(function(){ var elem = this, isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1; if( !isWin ) return elem; var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem; return $.browser.safari || doc.compatMode == 'BackCompat' ? doc.body : doc.documentElement; }); }; $.fn.scrollTo = function( target, duration, settings ){ if( typeof duration == 'object' ){ settings = duration; duration = 0; } if( typeof settings == 'function' ) settings = { onAfter:settings }; if( target == 'max' ) target = 9e9; settings = $.extend( {}, $scrollTo.defaults, settings ); duration = duration || settings.speed || settings.duration; settings.queue = settings.queue && settings.axis.length > 1; if( settings.queue ) duration /= 2; settings.offset = both( settings.offset ); settings.over = both( settings.over ); return this._scrollable().each(function(){ var elem = this, $elem = $(elem), targ = target, toff, attr = {}, win = $elem.is('html,body'); switch( typeof targ ){ case 'number': case 'string': if( /^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ) ){ targ = both( targ ); break; } targ = $(targ,this); case 'object': if( targ.is || targ.style ) toff = (targ = $(targ)).offset(); } $.each( settings.axis.split(''), function( i, axis ){ var Pos = axis == 'x' ? 'Left' : 'Top', pos = Pos.toLowerCase(), key = 'scroll' + Pos, old = elem[key], max = $scrollTo.max(elem, axis); if( toff ){ attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] ); if( settings.margin ){ attr[key] -= parseInt(targ.css('margin'+Pos)) || 0; attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0; } attr[key] += settings.offset[pos] || 0; if( settings.over[pos] ) attr[key] += targ[axis=='x'?'width':'height']() * settings.over[pos]; }else{ var val = targ[pos]; attr[key] = val.slice && val.slice(-1) == '%' ? parseFloat(val) / 100 * max : val; } if( /^\d+$/.test(attr[key]) ) attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max ); if( !i && settings.queue ){ if( old != attr[key] ) animate( settings.onAfterFirst ); delete attr[key]; } }); animate( settings.onAfter ); function animate( callback ){ $elem.animate( attr, duration, settings.easing, callback && function(){ callback.call(this, target, settings); }); }; }).end(); }; $scrollTo.max = function( elem, axis ){ var Dim = axis == 'x' ? 'Width' : 'Height', scroll = 'scroll'+Dim; if( !$(elem).is('html,body') ) return elem[scroll] - $(elem)[Dim.toLowerCase()](); var size = 'client' + Dim, html = elem.ownerDocument.documentElement, body = elem.ownerDocument.body; return Math.max( html[scroll], body[scroll] ) - Math.min( html[size] , body[size] ); }; function both( val ){ return typeof val == 'object' ? val : { top:val, left:val }; }; })( jQuery )