var hr_pid,hr_channel,hr_third_party_tracker,hr_width,hr_height,hr_default_category,hr_color_border,hr_color_bg,hr_color_title,hr_font_title,hr_font_text;var hr_site_width,hr_site_position,hr_top_position,hr_horizontal_position,hr_floating,hr_emptyspace_class;var hra_variables=Array("hr_site_width","hr_site_position","hr_top_position","hr_fixed_position","hr_horizontal_position","hr_emptyspace_class");$highresad={"browser":navigator.userAgent.toLowerCase(),"IE":0,"IE6":0,"lTIE6":0,"SAFARI":0,"FF":0,"OPERA":0,"settings":{},"timeID":false,"ad":"","contentClasses":["content","main"],"adClosed":false,"cookieName":'hr_highresad',"hra_path":'http://www.highresads.com/api/',"_":function(var_name,def){return(typeof(window[var_name])=="undefined")?def:window[var_name]},"get_browser_info":function(){var temp,version,browser;browser=navigator.userAgent.toLowerCase();if(browser.indexOf("msie")!=-1){this.IE=1;temp=navigator.appVersion.split("MSIE");version=parseFloat(temp[1]);if(version<7){if(version<6){this.lTIE6=1}else{this.IE6=1}}}else if(browser.indexOf("safari")!=-1){this.SAFARI=1}else if(browser.indexOf("opera")!=-1){this.OPERA=1}else if(browser.indexOf("firefox")!=-1){this.FF=1}if(browser.indexOf("win98")!=-1){this.win98=1}},"attach_css":function(){var head=document.getElementsByTagName("head")[0];var flyCss=document.createElement("link");flyCss.media="all";flyCss.type="text/css";flyCss.rel="stylesheet";flyCss.href=this.hra_path+"/highresads.css";head.appendChild(flyCss);if(typeof(hr_alternateCss)!="undefined"&&hr_alternateCss){var altCss=document.createElement("link");altCss.media="all";altCss.type="text/css";altCss.rel="stylesheet";altCss.href=hr_alternateCss;head.appendChild(altCss)}},"append_func":function(old,append){return function(e){if(typeof(old)=="function"){old(e)}append(e)}},"attach_events":function(){var w,t;w=window;t=this;w.onresize=t.append_func(w.onresize,t.reload_ad);if(t.settings.floating){w.onscroll=t.append_func(w.onscroll,t.float_ad)}},"float_ad":function(){},"move_ad":function(){var t=$highresad;var start=t.startPosition;var end=t.endPosition;var i=start>end?-1:1;var step=2;var el=document.getElementById('highresad');var currTop=parseInt(el.style.top);if(i>0&&currTop>=end){clearInterval(t.timeID);el.style.top=end+'px';return true}if(i<0&&currTop<=end){clearInterval(t.timeID);el.style.top=end+'px';return true}var dynamicStep=i>0?Math.floor((end-currTop)/10):Math.floor((currTop-end)/10);var newstep=dynamicStep>step?dynamicStep:step;el.style.top=(currTop+newstep*i)+'px';if(!t.timeID)t.timeID=setInterval(t.move_ad,10)},"getScrollY":function(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft}return scrOfY},"get_top_position":function(){if(typeof(this.settings.top)!="undefined"){return this.settings.top}var _=this._;var user_class=_("hr_emptyspace_class","notdefined");if(!user_class){return _("hr_top_position",5)}var classes=this.contentClasses;var obj=false;if(user_class!="notdefined"){classes=[user_class]}for(var i=0;i<classes.length;i++){if(document.getElementById(classes[i])){obj=document.getElementById(classes[i]);break}}if(!obj){for(var i=0;i<classes.length;i++){var objs=getElementsByClassName(classes[i],"div",document,false,true);if(objs.length>0){obj=objs[0];break}}}if(!obj){for(var i=0;i<classes.length;i++){var objs=getElementsByClassName(classes[i],"div",document,false,false);if(objs.length>0){obj=objs[0];break}}}if(obj){return findPosY(obj)}else{return _("hr_top_position",5)}},"init_settings":function(){var _=this._;var s={"top":_("hr_top_position",20),"unit_width":_("hr_width",160),"unit_height":_("hr_height",600),"horizontal_position":_("hr_horizontal_position","right"),"floating":_("hr_floating",true),"site_width":_("hr_site_width",800),"site_position":_("hr_site_position","center"),"body_width":this.getBodyWidth(),"screen_width":window.screen.width};this.settings=s},"getBodyWidth":function(){var w;if(document.documentElement.clientWidth){w=document.documentElement.clientWidth}else{w=document.body.scrollWidth}return w},"close_ad":function(c){var areYouSure=true;if(areYouSure){this.ad.parentNode.removeChild(this.ad);this.adClosed=true}},"create_ad":function(){var s=this.settings;var div=document.createElement('div');div.style.width=s.unit_width+"px";div.id="highresad";div.style.height=s.unit_height+"px";div.style.display="none";var fieldStyle=s.unit_width>120?'':'style="margin-right:0; width:75px;"';var adhtml='';adhtml+='<b class="hra-cor1">&nbsp;</b><b class="hra-cor2">&nbsp;</b>';adhtml+='<div id="hra-h">';adhtml+='<a href="javascript:$highresad.close_ad();" id="hra-close" title="Close">Close</a>';adhtml+='<a href="http://www.highresads.com" id="hra-logo" target="_top" title="HighResAds.com">HighResAds.com</a><span id="hra-title"><a href="http://www.highresads.com">HighResAds.com</a></span>';adhtml+='</div>';adhtml+='<div id="hra-c" style="height:'+s.unit_height+'px; display:block;">'+this.create_ad_iframe()+'</div>';adhtml+='<b class="hra-cor2">&nbsp;</b><b class="hra-cor1">&nbsp;</b>';div.innerHTML=adhtml;if(!s.top){return div}div.style.top=s.top+"px";return div},"create_ad_iframe":function(query){var adservehtml;adservehtml='<iframe width="120" height="600" scrolling="no" frameborder="0" allowtransparency="true" hspace="0" vspace="0" marginheight="0" marginwidth="0" src="'+this.hra_path+'adserve.php?pub='+window.hr_pid+'&channel='+window.hr_channel+'" />';return adservehtml},"append_ad":function(){var s=this.settings;var b=document.getElementsByTagName('body');if(b.length){b=b[0]}else{b=document.body}if(!s.top){var ad=this.create_ad();ad.style.display='block';var ad_content=false;if(document.getElementById(hr_emptyspace_class)){ad_content=document.getElementById(hr_emptyspace_class)}else{ad_content=getElementsByClassName(hr_emptyspace_class,"div",document,false,false)[0]}if(ad_content){ad_content.innerHTML='';ad_content.appendChild(ad)}return true}var displayBlock=false;if(s.site_position=="center"){displayBlock=(s.body_width-s.site_width)/2>=s.unit_width+10}else{displayBlock=s.body_width>=s.site_width+s.unit_width+10}if(s.site_position=="center"){var side_space=((s.body_width-s.site_width)/2-s.unit_width)/2}else{var side_space=(s.body_width-s.site_width-s.unit_width)/2}var side_position=side_space>5?side_space:5;if(displayBlock){if(this.ad==""){var ad=this.create_ad();this.ad=ad;b.insertBefore(ad,b.firstChild)}}if(this.ad!=""){if(s.horizontal_position=="right"){this.ad.style.right=side_position+"px"}else{this.ad.style.left=side_position+"px"}this.ad.style.display=displayBlock?"block":"none"}},"reload_ad":function(){if($highresad.adClosed)return;$highresad.init_settings();$highresad.append_ad()},"pre_init":function(){this.attach_css();this.get_browser_info();this.init_settings();this.append_ad();this.attach_events()}};var highresads_all_variables=[];function dq(s){return(s!=null)?'"'+s+'"':'""'}function hr_au(p,v,k){if(v){window.hr_ad_url+='&'+p+'='+v;if(k)highresads_all_variables[k]=v}}function hr_aue(p,v,k){if(v){hr_au(p,escape(v),k)}}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 getElementsByClassName(strClass,strTag,objContElm,fullMatch,useIDinstead){useIDinstead=useIDinstead||false;fullMatch=fullMatch||false;strTag=strTag||"*";var retNodes=[];var class_regex=fullMatch?new RegExp("\\b"+strClass+"\\b","i"):new RegExp(strClass,"i");var parent=objContElm||document;var elems=parent.getElementsByTagName(strTag);for(var i=0;i<elems.length;i++){var matched=!useIDinstead?class_regex.test(elems[i].className):class_regex.test(elems[i].id);if(matched){retNodes.push(elems[i]);return retNodes}}return retNodes}Array.prototype.push=function(value){this[this.length]=value};$highresad.pre_init();