//instantiate restriction manager
var adRestrictionManager = new AdRestrictionManager();

// turn off all superstitial tags on the home page
var restrictionOne = new AdRestriction();
restrictionOne.addParameter("UniqueId", "DIY-SECTION-33154-1");
restrictionOne.addParameter("adtype", "SUPERSTITIAL");
restrictionOne.isActive = false;
restrictionOne.isIframe = false;
//adRestrictionManager.restriction.push(restrictionOne);

// turn off text link in position 4
var restrictionTwo = new AdRestriction();
restrictionTwo.addParameter("UniqueId", "DIY-SECTION-33154-1");
restrictionTwo.addParameter("adtype", "SPONSORSHIP");
restrictionTwo.addParameter("PagePos", "4");
restrictionTwo.isActive = false;
restrictionTwo.isIframe = false;
//adRestrictionManager.restriction.push(restrictionTwo);

// turn off text link in position 3
var restrictionThree = new AdRestriction();
restrictionThree.addParameter("UniqueId", "DIY-SECTION-33154-1");
restrictionThree.addParameter("adtype", "SPONSORSHIP");
restrictionThree.addParameter("PagePos", "5");
restrictionThree.isActive = false;
restrictionThree.isIframe = false;
//adRestrictionManager.restriction.push(restrictionThree);

//restrict leaderboards on the home page regardless of page position
var restrictionFour = new AdRestriction();
restrictionFour.addParameter("SctnDspName", "HOME");
restrictionFour.addParameter("adtype", "LEADERBOARD");
restrictionFour.isActive = false;
restrictionFour.isIframe = false;
adRestrictionManager.restriction.push(restrictionFour);

//restrict leaderboards in page position 1 on TOPIC pages 
var restrictionFive = new AdRestriction();
restrictionFive.addParameter("Type", "TOPIC");
restrictionFive.addParameter("adtype", "LEADERBOARD");
restrictionFive.addParameter("PagePos", "1");
restrictionFive.isActive = false;
restrictionFive.isIframe = false;
adRestrictionManager.restriction.push(restrictionFive);

//restrict leaderboards in page position 1 on packages
var restrictionSix = new AdRestriction();
restrictionSix.addParameter("Role", "PACKAGE");
restrictionSix.addParameter("adtype", "LEADERBOARD");
restrictionSix.addParameter("PagePos", "1");
restrictionSix.isActive = false;
restrictionSix.isIframe = false;
adRestrictionManager.restriction.push(restrictionSix);

// turn off leaderboard page  in page position 1 on all section fronts 
var restrictionSeven = new AdRestriction();
restrictionSeven.addParameter("adtype", "LEADERBOARD");
restrictionSeven.addParameter("Type", "SECTION");
restrictionSeven.addParameter("PagePos", "1");
restrictionSeven.isActive = false;
restrictionSeven.isIframe = false;
adRestrictionManager.restriction.push(restrictionSeven);

// turn off leaderboard page  in page position 2 on all section fronts
var restrictionEight = new AdRestriction();
restrictionEight.addParameter("Type", "SECTION");
restrictionEight.addParameter("adtype", "LEADERBOARD");
restrictionEight.addParameter("PagePos", "2");
restrictionEight.isActive = false;
restrictionEight.isIframe = false;
//adRestrictionManager.restriction.push(restrictionEight);

// turn off leaderboard page on search pages
var restrictionNine = new AdRestriction();
restrictionNine.addParameter("SctnDspName", "SEARCH");
restrictionNine.addParameter("adtype", "LEADERBOARD");
restrictionNine.addParameter("Type", "SEARCH");
restrictionNine.isActive = false;
restrictionNine.isIframe = false;
adRestrictionManager.restriction.push(restrictionNine);

// turn off leaderboard page on episode search pages
var restrictionTen = new AdRestriction();
restrictionTen.addParameter("SctnDspName", "EPISODE_SEARCH");
restrictionTen.addParameter("adtype", "LEADERBOARD");
restrictionTen.addParameter("Type", "EPISODE_SEARCH");
restrictionTen.isActive = false;
restrictionTen.isIframe = false;
adRestrictionManager.restriction.push(restrictionTen);

//empty
var restrictionEleven = new AdRestriction();
restrictionEleven.addParameter("SctnDspName", "HOME");
restrictionEleven.addParameter("adtype", "SPONSORSHIP-CONTENT");
restrictionEleven.addParameter("UniqueId", "DIY-SECTION-33154-1");
restrictionEleven.isActive = false;
restrictionEleven.isIframe = false;
//adRestrictionManager.restriction.push(restrictionEleven);

// turn off all calls to the glidden ad (DEFAULT RULE)
var default1 = new AdDefault();
default1.addParameter("adtype", "SPONSORSHIP-CONTENT");
default1.addParameter("keyword", "GLIDDEN");
default1.display=false;
adRestrictionManager.adDefaults.push(default1);

// turn on calls to the glidden ad from the homepage
var restrictionTwelve = new AdRestriction();
restrictionTwelve.addParameter("adtype", "SPONSORSHIP-CONTENT");
restrictionTwelve.addParameter("keyword", "GLIDDEN");
restrictionTwelve.addParameter("Classification", "HOME,DIY");
restrictionTwelve.addParameter("UniqueId", "DIY-SECTION-33154-1");
restrictionTwelve.isActive = false;
restrictionTwelve.isIframe = false;
adRestrictionManager.restriction.push(restrictionTwelve);


