var Url={encode:function(a){return escape(this._utf8_encode(a))},decode:function(a){return this._utf8_decode(unescape(a))},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");var b="";for(var n=0;n<a.length;n++){var c=a.charCodeAt(n);if(c<128){b+=String.fromCharCode(c)}else if((c>127)&&(c<2048)){b+=String.fromCharCode((c>>6)|192);b+=String.fromCharCode((c&63)|128)}else{b+=String.fromCharCode((c>>12)|224);b+=String.fromCharCode(((c>>6)&63)|128);b+=String.fromCharCode((c&63)|128)}}return b},_utf8_decode:function(a){var b="";var i=0;var c=0;var d=0;var e=0;var f=0;while(i<a.length){c=a.charCodeAt(i);if(c<128){b+=String.fromCharCode(c);i++}else if((c>191)&&(c<224)){e=a.charCodeAt(i+1);b+=String.fromCharCode(((c&31)<<6)|(e&63));i+=2}else{e=a.charCodeAt(i+1);f=a.charCodeAt(i+2);b+=String.fromCharCode(((c&15)<<12)|((e&63)<<6)|(f&63));i+=3}}return b}};function generateCode(){var a;if(parseFloat(document.dplitefrm.mwidth.value)<204){a=parseFloat(document.dplitefrm.mheight.value)+165}else{a=parseFloat(document.dplitefrm.mheight.value)+115}var b='<iframe name="dplite" frameborder="0" width="'+document.dplitefrm.mwidth.value+'" height="'+a+'" scrolling="no" src="http://www.dishpointer.com/servlet/dplite.php?showmap='+document.dplitefrm.showmap.checked+'&showsatlist='+document.dplitefrm.showsatlist.checked+'&showinfo='+document.dplitefrm.showinfo.checked+'&bgcol='+document.dplitefrm.bgcol.value+'&width='+document.dplitefrm.mwidth.value+'&height='+document.dplitefrm.mheight.value+'&defaddress='+Url.encode(document.dplitefrm.defaddress.value)+'&txtsize='+document.dplitefrm.txtsize.value+'&txtcol='+document.dplitefrm.txtcol.value+'&language='+document.dplitefrm.language.options[document.dplitefrm.language.selectedIndex].value+'&satellite='+document.dplitefrm.satellite.options[document.dplitefrm.satellite.selectedIndex].id+'"></iframe><div><a href="http://www.dishpointer.com">Dish alignment with Dishpointer</a></div>';document.getElementById("htmlcode").value=b;document.getElementById("preview").innerHTML=b}var win=null;function NewWindow(a,b,w,h,c,d){var e;var f;if(d==="center"){e=(screen.width)?(screen.width-w)/2:100;f=(screen.height)?(screen.height-h)/2:100}var g='width='+w+', height='+h+',top='+f+',left='+e+',scrollbars='+c+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';win=window.open(a,b,g)}function toggle(a){if(document.getElementById(a).style.display==="none"){document.getElementById(a).style.display="block"}else{document.getElementById(a).style.display="none"}}var tooltip=function(){var f='tt';var g=3;var j=3;var k=300;var m=10;var n=20;var o=95;var p=0;var q,t,c,b,h;var r=document.all?true:false;return{show:function(v,w){if(q==null){q=document.createElement('div');q.setAttribute('id',f);t=document.createElement('div');t.setAttribute('id',f+'top');c=document.createElement('div');c.setAttribute('id',f+'cont');b=document.createElement('div');b.setAttribute('id',f+'bot');q.appendChild(t);q.appendChild(c);q.appendChild(b);document.body.appendChild(q);q.style.opacity=0;q.style.filter='alpha(opacity=0)';document.onmousemove=this.pos}q.style.display='block';c.innerHTML=v;q.style.width=w?w+'px':'auto';if(!w&&r){t.style.display='none';b.style.display='none';q.style.width=q.offsetWidth;t.style.display='block';b.style.display='block'}if(q.offsetWidth>k){q.style.width=k+'px'}h=parseInt(q.offsetHeight)+g;clearInterval(q.timer);q.timer=setInterval(function(){tooltip.fade(1)},n)},pos:function(e){var u=r?event.clientY+document.documentElement.scrollTop:e.pageY;var l=r?event.clientX+document.documentElement.scrollLeft:e.pageX;q.style.top=(u-h)+'px';q.style.left=(l+j)+'px'},fade:function(d){var a=p;if((a!=o&&d==1)||(a!=0&&d==-1)){var i=m;if(o-a<m&&d==1){i=o-a}else if(p<m&&d==-1){i=a}p=a+(i*d);q.style.opacity=p*.01;q.style.filter='alpha(opacity='+p+')'}else{clearInterval(q.timer);if(d==-1){q.style.display='none'}}},hide:function(){clearInterval(q.timer);q.timer=setInterval(function(){tooltip.fade(-1)},n)}}}();