if (typeof(HasRun) == "undefined") var HasRun = 0; else HasRun = HasRun +1; var color_url; var color_text; var color_border; var color_bg; var strADVID = "111"; // 120 x 150 var strPID = "400248"; var lvCAlign; var lvCDLen = 0; var lvNumAds; var lvArea var Surl; if (document.location == top.location) Surl=escape(document.location); else Surl=escape(document.referrer); // determine Ad Alignment based on Width if (250 >= 600) lvCAlign = "H"; else lvCAlign = "V"; // determine amount of ads based on dimensions lvArea = 250 * 300; if (lvArea >= 7200 && lvArea <= 28080) { lvNumAds = 1; if (lvArea <= 7200) lvCDLen = 0; else lvCDLen = 40; } else if (lvArea >= 28080 && lvArea <= 56160){ lvNumAds = 2; lvCDLen = 70; } else if (lvArea >= 56160 && lvArea <= 85000 && 300 < 300){ lvNumAds = 3; lvCDLen = 70; } else if (lvArea >= 70000 && lvArea <= 100000 && 300 >= 280 && 250 <= 485){ lvNumAds = 4; lvCDLen = 70; } //else if (lvArea >= 100000 && lvArea <= 250000 && 250 <= 485 && 250 >= 300){ else if (lvArea >= 100000 && 250 >= 300){ lvNumAds = 5; lvCDLen = 70; } else if (250 == "500" && 300 == "500"){ // special case for 500 x 500 pop-under lvNumAds = 5; lvCDLen = 70; } else if (300 == "600"){ // if the height is 600 then this is a skyscraper ad, alotting 6 ads with 100 height each. lvNumAds = 6; lvCDLen = 70; } if (HasRun <= 0) { if (typeof(contextweb_color_url) == "undefined") color_url = escape("#0033CC"); else color_url = escape(contextweb_color_url); if (typeof(contextweb_color_text) == "undefined") color_text = escape("#000000"); else color_text = escape(contextweb_color_text); if (typeof(contextweb_color_border) == "undefined") color_border= escape("#0033CC"); else color_border= escape(contextweb_color_border); if (typeof(contextweb_color_bg) == "undefined") color_bg= escape("#FFFFFF"); else color_bg= escape(contextweb_color_bg); var Sstr= "http://www1.contextweb.com/xt1/ContextAd.aspx?usgeo=1&Action=VIEWAD&SiteID=&TpltID=2&CAlign=" + lvCAlign + "&CDLen=" + lvCDLen + "&NumAds=" + lvNumAds + "&CBgC="+color_bg+"&CUrlC="+color_url+"&CTextC="+color_text+"&CBorderC="+color_border+"&Width=250&Height=300&PubDef=0&RUN=200&CWFormat=250X300&ADVID=111&PID=400248&bf=0&bpa=0&cwa=2581632417047913281250&CWurl="+Surl; document.writeln(" "); }