var qString = location.search.substring(1), passedSP = ""; if (qString.indexOf("sPage") > -1) {var passedSP = qString.split("&")[0].substring(6,qString.split("&")[0].length);} var d_domain = "http://ad.doubleclick.net/", d_path = (location.pathname).substr(1).split("/").join("_"); d_path = (d_path.split(".")[0]); var d_position = "", d_tile = "1", d_nameValue = ""; var segQS = ""; var d_rsci = segQS.replace(/&/g,";").substring(0, ((16 * 10)+1)); var d_ist = "", adid = "", d_s1 = "",d_s2 = "", d_tripFunc1 = 0, d_tripFunc2 = 0; var subCalled = 0, tabClicked = false; var sponsorsbyids = [], subsponsorsbyids = [], colsponsorsbyids = [], posArray = [], sponArray = []; sponsorsbyids[4]=["sponsor_sechead"]; sponsorsbyids[12]=["sponsor_sechead"]; sponsorsbyids[5]=["sponsor_sechead"]; sponsorsbyids[81]=["sponsor_sechead"]; sponsorsbyids[98]=["sponsor_sechead"]; sponsorsbyids[69]=["sponsor_sechead"]; sponsorsbyids[25]=["sponsor_sechead"]; sponsorsbyids[80]=["sponsor_sechead"];subsponsorsbyids[454]=["sponsor_sechead"];subsponsorsbyids[355]=["sponsor_sechead"];subsponsorsbyids[310]=["sponsor_sechead"];subsponsorsbyids[242]=["sponsor_sechead"];subsponsorsbyids[523]=["sponsor_sechead"];subsponsorsbyids[566]=["sponsor_sechead"];colsponsorsbyids[66]=["col_header"];var sectnotchecked="true"; function get_a(w,h,nv) { var d_qs, d_ist = ""; if(d_tripFunc1 == 0){getDParams();} //if(d_tile == "1")d_ist = "dcopt=ist;"; if(nv == "top" || nv == "topsliver"){ d_ist = "dcopt=ist;"; } d_ist += "comp="+adid+";"; var sTest = getURLParam('test'); if (sTest) { sTest = 'adv=' + sTest + ';'; } d_url = d_domain+"adj"+"\/"+d_sitezone+";"+d_ist+d_nameValue+";s1="+d_s1+";s2="+d_s2+";pos="+nv+";url="+d_path+";fnc=ad;"+d_rsci+";"+sTest+";"+getAdSid()+";sz="+w+"x"+h+";tile="+d_tile+";ord="+ranNum; d_url = d_url.replace(/ /g,'_').replace(/,/g,'_').toLowerCase().replace(/;;/g,';'); document.write("<\/scr"+"ipt>"); d_tile++; d_ist = ""; } function getAdSid(){ var NAME_LENGTH = 9; if(document.cookie){ var asid = "sid=" + getCookieValue("surround"); return asid; } else{ return "" } } function getURLParam(name){ var url=window.location.href; var regex=new RegExp("[\\?&#]"+name+"=([^&#]*)"); var match=regex.exec(url); if (!match) { return ''; } else { return match[1].replace(/[^a-zA-Z0-9]/g, ""); } } function getQString(sMatch){ var query = window.location.search.substring(1); if(query.indexOf(sMatch)!=-1){return true;}else{return false;}; } function getDParams(){ if (passedSP)d_sitezone = passedSP; d_sitezone = unescape(d_sitezone).split(" ").join(""); if(d_sitezone.indexOf(".")!=-1){ if(d_sitezone.split(".")[1].indexOf("/")!=-1){ d_s1=d_sitezone.split(".")[1].split("/")[0]; d_s2=d_sitezone.split(".")[1].replace("/", "___").split("___")[1].replace(/\//g,"_"); } else{ d_s1 = d_sitezone.split(".")[1]; d_s2="null"; } } else{ d_s1 = d_sitezone.split("/")[1]; d_s2 = typeof(d_sitezone.split("/")[2])!="undefined" ? d_sitezone.replace("/", "___").replace("/", "___").split("___")[2].replace(/\//g,"_") : "null" ; } if(d_sitezone.indexOf("/")==(d_sitezone.length-1)) d_sitezone = d_sitezone.substring(0,d_sitezone.length-1); d_sitezone=d_sitezone.replace(/\.\./g,".").replace(/\.\.\./g,".").replace(/\./g,"/"); //remove extra dots, slashes and add slash d_tripFunc1++; } function loadSponsor(){ siteToolSponsored = "F"; if(siteToolSponsored == "T" && pageType != ""){ if(document.getElementsByClassName('tools_container', '*').length){ sponsortools(); } } assignSponsor(); if(typeof(column_id) != "undefined"){assignColumnSponsor();} } function assignSponsor(){ if(typeof(subsponsorsbyids[subsection_id]) != "undefined"){ return activateSponsor(subsponsorsbyids[subsection_id], subsection_id, 0); } if(typeof(sponsorsbyids[section_id]) != "undefined"){ return activateSponsor(sponsorsbyids[section_id], section_id, 0); } } function assignColumnSponsor(){ if(typeof(colsponsorsbyids[column_id]) != "undefined"){ return activateSponsor(colsponsorsbyids[column_id], column_id, 0); } } function activateSponsor(d_sponsor, id, x) { if(typeof(subsection_id)=="undefined"){subsection_id="";} var sponsortext = "", positionparam = ""; // if(section_id == 69 && subsection_id==""){ // sponsortext = "brought to you by"; // } else if(section_id == 69 && subsection_id!=""){ // sponsortext = ""; // } else{ // sponsortext = "sponsored by"; // } if (sponsortext == "") { sponsortext = "sponsored by"; } if (x==10) {return;} if(d_sponsor!="col_header"){ positionparam = "title"; } else{ positionparam = "coltitle"; } //d_domain = d_domain.replace(/./g, '/'); if (document.getElementById(d_sponsor)) { if(d_sponsor =="col_header"){ d_url = d_domain+"adi/"+d_sitezone+";pos="+positionparam+";sec="+section_id+";sub="+subsection_id+";col="+column_id+";url="+d_path+";fnc=ad;sz=88x31;ord="+ranNum; } else{ d_url = d_domain+"adi/"+d_sitezone+";pos="+positionparam+";sec="+section_id+";sub="+subsection_id+";url="+d_path+";fnc=ad;sz=88x31;ord="+ranNum; } d_url = d_url.replace(/ /g,'_').replace(/,/g,'_').toLowerCase(); var objNew = document.createElement('iframe'); objNew.frameBorder="0"; objNew.scrolling="no"; objNew.setAttribute("name",d_sponsor + "Iframe"); objNew.setAttribute("id",d_sponsor + "Iframe"); objNew.setAttribute("src", d_url + "?"); objNew.width = "88px"; objNew.height = "31px"; document.getElementById(d_sponsor).style.display = "inline"; if(d_sponsor!="col_header"){ if (BrowserDetect.browser=='Explorer'&&BrowserDetect.OS=='Windows') { document.getElementById(d_sponsor).innerHTML = sponsortext; document.getElementById(d_sponsor).appendChild(objNew); } else { setTimeout(function(){document.getElementById(d_sponsor).innerHTML = sponsortext;document.getElementById(d_sponsor).appendChild(objNew);}, 300); } } else{ var divNew = document.createElement('div'); divNew.setAttribute("id","sponsor_column"); document.getElementById(d_sponsor).appendChild(divNew); document.getElementById("sponsor_column").innerHTML = sponsortext; document.getElementById("sponsor_column").appendChild(objNew); } } else { setTimeout("activateSponsor('"+d_sponsor+"','"+id+"',"+(i+1)+")",500); } } function sponsortools(){ var stoolcontent = '

Story tools
sponsored by

'; var toolcontainer = document.getElementsByClassName('tools_container', '*'); var toolsdiv1 = document.createElement('div'), toolsdiv2 = document.createElement('div'); toolsdiv1.className = "sponsor sponsor_tools"; toolsdiv2.className = "sponsor sponsor_tools"; toolsdiv1.innerHTML = stoolcontent; toolsdiv2.innerHTML = stoolcontent; toolcontainer[0].appendChild(toolsdiv1); toolcontainer[toolcontainer.length - 1].appendChild(toolsdiv2); } function js_mavenAdCallout(hrefURL, creativeURL, trackingURL) { var oParent = document.getElementById("mvnCoad").parentNode.parentNode; oParent.style.display='block'; var so2 = new SWFObject ('/swf/mvnexternalcoad.swf?hrefURL='+hrefURL+'&creativeURL='+creativeURL,'coad','300','250','7','#ffffff'); so2.write("mvnCoad"); document.getElementById('mvnCoadSpacer').style.display='block'; }