wpniSite='newsweek'
wpniDomain='newsweek.com'
show_doubleclick_ad = true
//poeString = "nw_poe"
rssString = "from=rss"
tileThatGetsDcopt = 1
//this declares what kinds of ads are on this site

if(typeof wpniAds.templates == 'undefined')
{
	wpniAds.templates = new Object()
	wpniAds.templates.lbAndRightFlex = new Object();
	wpniAds.templates.lbAndRightFlex.what = new Array('leaderboard','flex');
	wpniAds.templates.lbAndRightFlex.where = new Array('intl/turningpoints')
}

//this declares what kinds of ads are on this site
function initAdType(what)
{
	thisAdType = new AdInstance()
	thisAdType.testFlagArray = new Array('test_ads','test_' + what);	
	thisAdType.debugFlagArray = new Array('debugAdCode','debugAdCode_' + what);

	switch(what)
	{
		
		case '468x60':
			thisAdType.size = '468x60';
			thisAdType.code = 'ad=468x60;';
		break
		
		case '120x60':
			thisAdType.size = '120x60';
			thisAdType.code = 'ad=120x60;';
		break
		
		case 'leaderboard':
			thisAdType.size = "728x90"
			thisAdType.code = "ad=lb;"
		break
		
		case '88x31AJAX':
			thisAdType.size = "88x31";
			thisAdType.code = "ad=88x31;";
			thisAdType.doubleClickAdType = "adi";
			thisAdType.isManaged = true;
		break;
		
		case '88x31':
			thisAdType.size = "88x31";
			thisAdType.code = "ad=88x31;";

		break;
		
		case '234x60AJAX':
			thisAdType.size = "234x60";
			thisAdType.code = "ad=234x60;";
			thisAdType.doubleClickAdType = "adi";
			thisAdType.AJAX = true;

		break;
		
		case '234x60':
			thisAdType.size = "234x60";
			thisAdType.code = "ad=234x60;";

		break;
		

		
		case 'bigboxAJAX':
			thisAdType.size = "300x250";
			thisAdType.code = "ad=bb;";
			thisAdType.doubleClickAdType = "adi";
			thisAdType.AJAX = true;
			thisAdType.isManaged = true;
		break;
		
		case '170x90':
			thisAdType.size = "170x90";
			thisAdType.code = "ad=170x90;";
		break;

		case '160x60':
			thisAdType.size = "170x90";
			thisAdType.code = "ad=170x90;";
		break;


		
		case 'bigbox':
			thisAdType.size = "300x250"
			thisAdType.code = "ad=bb;"
		break
		
		case 'articleFlex':
			thisAdType.size = "300x250,336x850,160x600,180x150"
			thisAdType.code = "ad=bb;ad=hp;ad=ss;"
		break
		
		case 'homepageFlex':
			thisAdType.size = "300x250,336x850,180x150"
			thisAdType.code = "ad=bb;ad=hp;"
		break

		case 'bigboxHPFlex':
			thisAdType.size = "300x250,336x850"
			thisAdType.code = "ad=bb;ad=hp;"
		break
		
		case 'video':
			
			thisAdType.adServer = 'http://ad.doubleclick.net/pfadx/'
			thisAdType.code = "ad=video"
			thisAdType.adExecute = function (currentLoc,varDcCount,what,flexBoolean)
			{
				if(typeof config == 'undefined')
				{
					config = new Array();
				}
				
				config['adServerURL'] = this.adServer + siteZoneDir(currentLoc) + this.code + ";" + thisAdType.testAction(thisAdType.testFlagArray)
				config['additionalAdTargetingParams'] = ';' + this.dcCode
				
				for(var x = 0; x<this.debugFlagArray.length;x++)
				{
				    if(x!="indexOf")
				    {
					    if (location.href.match(this.debugFlagArray[x]))
					    {
						    this.debugAction()
					    }
					}
				}
			}
			
			thisAdType.debugAction = function()
			{
				var output = "config['adServerURL']:" + config['adServerURL'] + "\n\r"
				output += "config['additionalAdTargetingParams']:" + config['additionalAdTargetingParams'] + "\n\r"
			}

		break

	}
	
	if (thisAdType.isThisManaged = true)
	{
	thisAdType.managerListLength = getHighestValue(thisAdType.when.length,thisAdType.where.length);
	}
	
	
return thisAdType
}

function front()
{
	if(typeof ad_content_type != 'undefined' && ad_content_type  =='front')
	{
		return 'front=y;';
	}
	else
	{
		return 'front=n;'
	}
};


function hackBin(_arg,currentLoc,what,flex,onTheFly)
{
	var hackReturnValue=eval(_arg)
	switch(_arg)
	{
		case 'currentLoc':
			hackReturnValue += (commercialNode == 'intl/turningpoints' && (currentLoc == 'printthis' || currentLoc == 'module/quickread'))?'/intl/turningpoints':'';
		break;
	}
	return hackReturnValue
}