commercialNode=(typeof commercialNode == 'undefined')?((typeof thisNode != 'undefined')?thisNode:'washingtonpost.com'):commercialNode;
key_word = '';
doTiffany=false;
var exec_news = new Array('opinion','nation','politics','world','print','business','liveonline','technology');
tiff_ran = Math.floor(Math.random()*1000000000000);
tiff_test = (location.href.match('test_ads'))?'kw=wpni_test':'';

//logic for flights

doTiffany=(commercialNode == 'washingtonpost.com')?true:doTiffany;
doTiffany=(commercialNode == 'politics/fedpage' && now < '11152359')?true:doTiffany;
/*if((location.href.match('metro')) && (commercialNode=='metro'))
{

adCode = '<div style="margin:0px;padding:0px"><a href="http://www.washingtonpost.com/wp-srv/dealsdiscount/deals_discounts.html" target="_blank"><img src="http://www.washingtonpost.com/wp-adv/advertisers/dealsdiscounts/images/Deals_Discounts_234x60.gif" width="234" height="60" border="0" alt="Discounts & Deals"></a></div>'
adCode = '<div style="padding-bottom:15px;padding-top:2px;float:left;"><img src="http://www.washingtonpost.com/wp-srv/hp/img/advertical.gif" ></div>'+adCode
document.write(adCode)

}*/

//end of logic for flights

if(doTiffany)
{
	tiffDiv = document.getElementById('adTiff')
	//if this is IE, bump it down two pixels
	if(navigator.userAgent.toLowerCase().match('msie'))
	{
		origTop = parseInt(tiffDiv.style.top.split('px')[0]);
		tiffDiv.style.top = (origTop + 4) + 'px';
	}
	tiffDiv.style.display = 'block';
adCode = '<s\cript src="http://ad.doubleclick.net/adj/wpni.'+commercialNode.split("/")[0]+';ad=tiff;'+tiff_test+key_word+';ord='+tiff_ran+'?"></s\cript>'
document.write(adCode)

if (location.href.indexOf('debugAdCode') != -1)
	{
		currentAdCode = prompt("This is the current TiffanyTile code:", adCode);
	}
}
