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="mercomext2012"; var imgs="/artworks"; var url_tobookmark="MERCOMEXT - comercio exterior"; 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 = 25184; 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"+titles[el.id][0]+"");if(titles[el.id][imgInc[el.id]]) $('#ft-title-'+el.id).css('opacity',opts[el.id].titleOpacity);else $('#ft-title-'+el.id).css('opacity',0);if(params.navigation){$.navigation(el);$('#ft-buttons-'+el.id).children().first().addClass('ft-button-'+el.id+'-active');} odd=1;for(j=1;j0){tstripWidth=stripWidth+1;gap--;}else{tstripWidth=stripWidth;} if(params.links) $('#'+el.id).append("");else $('#'+el.id).append("
");$("#ft-"+el.id+j).css({'background-position':-stripLeft+'px top','left':stripLeft});stripLeft+=tstripWidth;if(params.position=='bottom') $("#ft-"+el.id+j).css('bottom',0);if(j%2==0&¶ms.position=='alternate') $("#ft-"+el.id+j).css('bottom',0);if(params.direction=='fountain'||params.direction=='fountainAlternate'){order[el.id][j-1]=parseInt(params.strips/2)-(parseInt(j/2)*odd);order[el.id][params.strips-1]=params.strips;odd*=-1;}else{order[el.id][j-1]=j;}} $('.ft-'+el.id).mouseover(function(){opts[el.id].pause=true;});$('.ft-'+el.id).mouseout(function(){opts[el.id].pause=false;});$('#ft-title-'+el.id).mouseover(function(){opts[el.id].pause=true;});$('#ft-title-'+el.id).mouseout(function(){opts[el.id].pause=false;});clearInterval(imgInt[el.id]);imgInt[el.id]=setInterval(function(){$.transition(el)},params.delay+params.stripDelay*params.strips);};$.transition=function(el,direction){if(opts[el.id].pause==true)return;stripInt[el.id]=setInterval(function(){$.strips(order[el.id][inc[el.id]],el)},opts[el.id].stripDelay);$('#'+el.id).css({'background-image':'url('+img[el.id][imgInc[el.id]]+')'});if(typeof(direction)=="undefined") imgInc[el.id]++;else if(direction=='prev') imgInc[el.id]--;else imgInc[el.id]=direction;if(imgInc[el.id]==img[el.id].length){imgInc[el.id]=0;} if(imgInc[el.id]==-1){imgInc[el.id]=img[el.id].length-1;} if(titles[el.id][imgInc[el.id]]!=''){$('#ft-title-'+el.id).animate({opacity:0},opts[el.id].titleSpeed,function(){$(this).html(titles[el.id][imgInc[el.id]]).animate({opacity:opts[el.id].titleOpacity},opts[el.id].titleSpeed);});}else{$('#ft-title-'+el.id).animate({opacity:0},opts[el.id].titleSpeed);} inc[el.id]=0;buttons=$('#ft-buttons-'+el.id).children();buttons.each(function(index){if(index==imgInc[el.id]){$(this).addClass('ft-button-'+el.id+'-active');}else{$(this).removeClass('ft-button-'+el.id+'-active');}});if(opts[el.id].direction=='random') $.fisherYates(order[el.id]);if((opts[el.id].direction=='right'&&order[el.id][0]==1)||opts[el.id].direction=='alternate'||opts[el.id].direction=='fountainAlternate') order[el.id].reverse();};$.strips=function(itemId,el){temp=opts[el.id].strips;if(inc[el.id]==temp){clearInterval(stripInt[el.id]);return;} $('.ft-'+el.id).attr('href',links[el.id][imgInc[el.id]]);if(opts[el.id].position=='curtain'){currWidth=$('#ft-'+el.id+itemId).width();$('#ft-'+el.id+itemId).css({width:0,opacity:0,'background-image':'url('+img[el.id][imgInc[el.id]]+')'});$('#ft-'+el.id+itemId).animate({width:currWidth,opacity:1},1000);}else{$('#ft-'+el.id+itemId).css({height:0,opacity:0,'background-image':'url('+img[el.id][imgInc[el.id]]+')'});$('#ft-'+el.id+itemId).animate({height:opts[el.id].height,opacity:1},1000);} inc[el.id]++;};$.navigation=function(el){$('#'+el.id).append("
");$('#'+el.id).append("
");$('#ft-prev-'+el.id).click(function(e){e.preventDefault();$.transition(el,'prev');clearInterval(imgInt[el.id]);imgInt[el.id]=setInterval(function(){$.transition(el)},params.delay+params.stripDelay*params.strips);});$('#ft-next-'+el.id).click(function(e){e.preventDefault();$.transition(el);clearInterval(imgInt[el.id]);imgInt[el.id]=setInterval(function(){$.transition(el)},params.delay+params.stripDelay*params.strips);});$("
").insertAfter($('#'+el.id));$('#ft-buttons-'+el.id);for(k=1;k"+k+"");} $('.ft-button-'+el.id);$.each($('.ft-button-'+el.id),function(i,item){$(item).click(function(e){e.preventDefault();$.transition(el,i);clearInterval(imgInt[el.id]);imgInt[el.id]=setInterval(function(){$.transition(el)},params.delay+params.stripDelay*params.strips);})});} $.fisherYates=function(arr){var i=arr.length;if(i==0)return false;while(--i){var j=Math.floor(Math.random()*(i+1));var tempi=arr[i];var tempj=arr[j];arr[i]=tempj;arr[j]=tempi;}} this.each(function(){init(this);});};$.fn.jqFancyTransitions.defaults={width:500,height:332,strips:13,delay:5000,stripDelay:50,titleOpacity:0.7,titleSpeed:1000,position:'alternate',direction:'fountainAlternate',effect:'',navigation:false,links:false};})(jQuery);(function( $ ){ var $scrollTo = $.scrollTo = function( target, duration, settings ){ $(window).scrollTo( target, duration, settings ); }; $scrollTo.defaults = { axis:'xy', duration: parseFloat($.fn.jquery) >= 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 )