function changeStyle(obj,style) { obj.className=style; } function Browser() { var ua, s, i; this.isIE = false; this.isNS = false; this.version = null; ua = navigator.userAgent; s = "MSIE"; if ((i = ua.indexOf(s)) >= 0) { this.isIE = true; this.version = parseFloat(ua.substr(i + s.length)); return; } s = "Netscape6/"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true; this.version = parseFloat(ua.substr(i + s.length)); return; } // Treat any other "Gecko" browser as NS 6.1. s = "Gecko"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true; this.version = 6.1; return; } } function findPosX(obj) { var curleft = 0; if(obj.offsetParent) while(1) { curleft += obj.offsetLeft; if(!obj.offsetParent) break; obj = obj.offsetParent; } else if(obj.x) curleft += obj.x; return curleft; } function findPosY(obj) { var curtop = 0; if(obj.offsetParent) while(1) { curtop += obj.offsetTop; if(!obj.offsetParent) break; obj = obj.offsetParent; } else if(obj.y) curtop += obj.y; return curtop; } function getX(obj){ return obj.offsetLeft + (obj.offsetParent ? getX(obj.offsetParent) : obj.x ? obj.x : 0); } function getY(obj){ return (obj.offsetParent ? obj.offsetTop + getY(obj.offsetParent) : obj.y ? obj.y : 0); } function openUrl(url) { if (url.indexOf('http://')!=0) { document.location.href='/turespondestudecides'+url; } else { // it's an external url (let's open it in a new window) openWindow(url); } } function URLencode(sStr) { return escape(sStr) .replace(/\+/g, '%2B') .replace(/\"/g,'%22') .replace(/\'/g, '%27'); } function openWindow(url) { var name="window_popup"; var wtmp=window.open(url,name,'status=yes,scrollbars=yes,toolbar=yes,location=yes,resizable=yes'); if (wtmp) { wtmp.focus(); } } function openWindowVideo(url) { var name="video_popup"; var w=640, h=480; var t=(screen.height/2 - 240); var l=(screen.width/2 - 320); var wtmp=window.open(url,name,'top='+t+',left='+l+',width='+w+',height='+h+',status=no,scrollbars=no,toolbar=no,location=no,resizable=no'); if (wtmp) { wtmp.focus(); } } function openVideo(video) { } function notaLegal() { var url="nota_legal.html"; var name="legal"; var w=750, h=225; var t=(screen.height/2 - 115); var l=(screen.width/2 - 375); var wtmp=window.open(url,name,'top='+t+',left='+l+',width='+w+',height='+h+',status=no,scrollbars=yes,toolbar=no,location=no,resizable=no'); if (wtmp) { wtmp.focus(); } } function alert1(x) { alert(acentos(x)); } function confirm1(x) { confirm(acentos(x)); } function acentos(x) { return x; }