// fix for macromedia flash ads document.write(""); function Ad(id, linkGif, linkUrl, text, xDim, yDim, priority, html) { this.id = id; this.linkUrl = linkUrl; this.linkGif = linkGif; this.text = text; this.xDim = xDim; this.yDim = yDim; this.priority = priority; this.html = html; } function CreateRandomNumber(Min, Max) { var range = Max-Min+1; return (Math.floor(Math.random() * Math.pow(10,("" + range).length)) % range) + parseInt(Min); } var ads = new Array(); ads[4206091] = new Ad(4206091, "/uploaded-images/4206091/ad-1.gif", "%2Fstickerworld%2Fphoto%2Fintro.php", "Make-Your-Own Photo Sticker", "120", "90", "Medium", ""); ads[4206092] = new Ad(4206092, "/uploaded-images/4206092/ad-1.gif", "%2Fstickerworld", "Sticker World", "468", "60", "Medium", ""); ads[4206093] = new Ad(4206093, "/uploaded-images/4206093/ad-1.gif", "%2Fstickerworld", "Sticker World", "120", "60", "Medium", ""); ads[4206110] = new Ad(4206110, "/uploaded-images/4206110/ad-1.gif", "", "", "80", "50", "Medium", ""); ads[4206111] = new Ad(4206111, "/uploaded-images/4206111/ad-1.gif", "", "", "120", "90", "Medium", ""); ads[10742319] = new Ad(10742319, "/uploaded-images/10742319/ad-1.gif", "%2Fsesamestreet%2Fstories%2Fflash.php%3FcontentId%3D10725410%26solution%3Dsaving", "Play the Lemonade Stand!", "468", "60", "Medium", ""); ads[10742338] = new Ad(10742338, "/uploaded-images/10742338/ad-1.gif", "%2Fsesamestreet%2Fstories%2Fflash.php%3FcontentId%3D10725410%26solution%3Dsaving", "Play the Lemonade Stand!", "120", "60", "Medium", ""); ads[11092346] = new Ad(11092346, "/uploaded-images/11092346/ad-1.gif", "%2Feducationalresources", "Talk, Read, Write!", "120", "60", "Medium", ""); ads[12054273] = new Ad(12054273, "/uploaded-images/12054273/ad-1.gif", "http%3A%2F%2Fsupportus.sesameworkshop.org%2Fsite%2Fpp.aspx%3Fc%3DnlI3IkNXJsE%26b%3D2621077+", "Make a donation online.", "468", "60", "Medium", ""); ads[12054285] = new Ad(12054285, "/uploaded-images/12054285/ad-1.gif", "http%3A%2F%2Fsupportus.sesameworkshop.org%2Fsite%2Fpp.aspx%3Fc%3DnlI3IkNXJsE%26b%3D2621077+", "Donate online", "468", "60", "Low", ""); ads[12054294] = new Ad(12054294, "/uploaded-images/12054294/ad-1.gif", "http%3A%2F%2Fsupportus.sesameworkshop.org%2Fsite%2Fpp.aspx%3Fc%3DnlI3IkNXJsE%26b%3D2621077+", "Donate online", "120", "60", "High", ""); ads[12526653] = new Ad(12526653, "/uploaded-images/12526653/ad-1.gif", "%2Fsesamestreet%2Fgames%2Fflash.php%3FcontentId%3D12529198%26solution%3Dschool", "Happy, Healthy, Ready for School", "468", "60", "Medium", ""); ads[12526658] = new Ad(12526658, "/uploaded-images/12526658/ad-1.gif", "%2Fsesamestreet%2Fstories%2Fflash.php%3FcontentId%3D12526254%26solution%3Dschool", "Happy, Healthy, Ready for School", "120", "60", "Medium", ""); ads[13346664] = new Ad(13346664, "/uploaded-images/13346664/ad-1.gif", "%2Faboutus%2Fintro.php", "Sesame Workshop", "468", "60", "Low", ""); ads[15368876] = new Ad(15368876, "/uploaded-images/15368876/ad-1.gif", "http%3A%2F%2Fmobilestore.sesameworkshop.org", "Get Sesame Street ringtones and wallpapers!", "120", "60", "High", ""); ads[15368883] = new Ad(15368883, "/uploaded-images/15368883/ad-1.gif", "http%3A%2F%2Fmobilestore.sesameworkshop.org", "Get Sesame Street ringtones and wallpapers!", "468", "60", "High", ""); ads[15368888] = new Ad(15368888, "/uploaded-images/15368888/ad-1.gif", "http%3A%2F%2Fmobilestore.sesameworkshop.org", "Get Sesame Street ringtones and wallpapers!", "120", "60", "High", ""); ads[15368906] = new Ad(15368906, "/uploaded-images/15368906/ad-1.gif", "http%3A%2F%2Fmobilestore.sesameworkshop.org", "Get Sesame Street ringtones and wallpapers!", "468", "60", "High", ""); ads[15741128] = new Ad(15741128, "/uploaded-images/15741128/ad-1.gif", "%2Fbridge.php%3Furl%3Dhttp%253A%252F%252Fwww.earthsbest.com", "Earth's Best", "468", "60", "High", ""); ads[16123351] = new Ad(16123351, "/uploaded-images/16123351/ad-1.swf", "http%3A%2F%2Fwww.sesameworkshop.org%2Fgwr%3Ft%3D16080661", "Think Pinky! Pinky Dinky Doo", "468", "60", "Medium", ""); ads[16747721] = new Ad(16747721, "/uploaded-images/16747721/ad-1.gif", "%2Fbridge.php%3Furl%3Dhttp%253A%252F%252Fclk.atdmt.com%252FNYC%252Fgo%252Fssmstplm0500000159nyc%252Fdirect%253Bwi.468%253Bhi.60%252F01%252F", "everydaykidz.com", "468", "60", "High", ""); ads[17728415] = new Ad(17728415, "/uploaded-images/17728415/ad-1.gif", "%2Fbridge.php%3Furl%3Dhttp%253A%252F%252Fwww.beaches.com%252F", "beaches.com", "468", "60", "High", ""); ads[17728418] = new Ad(17728418, "/uploaded-images/17728418/ad-1.gif", "%2Fbridge.php%3Furl%3Dhttp%253A%252F%252Fwww.beaches.com%252F", "beaches.com", "468", "60", "High", ""); ads[18060681] = new Ad(18060681, "/uploaded-images/18060681/ad-1.gif", "%2Fbridge.php%3Furl%3Dhttp%253A%252F%252Fwww.newbalance.com%252Fkids%253Fcm_mmc%253Dsesamestreetworkshop.org-_-Online%2BMedia-_-Kids-_-Sesame.org_468x60", "http://www.newbalance.com/kids/", "468", "60", "High", ""); ads[18828839] = new Ad(18828839, "/uploaded-images/18828839/ad-1.gif", "http%3A%2F%2Fvideo.sesameworkshop.org%2F", "Sesame Street video player", "468", "60", "High", ""); ads[19015062] = new Ad(19015062, "/uploaded-images/19015062/ad-1.swf", "http%3A%2F%2Fwww.panwapa.com%2F", "Visit www.panwapa.com", "468", "60", "High", ""); ads[19076439] = new Ad(19076439, "/uploaded-images/19076439/ad-1.swf", "http%3A%2F%2Fwww.panwapa.com%2F", "visit panwapa.com", "468", "60", "High", ""); ads[19076458] = new Ad(19076458, "/uploaded-images/19076458/ad-1.swf", "http%3A%2F%2Fwww.panwapa.com%2F", "visit panwapa.com", "468", "60", "High", ""); ads[19076469] = new Ad(19076469, "/uploaded-images/19076469/ad-1.swf", "http%3A%2F%2Fwww.panwapa.com%2F", "visit panwapa.com", "468", "60", "High", ""); ads[19076482] = new Ad(19076482, "/uploaded-images/19076482/ad-1.swf", "http%3A%2F%2Fwww.panwapa.com%2F", "visit panwapa.com", "468", "60", "High", ""); var adPatterns = new Array(); adPatterns["/parents/solutions/celebrations"] = new Array(15368888,15368906); adPatterns["/parents/solutions/safety"] = new Array(15368888,15368888); adPatterns["/parents/solutions/school"] = new Array(12526653,12526658,15368906); adPatterns["/parents/solutions/health"] = new Array(15368876,15368876); adPatterns["/parents/solutions/immunization"] = new Array(15368876,15368883); adPatterns["/parents/solutions/saving"] = new Array(10742338,15368876,15368883,15368888,15368906); adPatterns["/parents/activities"] = new Array(15368876,15368883,15368888); adPatterns["/parents"] = new Array(10742319,12054273,12054285,12054294,13346664,15368876,15368883,15368888,15368906,16123351); adPatterns["scrollerId=games"] = new Array(12054273,12054285,12054294,12526653,12526658,18828839,19015062,19076439,19076458,19076469,19076482); adPatterns["scrollerId=stories"] = new Array(10742319,10742338,12526653,12526658,16123351,19015062,19076439,19076458,19076469,19076482); adPatterns["scrollerId=art"] = new Array(19076439,19076458,19076469,19076482); adPatterns["/sesamestreet"] = new Array(12054273,13346664,18828839,19015062); adPatterns["/stickerworld"] = new Array(4206091,4206092,4206093,19015062,19076439,19076458,19076469,19076482); adPatterns["homepage"] = new Array(11092346,15741128,16747721,17728415,17728418,18060681); var noMatch = new Array(4206110,4206111,11092346,12054294,13346664,16123351); function getAdsFromMatchList(matchList,x,y) { var matches = new Array(); for (var i=0; i < matchList.length; i++) { if (ads[matchList[i]].xDim==x && ads[matchList[i]].yDim==y) { matches[matches.length]=ads[matchList[i]]; } } if (matches.length > 0) { return matches; } else { return new Array(); } } function getMatches(x,y,page) { for (pattern in adPatterns) { if ( page.indexOf(pattern) != -1 ) { sizeMatches = getAdsFromMatchList(adPatterns[pattern],x,y); if (sizeMatches.length>0) { return sizeMatches; } } } return getAdsFromMatchList(noMatch,x,y); } function getMatchesByPriority( priority, matches ) { var priorityMatches = new Array(); for( var i=0; i 0 ) { return priorityMatches; } } return new Array(); } function getPopUpAdLink(x, y, page) { var matches = getMatches(x, y, page); matches = getPriorityMatches(matches); var r = CreateRandomNumber(0, matches.length - 1); if (matches.length > 0) { link = "/popup/popup.php?contentId="; link += matches[r].id; link += "&url="+matches[r].linkUrl; return link + "&width="+matches[r].xDim+"&height="+matches[r].yDim; } } function getAdLink(x, y, page) { var matches = getMatches(x,y,page); matches = getPriorityMatches(matches); var r = CreateRandomNumber(0, matches.length - 1); tmp = ""; if (matches[r].html != "") { tmp = matches[r].html; var url = "\/adservice\/adredirector.php?contentId="; url += matches[r].id; url += "&url="+matches[r].linkUrl; tmp = tmp.replace(/URLREPLACE/g,""+escape(url)); } else { tmp = ""; var linkLength = (matches[r].linkGif).length; fix = ""; if ((matches[r].linkGif).substr(linkLength-3,3) == "swf") { tmp += "<\/noscript>"+fix+"<\/a>"; } else { tmp += "<\/a>"; } } mpt = new Date(); mpts = mpt.getTimezoneOffset() + mpt.getTime(); tmp = tmp.replace("RANDOM",""+mpts); return tmp + ""; } function DynamicCallout(id, imageUrl, title, description, link, xDim, yDim, weighting) { this.id = id; this.imageUrl = imageUrl; this.title = title; this.description = description; this.link = link; this.xDim = xDim; this.yDim = yDim; this.weighting = weighting; } var dynamicCallouts = new Array(); dynamicCallouts[13638691] = new DynamicCallout(13638691, "/uploaded-images/13638691/dynamiccallout-1.gif", "In the Nick of Rhyme", "Grover saves the day in a rhyming way!", "/gwr?s=homepage_callout&t=13474189", "59", "51", "1"); dynamicCallouts[14250376] = new DynamicCallout(14250376, "/uploaded-images/14250376/dynamiccallout-1.gif", "Zoe's Dance Moves", "Move and groove your way to healthy!", "/gwr?s=homepage_callout&t=8118434", "64", "64", "3"); dynamicCallouts[17789008] = new DynamicCallout(17789008, "/uploaded-images/17789008/dynamiccallout-1.gif", "Sesame Street Store", "Save 10% on all orders over $50!", "http://store.sesameworkshop.org/", "59", "51", "1"); dynamicCallouts[18743484] = new DynamicCallout(18743484, "/uploaded-images/18743484/dynamiccallout-1.gif", "Make a Donation", "Start 2008 with a tax-deductible donation to Sesame Workshop.", "http://supportus.sesameworkshop.org/site/lookup.asp?c=nlI3IkNXJsE&b=2748683", "59", "51", "1"); dynamicCallouts[18771424] = new DynamicCallout(18771424, "/uploaded-images/18771424/dynamiccallout-1.gif", "Joan Ganz Cooney Center Launches", "Advancing children's learning in a digital age.", "http://www.joanganzcooneycenter.org/", "44", "44", "3"); dynamicCallouts[19013924] = new DynamicCallout(19013924, "/uploaded-images/19013924/dynamiccallout-1.gif", "Magical Numbers", "Count along with Mumford the magician!", "/sesamestreet/games/flash.php?contentId=18862549", "64", "64", "5"); dynamicCallouts[19029500] = new DynamicCallout(19029500, "/uploaded-images/19029500/dynamiccallout-1.gif", "Healthy Habits", "Resources to help you raise a healthy, active child.", "http://www.sesameworkshop.org/healthyhabits/", "44", "44", "1"); dynamicCallouts[19046509] = new DynamicCallout(19046509, "/uploaded-images/19046509/dynamiccallout-1.jpg", "Sesame Street Store", "When you buy our products, you support children's education.", "http://store.sesameworkshop.org/", "64", "64", "5"); dynamicCallouts[19046511] = new DynamicCallout(19046511, "/uploaded-images/19046511/dynamiccallout-1.jpg", "Make a Donation", "Help us provide millions of children with a brighter future through the power of learning.", "http://supportus.sesameworkshop.org/make_a_donation", "64", "64", "5"); var dynamicCalloutPatterns = new Array(); dynamicCalloutPatterns["Parents_and_Caregivers_top"] = new Array(19029500,19029500); dynamicCalloutPatterns["Parents_and_Caregivers_bottom"] = new Array(18771424,18771424,18771424,18771424,18771424,18771424); dynamicCalloutPatterns["SesameStreet_top"] = new Array(13638691,13638691,19013924,19013924,19013924,19013924,19013924,19013924,19013924,19013924,19013924,19013924); dynamicCalloutPatterns["SesameStreet_bottom"] = new Array(14250376,14250376,14250376,14250376,14250376,14250376); dynamicCalloutPatterns["Support_Us_top"] = new Array(18743484,18743484,19046511,19046511,19046511,19046511,19046511,19046511,19046511,19046511,19046511,19046511); dynamicCalloutPatterns["Support_Us_bottom"] = new Array(17789008,17789008,19046509,19046509,19046509,19046509,19046509,19046509,19046509,19046509,19046509,19046509); var noDynamicCalloutMatch = new Array(13638691,14250376,17789008,18743484,18771424,19013924,19029500,19046509,19046511); function getDynamicCalloutsFromMatchList(matchList,x,y) { var matches = new Array(); for (var i=0; i < matchList.length; i++) { if (dynamicCallouts[matchList[i]].xDim==x && dynamicCallouts[matchList[i]].yDim==y) { matches[matches.length]=dynamicCallouts[matchList[i]]; } } if (matches.length > 0) { return matches; } else { return new Array(); } } function getDynamicCalloutMatches(x,y,location) { for (pattern in dynamicCalloutPatterns) { if ( location.indexOf(pattern) != -1 ) { sizeMatches = getDynamicCalloutsFromMatchList(dynamicCalloutPatterns[pattern],x,y); if (sizeMatches.length>0) { return sizeMatches; } } } return getDynamicCalloutsFromMatchList(noDynamicCalloutMatch,x,y); } function getDynamicCalloutTemplate(x, y, location, customClass) { var matches = getDynamicCalloutMatches(x,y,location); var r = CreateRandomNumber(0, matches.length - 1); var html = ''; html += ''; html += ''; html += ''+matches[r].title+''; html += ''+matches[r].description+''; html += ''; return html; }