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 = "401127"; var strWebRoot = "http://www5.contextweb.com/xt2/"; var strHintsOn = ""; var strChannel = "PubDefined"; var lvCAlign; var lvCDLen = 0; var lvNumAds = 1; var lvArea var SFormat = "160X600"; var strDefLevel = "8,7"; var Surl; var dflt_img; var dflt_url; if (SFormat == "120X600"){ dflt_img = "http://www4.contextweb.com/images/120x600.gif"; dflt_url = "http://www.matrixdirect.com"; } if (SFormat == "160X600"){ dflt_img = "http://www4.contextweb.com/images/160x600.gif"; dflt_url = "http://www.matrixdirect.com"; } if (SFormat == "300X250"){ dflt_img = "http://www4.contextweb.com/images/300x250.gif"; dflt_url = "http://www.printpal.com"; } if (SFormat == "728X90"){ dflt_img = "http://www4.contextweb.com/images/728x90.gif"; dflt_url = "http://www.circuitcity.com"; } 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 (160 >= 600 && 160 != 700) lvCAlign = "H"; else lvCAlign = "V"; // determine amount of ads based on dimensions lvArea = 160 * 600; 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 && 600 < 300){ lvNumAds = 3; lvCDLen = 70; } else if (lvArea >= 70000 && lvArea <= 100000 && 600 >= 280 && 160 <= 485){ lvNumAds = 4; lvCDLen = 70; } //else if (lvArea >= 100000 && lvArea <= 250000 && 160 <= 485 && 160 >= 300){ else if (lvArea >= 100000 && 160 >= 300){ lvNumAds = 5; lvCDLen = 70; } else if (160 == "500" && 600 == "500"){ // special case for 500 x 500 pop-under lvNumAds = 5; lvCDLen = 70; } if (600 == "600"){ lvNumAds = 6; lvCDLen = 70; } if (strPID == "401078"){ var aCh = new Array ("parenting & family","home & decoration","shopping","style & fashion","food & drink"); var iCh = Math.floor( Math.random() * aCh.length ); lvNumAds = 5; lvCDLen = 55; 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 == "400072"){ strHintsOn = "true"; strChannel = "online+games"; } if (strPID == "400281"){ lvNumAds = 5; lvCDLen = 150; } 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 qNumAds = ""; if (qNumAds != ""){ lvNumAds = qNumAds; } if (SFormat == "RSS"){ lvCAlign = "R"; lvCDLen = "80"; SFormat = "468X60"; } 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=160&Height=600&PubDef=1&RUN=200&CWFormat=160X600&ADVID=111&PID=401127&bf=1&bpa=1&HintsOn="+strHintsOn+"&Kw="+strChannel+"&chnl="+strChannel+"&cwa=1431632577919610000000&fechp=100&cach=240&svrl=[SAdRule]&DefLev="+strDefLevel+"&CWurl="+Surl; document.writeln(""); if (strPID == 402071){ document.writeln(""); } document.writeln("");