if(typeof abanMain=="undefined"){abanMain={};if(Math.random()>=.5)abanMain.url="http://adserver.adtechus.com/adiframe|3.0|5206|1296808|0|225|ADTECH;key=";else abanMain.url="http://adserver.adtechus.com/adiframe|3.0|5206|1365489|0|225|ADTECH;key=";abanMain.useKeyword=true;abanMain.keyword=document.getElementsByName("q")[0].value;abanMain.cc="US";abanMain.width="748px";abanMain.height=110;abanMain.refreshNum=5;abanMain.refreshTimeout=0;abanMain.refreshTimeoutCc=Array({cc:"US",refreshTimeout:60},{cc:"BR,IN",refreshTimeout:180});abanMain.divId="abanMainDiv";abanMain.frameId="abanMainFrm";abanMain.blockingElementId="aaIntersObjDiv";abanMain.parseIntPx=function(a){a=a.toLowerCase();if(a=="top")return 0;var d=a.search(/[^0-9.]/);if(d<0)return parseInt(a);var b=a.substring(0,d);if(b=="0")return 0;var c=a.substring(d);if(c=="px")return parseInt(b);b=parseFloat(b);if(c=="em")return Math.round(b*16);if(c=="pt")return Math.round(b*1.3333333);return null};abanMain.getStyle=function(c,a){var b="";if(document.defaultView&&document.defaultView.getComputedStyle)b=document.defaultView.getComputedStyle(c,"").getPropertyValue(a);else if(c.currentStyle){a=a.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()});b=c.currentStyle[a]}return b};abanMain.fixupBodyStyle=function(){var b=abanMain.getStyle(document.body,"background-image");if(!b||b.indexOf("url")<0)return;var a=abanMain.getStyle(document.body,"background-position-y");if(a){a=abanMain.parseIntPx(a);if(a==null)return;document.body.style.backgroundPositionY=a+abanMain.bottom+"px";return}a=abanMain.getStyle(document.body,"background-position");if(!a)return;a=a.split(" ");if(a.lenght<2)return;a[1]=abanMain.parseIntPx(a[1]);if(a[1]==null)return;a[1]=a[1]+abanMain.bottom+"px";document.body.style.backgroundPosition=a.join(" ")};abanMain.fixupElement=function(b){if(b.fixedStyle)return;var a=abanMain.getStyle(b,"margin-top");if(a.indexOf("px")>=0&&a!="0px")return;a=abanMain.getStyle(b,"top");a=abanMain.parseIntPx(a);if(a==null)return;b.style.top=a+abanMain.bottom+"px";b.fixedStyle="1"};abanMain.fixupElements=function(g,e){for(var f=g.childNodes,d=0;d<f.length;++d){var a=f[d];if(a.nodeType!=1)continue;var b=e,c=abanMain.getStyle(a,"position");if(c=="relative")b=true;else if(c=="absolute"){!e&&abanMain.fixupElement(a);b=true}else c=="fixed"&&abanMain.fixupElement(a);abanMain.fixupElements(a,b)}};abanMain.fixupStyles=function(){abanMain.bottom=abanMain.height+abanMain.parseIntPx(abanMain.getStyle(document.body,"margin-top"));abanMain.fixupElements(document.body,false);abanMain.fixupBodyStyle()};abanMain.refreshElements=function(){var b=abanMain.getStyle(document.body,"margin"),a=abanMain.parseIntPx(b);if(a==null)a=0;a+=1;document.body.style.margin=a+"px";var c='document.body.style.margin = "'+b+'";';setTimeout(c,1e3)};abanMain.refresh=function(){var a=document.getElementById(abanMain.frameId);a.src=a.src;abanMain.refreshNum--;abanMain.refreshNum>0&&setTimeout("abanMain.refresh()",abanMain.refreshTimeout*1e3)};abanMain.shiftDown=function(){var b=document.getElementById(abanMain.frameId),a=abanMain.parseIntPx(b.height);if(a<abanMain.height){a+=10;if(a>abanMain.height)a=abanMain.height;var c=document.getElementById(abanMain.divId);c.style.height=b.height=b.style.height=a+"px";setTimeout("abanMain.shiftDown()",20);return}try{abanMain.refreshElements()}catch(d){}abanMain.refreshTimeout&&abanMain.refreshNum>0&&setTimeout("abanMain.refresh()",abanMain.refreshTimeout*1e3)};abanMain.loaded=false;abanMain.onLoad=function(){if(abanMain.loaded)return;if(abanMain.blockingElementId&&document.getElementById(abanMain.blockingElementId)){setTimeout("abanMain.onLoad()",500);return}abanMain.loaded=true;try{abanMain.fixupStyles()}catch(a){}abanMain.shiftDown()};abanMain.prepareKeyword=function(a){a=unescape(a);a=a.replace(/\W+/gi,"+");return a};abanMain.init=function(){for(var a=0;a<abanMain.refreshTimeoutCc.length;++a){var b=abanMain.refreshTimeoutCc[a];if(b.cc.indexOf(abanMain.cc)>=0){abanMain.refreshTimeout=b.refreshTimeout;break}}};abanMain.show=function(){if(document.getElementById(abanMain.frameId)!=null)return false;abanMain.init();var a=document.createElement("div");a.id=abanMain.divId;a.style.display="block";a.style.position="relative";a.style.padding="0";a.style.margin="0";a.style.top="0";a.style.left="0";a.style.height="0px";a.style.width="100%";a.style.zIndex="99999";a.style.background="transparent";a.style.textAlign="center";var b=abanMain.url;if(this.useKeyword)b+=abanMain.prepareKeyword(abanMain.keyword);a.innerHTML='<iframe id="'+abanMain.frameId+'" height="0" width="'+abanMain.width+'" padding="0" margin="0" frameborder="0" scrolling="no" allowtransparency="true" style="border:none;overflow:hidden;margin:0;padding:0;height:0;width:'+abanMain.width+'" src="'+b+'" onload="abanMain.onLoad();"></iframe>';var c=document.body,d=c.firstChild;c.insertBefore(a,d)};abanMain.show()}
