if(PROXY_PREFIX==undefined){var subdomain="";if(document.domain.indexOf("twit")>=0){subdomain="www."}var PROXY_PREFIX="http://"+subdomain+document.domain+"/#url="}function isIE(){return/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent)}var is_IE=isIE();if(is_IE){window.oldtop=window.top;var oldtop=window.oldtop}if(is_IE&&window.top==window){var url=window.location.href;if(url.indexOf("http://proxy."+document.domain)>=0){url=url.replace("http://proxy.","http://")}else{if(url.indexOf("."+document.domain+"/")){url=url.replace("."+document.domain,"")}}window.location.href=PROXY_PREFIX+url}function topGetter(a){if(!a){a=window.oldtop}if(PROXY_PREFIX&&a.location.href.indexOf(PROXY_PREFIX)>=0){return a.document.getElementById("content-frame").contentWindow}else{return window}}function parentGetter(a){if(!a){a=window.oldparent}if(PROXY_PREFIX&&a.location.href.indexOf(PROXY_PREFIX)>=0){return a.document.getElementById("content-frame").contentWindow}else{return window}}var sbwind=new Object();if(!is_IE){if(window.__lookupGetter__&&window.__lookupGetter__("top")){window.__defineGetter__("oldtop",window.__lookupGetter__("top"));window.__defineGetter__("oldparent",window.__lookupGetter__("parent"));window.__defineGetter__("top",topGetter);window.__defineGetter__("parent",parentGetter);window.__defineGetter__("self",topGetter)}else{window.oldtop=window.top;window.top=topGetter();window.self=window.top;window.oldparent=window.parent;window.parent=parentGetter()}}else{for(o in window){if(o=="top"){sbwind[o]=topGetter(window.top)}else{if(o=="parent"){sbwind[o]=parentGetter(window.parent)}else{sbwind[o]=window[o]}}}sbwind.self=sbwind.top}function SB(){this.host=document.domain;this.get_domain=function(a){if(a==undefined){return a}var c;var b=a.replace("http://","").replace("https://","");if(b.indexOf("/")>0){c=b.slice(0,b.indexOf("/"))}else{c=b}return c};this.get_document=function(){return document};this.refresh=function(){for(tag in sb.proxy_elements){sb.proxy_elements[tag]=0}};this.proxy_elements={a:0,iframe:0,form:0};this.media_elements={script:0,img:0,link:0,object:0};this.attrs={a:"href",img:"src",iframe:"href",form:"action",link:"href",script:"src",object:"data"};this.proxyAll=function(){for(tag in sb.proxy_elements){var a=sb.get_document().getElementsByTagName(tag);for(i=0;i<a.length;i++){sb.proxifyElement(a[i],sb.attrs[tag],tag)}}};this.errorProof=function(b,a){this.addEventListener(b,"error",function(){this.el=b;this.removeEventListener("error",arguments.callee,false);sb.proxifyElement(this.el,a)})};this.errorProofMore=function(){for(tag in sb.media_elements){var b=sb.get_document().getElementsByTagName(tag);if(sb.media_elements[tag]==undefined){sb.media_elements[tag]=0}var a=sb.media_elements[tag];if(b.length>a){for(i=a;i<b.length;i++){sb.errorProof(b[i],sb.attrs[tag])}sb.media_elements[tag]=b.length}}};this.proxyMore=function(){for(tag in sb.proxy_elements){var b=sb.get_document().getElementsByTagName(tag);if(sb.proxy_elements[tag]==undefined){sb.proxy_elements[tag]=0}var a=sb.proxy_elements[tag];if(b.length>a){for(i=a;i<b.length;i++){sb.proxifyElement(b[i],sb.attrs[tag],tag)}sb.proxy_elements[tag]=b.length}}};this.onload=function(){clearInterval(sb.proxyInterval);setTimeout("sb.proxyMore();",100)};this.deproxify=function(a){if(a){if(a.indexOf("http://proxy."+sb.host)>=0){a=a.replace("http://proxy.","http://")}else{if(a.indexOf("."+sb.host+"/")){a=a.replace("."+sb.host,"")}}return a}else{return""}};this.proxify=function(b,a){if(a&&!is_IE&&PROXY_PREFIX){return this.proxifyNoext(b)}if(!b){return""}b=this.deproxify(b);var c=sb.get_domain(b);if(c==undefined){return""}if(c.indexOf(sb.host)>=0){if(c.indexOf("proxy")==0){return b}else{return b.replace(sb.host,"proxy."+sb.host)}}return b.replace(c,c+"."+sb.host)};this.proxifyNoext=function(a){if(!a){return""}if(PROXY_PREFIX&&a.indexOf(PROXY_PREFIX)!=0){a=PROXY_PREFIX+sb.deproxify(a)}return a};this.getAttribute=function(b,a){if(a=="href"&&!is_IE){b.target="_top";return b.href}return b.getAttribute(a)};this.proxifyElement=function(c,b,a){if(a=="a"&&!is_IE){c.target="_top"}c.setAttribute(b,this.proxify(c[b],b=="href"))};this.addEventListener=function(a,c,d){try{if(window.addEventListener){a.addEventListener(c,d,false);return true}else{if(window.attachEvent){a.attachEvent("on"+c,d);return true}else{return false}}}catch(b){return false}}}if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var newOpen=function(e,c,d,a,b){if(c.charAt(0)=="/"){c=document.location.protocol+"//"+sb.get_domain(document.location.href)+c}else{if(c.indexOf("http")==0){c=sb.proxify(c)}else{c=document.location.protocol+"//"+sb.get_domain(document.location.href)+document.location.pathname.substr(0,document.location.pathname.lastIndexOf("/"))+"/"+c}}this.oldOpen(e,c,d,a,b)};if(XMLHttpRequest.prototype){XMLHttpRequest.prototype.uniqueID=function(){if(!this.uniqueIDMemo){this.uniqueIDMemo=Math.floor(Math.random()*1000)}return this.uniqueIDMemo};XMLHttpRequest.prototype.oldOpen=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=newOpen}var sb=new SB();sb.refresh();sb.proxyMore();sb.proxyInterval=setInterval("sb.proxyMore();",30);sb.errorProofMore();sb.errorProofInterval=setInterval("sb.errorProofMore();",50);sb.addEventListener(window,"load",SB.onload,false);$=window.oldtop&&window.oldtop.$;if($){oldtop.Sbrowse.frames.Content.onstart(window.location.href,document.title);$(document).ready(function(){oldtop.Sbrowse.frames.Content.onready(window.location.href)})};