TSCM.ads.sponsorName="";TSCM.cfg.customAdSponsor="";TSCM.cfg.SponsorIndexLink="";registerNS("TSCM.ads.Slider");TSCM.ads.adXMLFileToUse="ad.xml";TSCM.ads.setXMLFileToUse=function(a){if(YAHOO.lang.isString(a)){TSCM.ads.adXMLFileToUse=a}};TSCM.ads.getAdXML={init:function(b){TSCM.ads.sponsorName=b;var f={success:TSCM.ads.getAdXML.drawAd,failure:this.handleAdXMLfailure,scope:this,argument:null};function c(h,g){var i=document.createElement("link");i.href=h;i.rel="stylesheet";g.appendChild(i)}c(TSCM.cfg.staticFilePath+"/ads/css/customAdVideo.css",document.body);c(TSCM.cfg.staticFilePath+"/ads/customAdUnits/"+TSCM.ads.sponsorName+"/cau.css",document.body);function e(g){TSCM.cfg.customAdSponsor=g;TSCM.cfg.SponsorIndexLink=function(){if(TSCM.cfg.customAdSponsor==="put-storytype-here"){document.location=TSCM.cfg.contextRoot+"/sponsor-section/"+TSCM.cfg.customAdSponsor+"/index.html"}else{if(TSCM.cfg.customAdSponsor==="business-news-update"){document.location=TSCM.cfg.contextRoot+"/sponsor-section/"+TSCM.cfg.customAdSponsor+"/index.html"}else{if(TSCM.cfg.customAdSponsor==="technology-update"){document.location=TSCM.cfg.contextRoot+"/sponsor/"+TSCM.cfg.customAdSponsor+"/index.html"}else{document.location=TSCM.cfg.contextRoot+"/sponsor/"+TSCM.cfg.customAdSponsor+"/index.html?partner="+TSCM.cfg.customAdSponsor}}}}}e(TSCM.ads.sponsorName);var a=TSCM.cfg.staticFilePath+"/ads/customAdUnits/"+TSCM.ads.sponsorName+"/"+TSCM.ads.adXMLFileToUse;var d=YAHOO.util.Connect.asyncRequest("GET",a,f)},drawAd:function(d){var c=YAHOO.util.Dom.get("customUnit");c.innerHTML=d.responseText;if(TSCM.ads.sponsorName==="put-storytype-here"){var b=TSCM.cfg.contextRoot+"/sponsor-section/"+TSCM.ads.sponsorName+"/ad.ajaxaction?callbackfunction=renderHeadlines"}else{if(TSCM.ads.sponsorName==="business-news-update"){var b=TSCM.cfg.contextRoot+"/sponsor-section/"+TSCM.ads.sponsorName+"/ad.ajaxaction?callbackfunction=renderHeadlines"}else{var b=TSCM.cfg.contextRoot+"/sponsor/"+TSCM.ads.sponsorName+"/ad.ajaxaction?callbackfunction=renderHeadlines"}}var a=document.createElement("script");a.src=b;a.type="text/javascript";document.body.appendChild(a)},handleAdXMLfailure:function(){}};TSCM.ads.placeQuiz=function(a){YAHOO.util.Dom.get(a.flashDiv).title="quiz";var b=new SWFObject(a.swfPath,"quiz",a.width,a.height,a.flashVersion,a.bgColor);b.addParam("wmode",a.wmode);b.addVariable("xmlFile",a.xmlPath);b.write(a.flashDiv)};YAHOO.util.Event.onAvailable("adImg",function(){var b=document.getElementById("adImg");var a=b.src;b.src=a+Math.floor(Math.random()*10000000000)});TSCM.ads.placePoll=function(b){YAHOO.util.Dom.get(b.flashDiv).title="poll";var a=b.questions.length-1;var c=Math.floor(Math.random()*a);var d=b.questions[c];var e=new SWFObject(b.swfPath,"poll",b.width,b.height,b.flashVersion,b.bgColor);e.addParam("align","middle");e.addParam("quality","high");e.addParam("menu","false");e.addParam("allowScriptAccess","sameDomain");e.addParam("wmode",b.wmode);e.addParam("flashVars",b.xmlDir+"node."+d+".xml");e.write(b.flashDiv)};var renderHeadlines=function(g){var e=YAHOO.util.Dom.getElementsByClassName("dart_adunit_article");for(var d=0;d<e.length;d++){var f=e[d];var a=g.results[d];var b=TSCM.cfg.contextRoot+a.link+"?partner="+TSCM.ads.sponsorName;if(TSCM.ads.sponsorName===("put-storytype-here")){b=b.replace("/story/","/sponsor-story/ups/")}else{if(TSCM.ads.sponsorName===("business-news-update")){b=b.replace("/story/","/sponsor-story/ups/")}else{if(TSCM.ads.sponsorName===("best-in-class")){b=b.replace("/story/","/sponsor-story/ups/")}}}var c=a.headline;f.setAttribute("href",b);f.innerHTML=c}};var scriptLink=function(b){var a=document.createElement("script");a.src=b;a.type="text/javascript";document.body.appendChild(a)};var cau_util={classRoll:function(a){YAHOO.util.Event.onAvailable("adunit_btm",function(){if(!a){a="customAdUnit"}var c=YAHOO.util.Dom.getElementsByClassName("cau_off","li",a);for(var b=0;b<c.length;b++){if(c[b].className=="cau_off"){c[b].onmouseover=function(){this.className="cau_over"};c[b].onmouseout=function(){this.className="cau_off"}}}})},grabAdXMLByPercent:function(a,c){var b=1+(Math.floor(Math.random()*100));if(b<=a){TSCM.ads.adXMLFileToUse=c}else{if(b<=100){TSCM.ads.adXMLFileToUse="ad.xml"}}}};
