if (!Array.prototype.forEach)
{
  Array.prototype.forEach = function(fun /*, thisp*/)
  {
    var len = this.length;
    if (typeof fun != "function")
      throw new TypeError();

    var thisp = arguments[1];
    for (var i = 0; i < len; i++)
    {
      if (i in this)
        fun.call(thisp, this[i], i, this);
    }
  };
}
var geoFull={headerImageUrl:"",headerImageWidth:0,headerImageHeight:0,headerFontColor:"#000",headerBgColor:"#FFF",subPartner:"Default",now:function(){return +new Date},jsc:0,jsonReq:function(fullUrl,cb){this.fullUrl=fullUrl;this.noCache="&_="+(new Date()).getTime();this.headLoc=document.getElementsByTagName("head").item(0);this.scriptId="geojsonp"+geoFull.jsc++;this.vars=new Object();var jsonp=this.scriptId;window[jsonp]=function(tmp){cb(tmp);window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}}},ajaxChannel:function(){this.rpc=function(call){var request=call.url+"/"+call.request.method;aObj=new geoFull.jsonReq(request,call.callback);aObj.vars=call.request.params;aObj.buildScriptTag();aObj.addScriptTag()}},callbacks:[],jq:null,validateCallback:function(callback){if(typeof callback==="undefined"){throw"Cannot validate callback: undefined"}if(callback&&callback.length<1){throw"Callback missing at least 1 placeholder argument"}return callback},fillArray:function(data,qty){var array=[];for(var i=qty;i>0;i--){array.push(data)}return array},loadScript:function(url,callback){var script=document.createElement("script");script.type="text/javascript";if(typeof script.readyState==="undefined"){script.onload=function(){callback()}}else{script.onreadystatechange=function(){if(script.readyState==="loaded"||script.readyState==="complete"){script.onreadystatechange=null;callback()}}}script.src=url;document.getElementsByTagName("head")[0].appendChild(script);return script},jQ:{isReady:false,isolate:function(){var callback=geoFull.validateCallback(arguments[0]);if(!geoFull.jQ.isReady){return geoFull.callbacks.push(callback)}return callback.apply(this,geoFull.fillArray(geoFull.jq,callback.length))},setup:function(version){if(!document.body){var oldonload=window.onload;if(typeof window.onload!="function"){window.onload=function(){this.setup(version)}}else{window.onload=function(){this.setup(version);if(oldonload!=null&&typeof oldonload=="function"){oldonload()}}}return}var url="http://ajax.googleapis.com/ajax/libs/jquery/"+(version||"1.4.2")+"/jquery.min.js";geoFull.loadScript(url,function(){geoFull.jQ.isReady=true;geoFull.jq=jQuery.noConflict(true);geoFull.callbacks.forEach(geoFull.jQ.isolate);delete (geoFull.callbacks)})}},getPageTitle:function(){var title="";var titles=document.getElementsByTagName("title");if(titles.length>0){title=titles[0].innerHTML}return title},isVarSet:function(variable){return(typeof(window[variable])=="undefined")?false:true},getHostnameFromUrl:function(url){return url.match(/:\/\/(.[^/]+)/)[1]},checkLoaded:function(cb){if(typeof getLinks=="function"){eval(cb+"();");return}setTimeout("geoFull.checkLoaded('"+cb+"')",400)},loadVars:function(){if(this.isVarSet("geo_HeaderImageUrl")){this.headerImageUrl=geo_HeaderImageUrl}if(this.isVarSet("geo_HeaderImageWidth")){this.headerImageWidth=geo_HeaderImageWidth}if(this.isVarSet("geo_HeaderImageHeight")){this.headerImageHeight=geo_HeaderImageHeight}if(this.isVarSet("geo_HeaderBgColor")){this.headerBgColor=geo_HeaderBgColor}if(this.isVarSet("geo_HeaderFontColor")){this.headerFontColor=geo_HeaderFontColor}if(this.isVarSet("geo_SubPartner")){this.subPartner=geo_SubPartner}this.jsc=this.now()},injectCss:function(){var cssCode="#geoJump { display: none; position:absolute; left: 0px; top: 0px; width:100%; height:100%; min-height:100%; min-width:100%; text-align:center; z-index:1000; }\r\n";cssCode+="#geoJumpInner { width:100%; margin: 0px auto; background-color: "+geoFull.headerBgColor+"; border: solid 1px #dedede; padding: 0px; text-align:center; }\r\n";cssCode+=".geoCloseFullAd { text-decoration: underline; font-weight: bold; font-size: 10pt; color:"+geoFull.headerFontColor+"; }\r\n";this.jQ.isolate(function($){$("head").append('<style type="text/css">'+cssCode+"</style>");$("head").append('<script type="text/javascript" src="http://js.geoads.com/json.js"><\/script>');$("head").append('<script type="text/javascript" src="http://js.geoads.com/getLinks.ashx?proxy"><\/script>')})},buildFrames:function(){this.jQ.isolate(function($){$("body").append('<div id="geoJump"><div id="geoJumpInner"></div></div>')})},getViewportHeight:function(){if(window.innerHeight!=window.undefined){return window.innerHeight}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientHeight}if(document.body){return document.body.clientHeight}return window.undefined},getViewportWidth:function(){if(window.innerWidth!=window.undefined){return window.innerWidth}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientWidth}if(document.body){return document.body.clientWidth}return window.undefined},closeFullAd:function(){geoFull.jQ.isolate(function($){$("#geoJump").hide();$("#geoJumpInner").html("")})},doFullAdCb:function(resp){if(resp!=null&&resp.result!=null){if(resp.result.adUrl){var adUrl=resp.result.adUrl;if(adUrl.length>0){geoFull.jQ.isolate(function($){var title=geoFull.getPageTitle();if(!title){title=location.hostname}var width=geoFull.headerImageWidth;var height=geoFull.headerImageHeight;if(geoFull.headerImageHeight>52){var max=geoFull.headerImageHeight;var max2=52;var resizeRatio=max2/max;width=geoFull.headerImageWidth*resizeRatio;height=geoFull.headerImageHeight*resizeRatio}$("#geoJumpInner").html('<table width="100%" height="55px" cellpadding="0" cellspacing="0"><tr><td style="width:200px;"><img border="0" width="'+width+'px" height="'+height+'px" alt="Skip Ad and Continue To: '+title+'" title="Skip Ad and Continue To: '+title+'" style="cursor: pointer; margin:10px 10px 0px;" onclick="geoFull.closeFullAd()" src="'+geoFull.headerImageUrl+'"/></td><td style="text-align:center;"><span class="geoCloseFullAd" style="cursor: pointer;" onclick="geoFull.closeFullAd()">Skip Ad and Continue To: '+title+' &raquo;</span></td></tr></table><div style="clear:both; height:0px; min-height:0px;">&nbsp;</div><div style="width:100%; height: 100%; min-height:600px;"><iframe id="iJump" src="'+adUrl+'" name="iJump" width="100%" frameborder="0"> </iframe></div>');var scTop=parseInt((window.pageYOffset)?(window.pageYOffset):(document.documentElement)?document.documentElement.scrollTop:document.body.scrollTop);var scLeft=parseInt((window.pageXOffset)?(window.pageXOffset):(document.documentElement)?document.documentElement.scrollLeft:document.body.scrollLeft);var el=document.getElementById("geoJump");el.style.top=scTop+"px";el.style.left=scLeft+"px";el.style.width=geoFull.getViewportWidth();el.style.height=geoFull.getViewportHeight();var theFrame=$("#iJump",parent.document.body);theFrame.height($(document.body).height()+10);$("#geoJump").show()})}}}},doFullAd:function(){var s=new getLinks();s.channel=new this.ajaxChannel();s.kwargs=true;s.fullpagead(geo_Partner,this.subPartner,location.href,geoFull.doFullAdCb)},load:function(){var loc=this.getHostnameFromUrl(location.href);var ref=loc;if(document.referrer!=""){ref=this.getHostnameFromUrl(document.referrer)}if(ref===loc){return}this.jQ.setup("1.4.2");this.loadVars();this.injectCss();this.buildFrames();this.checkLoaded("geoFull.doFullAd")}};geoFull.jsonReq.prototype.buildScriptTag=function(){this.scriptObj=document.createElement("script");this.scriptObj.setAttribute("type","text/javascript");this.scriptObj.setAttribute("charset","utf-8");var url=this.fullUrl+"?jsonp="+this.scriptId;for(key in this.vars){url+="&"+key+"="+encodeURIComponent(this.vars[key])}url+=this.noCache;this.scriptObj.setAttribute("src",url);this.scriptObj.setAttribute("id",this.scriptId);var done=false;var head=this.headLoc;this.scriptObj.onload=this.scriptObj.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;this.onload=this.onreadystatechange=null;head.removeChild(this)}}};geoFull.jsonReq.prototype.addScriptTag=function(){this.headLoc.appendChild(this.scriptObj)};geoFull.load();
