Código HTML:
var agt=navigator.userAgent.toLowerCase(); var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion); var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)); var is_nav2 = (is_nav && (is_major == 2)); var is_nav3 = (is_nav && (is_major == 3)); var is_nav4 = (is_nav && (is_major == 4)); var is_nav4up = (is_nav && (is_major >= 4)); var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) ); var is_nav6 = (is_nav && (is_major == 5)); var is_nav6up = (is_nav && (is_major >= 5)); var is_gecko = (agt.indexOf('gecko') != -1); var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); var is_ie3 = (is_ie && (is_major < 4)); var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) ); var is_ie4up = (is_ie && (is_major >= 4)); var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1)); var is_ie5up = (is_ie && !is_ie3 && !is_ie4); var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5); var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) ); var is_ie6up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5); var is_aol = (agt.indexOf("aol") != -1); var is_aol3 = (is_aol && is_ie3); var is_aol4 = (is_aol && is_ie4); var is_aol5 = (agt.indexOf("aol 5") != -1); var is_aol6 = (agt.indexOf("aol 6") != -1); var is_opera = (agt.indexOf("opera") != -1); var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1); var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1); var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1); var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1); var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4); var is_webtv = (agt.indexOf("webtv") != -1); var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); var is_AOLTV = is_TVNavigator; var is_hotjava = (agt.indexOf("hotjava") != -1); var is_hotjava3 = (is_hotjava && (is_major == 3)); var is_hotjava3up = (is_hotjava && (is_major >= 3)); var is_js; if (is_nav2 || is_ie3) is_js = 1.0; else if (is_nav3) is_js = 1.1; else if (is_opera5up) is_js = 1.3; else if (is_opera) is_js = 1.1; else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2; else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3; else if (is_hotjava3up) is_js = 1.4; else if (is_nav6 || is_gecko) is_js = 1.5; else if (is_nav6up) is_js = 1.5; else if (is_ie5up) is_js = 1.3 else is_js = 0.0; <!-- mes_pr = "Preview" mes_cpr = "Close Preview" previewSize = 250; displayPreview=1; var ns6=document.getElementById&&!document.all var ie4=document.all function Maximize(id, sURL){ var preview; preview=new String(document.getElementById("idMax" + id).innerHTML); var i=preview.indexOf("Maximize<"); if(i > 0){ document.getElementById("idFrame" + id).height = 400; document.getElementById("idMax" + id).innerHTML = '<font color=\"#ff0000\">»</font> <a href="javascript:Maximize(' + id + ', \'' + sURL + '\')" class=\"content\">Minimize</a>'; document.getElementById("idFrame" + id).src = sURL; } else{ document.getElementById("idFrame" + id).height = previewSize; document.getElementById("idMax" + id).innerHTML = '<font color=\"#ff0000\">»</font> <a href="javascript:Maximize(' + id + ', \'' + sURL + '\')" class=\"content\">Maximize</a>'; document.getElementById("idFrame" + id).src = sURL; } } function OnPreview(n, sUrl) { var prevID = n; var preview; if(!ns6){ preview=document.getElementById("id" + prevID).innerText; }else{ preview=document.getElementById("id" + prevID).childNodes[0].nodeValue; } var temp = new String(sUrl); var temp = new String(sUrl); if(preview == "Quick View"){ document.getElementById("id" + prevID).innerHTML = "Close Quick View"; document.getElementById("id" + prevID).style.cssText = "COLOR: 'red'; FONT-SIZE: 11px;"; if(!ns6) document.getElementById("idSpan" + prevID).style.visibility = "visible"; document.getElementById("idMax" + prevID).style.visibility = "visible"; document.getElementById("idShow" + prevID).style.display = "block"; document.getElementById("idFrame" + prevID).src = sUrl; } else{ document.getElementById("id" + prevID).innerHTML = "Quick View"; document.getElementById("id" + prevID).style.cssText = "COLOR: 'red'; FONT-SIZE: 11px;"; if(!ns6) document.getElementById("idSpan" + prevID).style.visibility = "hidden"; document.getElementById("idMax" + prevID).style.visibility = "hidden"; document.getElementById("idShow" + prevID).style.display = "none"; document.getElementById("idFrame" + prevID).src = ""; } } function ppreview(url, id) { var ti = url.replace(/'/g, '\\\''); ti = ti.replace(/<b>/g, ''); ti = ti.replace(/<\/b>/g, ''); if(is_nav4 == false) document.write(" <A class=\"content\" href=\""+url+"\" id=id"+id+" onClick=\"OnPreview("+id+",'"+ti+"');return false\">Quick View</A>"); } function potherfunctions(url, id, title) { var ti = title.replace(/'/g, '\\\''); ti = ti.replace(/<b>/g, ''); ti = ti.replace(/<\/b>/g, ''); if(is_nav4 == false) { document.write("<span id=\"idMax"+id+"\" STYLE=\"visibility:hidden\"><font color=\"#ff0000\">»</font> <a href=\""+url+"\" onClick=\"javascript:Maximize("+id+",'"+url+"');return false\" class=\"content\">Maximize</a></span> "); if(!ns6) document.write("<span id=\"idSpan"+id+"\" STYLE=\"visibility:hidden\"><font color=\"#ff0000\">»</font> <a href=\""+url+"\" onClick=\"javascript:window.external.AddFavorite('"+url+"','"+ti+"');return false\" class=\"content\">Bookmark</a></span>"); document.write("<div id=\"idShow"+id+"\" STYLE=\"display:none\"><iframe ID=\"idFrame"+id+"\" HEIGHT=\"250\" SRC WIDTH=\"90%\"></iframe></div>"); } }