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 = "400669"; var strWebRoot = "http://www5.contextweb.com/xt2/"; var strHintsOn = ""; var intNumAdsReserved = "0"; var strHintsOnDB = ""; var strKeyword = ""; var strChannel = "PubDefined"; var lvCAlign; var lvCDLen = 0; var lvNumAds = 1; var lvArea var SFormat = "500X300"; SFormat = SFormat.toUpperCase(); if (intNumAdsReserved == ""){ intNumAdsReserved = 0; } var Surl; var dflt_img; var dflt_url; if (strHintsOn == "") { strHintsOn = strHintsOnDB; var straKeywords = new Array (); var straChannels = new Array (); var i = Math.floor( Math.random() * straKeywords.length ); if ( straKeywords.Length != 0 ) { strKeyword = straKeywords[i]; strChannel = straChannels[i]; } } if (SFormat == "120X600"){ dflt_img = "http://www4.contextweb.com/images/120x600.gif"; dflt_url = "http://www4.contextweb.com/images/120x600.asp"; } if (SFormat == "160X600"){ dflt_img = "http://www4.contextweb.com/images/160x600.gif"; dflt_url = "http://www4.contextweb.com/images/160x600.asp"; } if (SFormat == "300X250"){ dflt_img = "http://www4.contextweb.com/images/300x250.gif"; dflt_url = "http://www4.contextweb.com/images/300x250.asp"; } if (SFormat == "728X90"){ dflt_img = "http://www4.contextweb.com/images/728x90.gif"; dflt_url = "http://www4.contextweb.com/images/728x90.asp"; } Surl = escape(""); if (Surl == ""){ if (document.location == top.location) Surl=escape(document.location); else Surl=escape(document.referrer); } if (strWebRoot == "") { strWebRoot = "http://www5.contextweb.com/xt2/"; } // determine Ad Alignment based on Width if (500 >= 600 && 500 != 700) lvCAlign = "H"; else lvCAlign = "V"; if (500 <= 120 || SFormat == "650X200" || SFormat == "154X66" || SFormat == "468X120" ||SFormat == "240X90" || SFormat == "125X125" || SFormat == "215X106" || SFormat == "120X600"){ lvCAlign = "NB"; } if (SFormat == "635X165" || SFormat == "292X18" || SFormat == "120X60"){ lvCAlign = "NCB"; } if (SFormat == "720X300"){ lvCAlign = "V"; } // determine amount of ads based on dimensions lvArea = 500 * 300; if (lvArea >= 7200 && lvArea <= 28079) { lvNumAds = 1; lvCDLen = 0; if (lvArea == 21600) lvCDLen = 70; if (lvArea == 15625) lvCDLen = 45; if (lvArea == 22790) lvCDLen = 55; } else if (lvArea >= 28080 && lvArea <= 56160){ lvNumAds = 2; lvCDLen = 70; if (lvArea == 28080){ lvCAlign = "H"; lvCDLen = 0; } } else if (lvArea >= 56160 && lvArea <= 85000 && 300 < 300){ lvNumAds = 3; lvCDLen = 60; } else if (lvArea >= 70000 && lvArea <= 100000 && 300 >= 280 && 500 <= 485){ lvNumAds = 4; lvCDLen = 70; } else if (lvArea >= 100000 && 500 >= 300){ lvNumAds = 5; lvCDLen = 70; } else if (500 == "500" && 300 == "500"){ // special case for 500 x 500 pop-under lvNumAds = 5; lvCDLen = 70; } if (300 == "600"){ lvNumAds = 6; lvCDLen = 70; if (lvArea == 72000){ lvCDLen = 45; } } if (strPID == 402327){ lvNumAds = 3; lvCDLen = 245; } if (strPID == "401078"){ lvCDLen = 70; Surl = unescape(Surl); posSemi = Surl.indexOf(";jsessionid"); posQues = Surl.indexOf("?"); Surl1 = Surl.substring(0,posSemi) if (posSemi != -1){ if (posQues != -1) { Surl2 = Surl.substring(posQues,Surl.length); Surl = Surl1 + Surl2; } else Surl = Surl1; } if (window.RegExp) { var re = new RegExp("_requestid=[^&]*", "g"); Surl = Surl.replace(re,''); } Surl = escape(Surl); } if (strPID == "400281"){ lvNumAds = 5; lvCDLen = 150; } if (strPID == "402505" || strPID == "402497" || strPID == "402507" || strPID == "402506" || strPID == "402505" || strPID == "402514"){ if (lvArea == 96000){ lvNumAds = 5; } } if (strPID == "402222"){ lvCDLen = 150; if (SFormat == "160X700"){ lvNumAds = 3; } else if (SFormat == "430X500"){ lvNumAds = 5; } } if (typeof(contextweb_color_url) == "undefined") color_url = escape("#66CCFF"); 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("#66CCFF"); 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 qNumAds = ""; if (qNumAds != ""){ lvNumAds = qNumAds; } if (SFormat == "RSS"){ lvCAlign = "R"; lvCDLen = "80"; SFormat = "468X60"; } lvNumAds = lvNumAds - intNumAdsReserved; var strRand = Math.floor( Math.random() * 1000000 ); var iRun = 200; var Sstr= strWebRoot + "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=500&Height=300&PubDef=0&RUN=200&CWFormat=500X300&ADVID=111&PID=400669&bf=1&HintsOn="+strHintsOn+"&Kw="+escape(strKeyword)+"&chnl="+escape(strChannel)+"&cwa=8731632680444249635651&fechp=100&cach=240&svrl=1,-1,1|2,-1,1|3,-1,1|11,-1,1|6,-1,1|5,-1,1|7,-1,1&clku=&clkt=&CWurl="+Surl; document.writeln(""); if (strPID == 402071){ document.writeln(""); } document.writeln("");