// Initialize Yahoo APT using the old-school OAS setup.
// Maps an OAS_sitepage value to a pair of Yahoo APT lists.
OAS_sitepagemap = {
	"apartments.tucson/index" : [],
	"apartments.tucson/searchresults" : [],
	"az-azstarnet" : [],
	"az-azstarnet/life/article" : [],
	"az-azstarnet/life/email" : [],
	"az-azstarnet/life/events" : [],
	"az-azstarnet/life/events/festivalofbooks" : [],
	"az-azstarnet/life/food" : [],
	"az-azstarnet/life/gallery" : [],
	"az-azstarnet/life/index" : [],
	"az-azstarnet/life/movies/index" : [],
	"az-azstarnet/money/article" : [],
	"az-azstarnet/money/companies" : [],
	"az-azstarnet/money/email" : [],
	"az-azstarnet/money/index" : [],
	"az-azstarnet/news/allheadlines" : [],
	"az-azstarnet/news/article" : [],
	"az-azstarnet/news/border" : [],
	"az-azstarnet/news/breaking" : [],
	"az-azstarnet/news/education" : [],
	"az-azstarnet/news/email" : [],
	"az-azstarnet/news/email_85614" : [],
	"az-azstarnet/news/email_85629" : [],
	"az-azstarnet/news/email_85635" : [],
	"az-azstarnet/news/email_85641" : [],
	"az-azstarnet/news/email_85653" : [],
	"az-azstarnet/news/email_85701" : [],
	"az-azstarnet/news/email_85704" : [],
	"az-azstarnet/news/email_85705" : [],
	"az-azstarnet/news/email_85706" : [],
	"az-azstarnet/news/email_85710" : [],
	"az-azstarnet/news/email_85711" : [],
	"az-azstarnet/news/email_85712" : [],
	"az-azstarnet/news/email_85713" : [],
	"az-azstarnet/news/email_85715" : [],
	"az-azstarnet/news/email_85716" : [],
	"az-azstarnet/news/email_85718" : [],
	"az-azstarnet/news/email_85719" : [],
	"az-azstarnet/news/email_85730" : [],
	"az-azstarnet/news/email_85737" : [],
	"az-azstarnet/news/email_85741" : [],
	"az-azstarnet/news/email_85745" : [],
	"az-azstarnet/news/email_85746" : [],
	"az-azstarnet/news/email_85747" : [],
	"az-azstarnet/news/email_85748" : [],
	"az-azstarnet/news/email_85749" : [],
	"az-azstarnet/news/email_85750" : [],
	"az-azstarnet/news/health" : [],
	"az-azstarnet/news/index" : [],
	"az-azstarnet/news/local/article" : [],
	"az-azstarnet/news/local/index" : [],
	"az-azstarnet/news/mobile" : [],
	"az-azstarnet/news/nation/article" : [],
	"az-azstarnet/news/nation/index" : [],
	"az-azstarnet/news/opinion" : [],
	"az-azstarnet/news/poll" : [],
	"az-azstarnet/news/spanish" : [],
	"az-azstarnet/news/traffic" : [],
	"az-azstarnet/search" : [],
	"az-azstarnet/sports/article" : [],
	"az-azstarnet/sports/baseball/spring/index" : [],
	"az-azstarnet/sports/college" : [],
	"az-azstarnet/sports/email" : [],
	"az-azstarnet/sports/football" : [],
	"az-azstarnet/sports/golf" : [],
	"az-azstarnet/sports/index" : [],
	"az-azstarnet/sports/preps" : [],
	"az-azstarnet/travel/article" : [],
	"az-azstarnet/travel/flights" : [],
	"az-azstarnet/umbrella" : [],
	"az-azstarnet/video" : [],
	"az-azstarnet/weather/front" : [],
	"az-azstarnet/news/email_85658" : [],

	"az-tucson/classifieds/coupons" : [["20304501"], ["fn_ec_agg"]],
	"az-tucson/classifieds/index" : [["20214501"], ["fn_news"]],
	"az-tucson/classifieds/jobs/nurses" : [["20224001"], ["fn_class_jobs"]],
	"az-tucson/classifieds/jobs/workplaceexcellence" : [["20344501"], ["fn_class_jobs"]],
	"az-tucson/classifieds/obituary" : [["20217001"], ["fn_class_ls"]],
	"az-tucson/classifieds/realestate/calculator" : [["20300501"], ["fn_class_ls"]],
	"az-tucson/classifieds/realestate/condos" : [["20246001"], ["fn_class_ls"]],
	"az-tucson/classifieds/realestate/finance" : [["20300501"], ["fn_class_ls"]],
	"az-tucson/classifieds/realestate/index" : [["20291001"], ["fn_class_ls"]],
	"az-tucson/classifieds/realestate/new" : [["20294501"], ["fn_class_ls"]],
	"az-tucson/classifieds/realestate/newresults" : [["20294501"], ["fn_class_ls"]],
	"az-tucson/classifieds/realestate/resale" : [["20297001"], ["fn_class_ls"]],
	"az-tucson/classifieds/realestate/resaleprofile" : [["20245001"], ["fn_class_ls"]],
	"az-tucson/classifieds/realestate/resaleresults" : [["20243001"], ["fn_class_ls"]],
	"az-tucson/classifieds/realestate/schools" : [["20345501"], ["fn_class_ls"]],
	"az-tucson/classifieds/realestate_foreclosure" : [["20291001"], ["fn_class_ls"]],
	"az-tucson/classifieds/shopping" : [["20303501"], ["fn_ec_agg"]],
	"az-tucson/classifieds/shopping_swstyle" : [["20303501"], ["fn_ec_agg"]],
	"az-tucson/life/bridalfair" : [["20424501"], ["fn_news"]],
	"az-tucson/life/celebrations" : [["20423001"], ["fn_news"]],
	"az-tucson/life/contests" : [["20425501"], ["fn_news"]],
	"az-tucson/life/holiday" : [["20258501"], ["fn_news"]],
	"az-tucson/life/index" : [["20258501"], ["fn_news"]],
	"az-tucson/life/lifestyle/pets" : [["20434501"], ["fn_news"]],
	"az-tucson/life/lifestyle/retirement" : [["20434001"], ["fn_news"]],
	"az-tucson/life/movies/listings" : [["20264501"], ["fn_news"]],
	"az-tucson/life/puzzles" : [["20262501"], ["fn_news"]],
	"az-tucson/news/customerservice" : [["20402501"], ["fn_news"]],
	"az-tucson/news/education" : [["20277001"], ["fn_news"]],
	"az-tucson/news/health" : [["20430501"], ["fn_news"]],
	"az-tucson/news/index" : [["20275001"], ["fn_news"]],
	"az-tucson/news/orovalley" : [["20276501"], ["fn_news"]],
	"az-tucson/news/traffic" : [["20285001"], ["fn_news"]],
	"az-tucson/search" : [["20401001"], ["fn_prtl_srch"]],
	"az-tucson/sports/golf" : [["20391001"], ["fn_news"]],
	"az-tucson/sports/index" : [["20354001"], ["fn_news"]],
	"az-tucson/travel/index" : [["20410001"], ["fn_news"]],
	"az-tucson/umbrella" : [["20201001"], ["fn_prtl"]],
	"az-tucson/weather/front" : [["20416501"], ["fn_news"]],
	"az-tucson.tucson/news/politicselections/inauguration/obama" : [],
	"az-tucson.tucsoncitizen/classifieds/cars/homepage.htm " : [],
	"az-tucson/classifieds/email_obits" : [],
	"az-tucson/sports/college/email" : [],
	"az-tucson/sports/golf/email" : [],

	"az-tucsoncitizen/classifieds/apartments/index" : [["20244001"], ["fn_class_ls"]],
	"az-tucsoncitizen/classifieds/cars/index" : [["20254501"], ["fn_class_ls"]],
	"az-tucsoncitizen/classifieds/cars/virtual/chevrolet" : [["20328501"], ["fn_class_ls"]],
	"az-tucsoncitizen/classifieds/cars/virtual/ford" : [["20328501"], ["fn_class_ls"]],
	"az-tucsoncitizen/classifieds/jobs" : [["20218501"], ["fn_class_jobs"]],
	"az-tucsoncitizen/life/article" : [],
	"az-tucsoncitizen/life/events" : [["20258501"], ["fn_news"]],
	"az-tucsoncitizen/life/food" : [["20429001"], ["fn_ugm_blog"]],
	"az-tucsoncitizen/life/gallery" : [],
	"az-tucsoncitizen/life/holiday" : [],
	"az-tucsoncitizen/life/index" : [["20258501"], ["fn_news"]],
	"az-tucsoncitizen/money/businessedge" : [],
	"az-tucsoncitizen/money/email" : [],
	"az-tucsoncitizen/money/index" : [],
	"az-tucsoncitizen/nation/index" : [],
	"az-tucsoncitizen/news/border" : [],
	"az-tucsoncitizen/news/breaking" : [],
	"az-tucsoncitizen/news/email" : [],
	"az-tucsoncitizen/news/health" : [["20430501"], ["fn_news"]],
	"az-tucsoncitizen/news/local/article" : [],
	"az-tucsoncitizen/news/local/index" : [["20276501"], ["fn_news"]],
	"az-tucsoncitizen/news/nation/article" : [],
	"az-tucsoncitizen/news/opinion" : [["20281001"], ["fn_ugm_blog"]],
	"az-tucsoncitizen/news/politics/article" : [],
	"az-tucsoncitizen/news/poll" : [],
	"az-tucsoncitizen/news/traffic" : [],
	"az-tucsoncitizen/news/underforty" : [],
	"az-tucsoncitizen/search" : [],
	"az-tucsoncitizen/sports/article" : [],
	"az-tucsoncitizen/sports/college" : [],
	"az-tucsoncitizen/sports/golf" : [],
	"az-tucsoncitizen/sports/index" : [["20354001"], ["fn_news"]],
	"az-tucsoncitizen/sports/preps" : [],
	"az-tucsoncitizen/tech/news" : [["20284501"], ["fn_ugm_blog"]],
	"az-tucsoncitizen/tech/news/article" : [],
	"az-tucsoncitizen/umbrella" : [["20201001"], ["fn_prtl"]],
	"az-tucsoncitizen/video" : [],
	"az-tucsoncitizen/weather/front" : [],
	"az-tucsoncitizen/money/life/announcements/obituary/index" : [],
	"az-tucsoncitizen/money/money/autos/cashforclunkers" : [],
	"az-tucsoncitizen/money/video" : [],
	"az-tucsoncitizen/money/video/brightcove/companion/article/index" : [],
	"az-tucsoncitizen/money/video/brightcove/companion/immersive/index" : [],
	"az-tucsoncitizen/money/video/brightcove/companion/sectionfront/index" : [],
	"az-tucsoncitizen/money/video/embedplayer" : [],
	"az-tucsoncitizen/money/video/life" : [],
	"az-tucsoncitizen/money/video/money" : [],
	"az-tucsoncitizen/money/video/news" : [],
	"az-tucsoncitizen/money/video/news/green" : [],
	"az-tucsoncitizen/money/video/news/health" : [],
	"az-tucsoncitizen/money/video/sports" : [],
	"az-tucsoncitizen/money/video/travel" : [],
	"az-tucsoncitizen/money/video/weather" : [],
	"az-tucsoncitizen/news/news/topics" : [],
	"az-tucsoncitizen/umbrella/default" : [],

	"cars.tucson/index" : [],
	"cars.tucson/video" : [],
	"classifieds.tucson/index" : [],
	"classifieds.tucson/marketplace" : [],
	"directory.tucson/index" : [],
	"entertainment.azstarnet/events" : [],
	"entertainment.azstarnet/food" : [],
	"entertainment.azstarnet/index" : [],
	"entertainment.azstarnet/movies" : [],
	"entertainment.azstarnet/nightbuzz" : [],
	"entertainment.azstarnet/stories" : [],
	"entertainment.tucson/index" : [],
	"entertainment.tucsoncitizen/events" : [],
	"entertainment.tucsoncitizen/food" : [],
	"entertainment.tucsoncitizen/index" : [],
	"entertainment.tucsoncitizen/movies" : [],
	"entertainment.tucsoncitizen/stories" : [],
	"jobs.tucson" : [],
	"jobs.tucson/index" : [],
	"jobs.tucson/index" : [],
	"jobs.tucson/nurses" : [],
	"jobs.tucson/results" : [],
	"news.azstarnet" : [],
	"news.azstarnet/border" : [],
	"news.azstarnet/business/index" : [],
	"news.azstarnet/contest" : [],
	"news.azstarnet/email/entertainment" : [],
	"news.azstarnet/email/news" : [],
	"news.azstarnet/email/sports" : [],
	"news.azstarnet/email/zipcode" : [],
	"news.azstarnet/email/zipcode/85614" : [],
	"news.azstarnet/email/zipcode/85629" : [],
	"news.azstarnet/email/zipcode/85635" : [],
	"news.azstarnet/email/zipcode/85641" : [],
	"news.azstarnet/email/zipcode/85653" : [],
	"news.azstarnet/email/zipcode/85701" : [],
	"news.azstarnet/email/zipcode/85704" : [],
	"news.azstarnet/email/zipcode/85705" : [],
	"news.azstarnet/email/zipcode/85706" : [],
	"news.azstarnet/email/zipcode/85710" : [],
	"news.azstarnet/email/zipcode/85711" : [],
	"news.azstarnet/email/zipcode/85712" : [],
	"news.azstarnet/email/zipcode/85713" : [],
	"news.azstarnet/email/zipcode/85715" : [],
	"news.azstarnet/email/zipcode/85716" : [],
	"news.azstarnet/email/zipcode/85718" : [],
	"news.azstarnet/email/zipcode/85719" : [],
	"news.azstarnet/email/zipcode/85730" : [],
	"news.azstarnet/email/zipcode/85737" : [],
	"news.azstarnet/email/zipcode/85741" : [],
	"news.azstarnet/email/zipcode/85745" : [],
	"news.azstarnet/email/zipcode/85746" : [],
	"news.azstarnet/email/zipcode/85747" : [],
	"news.azstarnet/email/zipcode/85748" : [],
	"news.azstarnet/email/zipcode/85749" : [],
	"news.azstarnet/email/zipcode/85750" : [],
	"news.azstarnet/football" : [],
	"news.azstarnet/health" : [],
	"news.azstarnet/index" : [],
	"news.azstarnet/local/index" : [],
	"news.azstarnet/nationworld/index" : [],
	"news.azstarnet/northwest" : [],
	"news.azstarnet/opinion/index" : [],
	"news.azstarnet/sahuarita" : [],
	"news.azstarnet/spanish" : [],
	"news.azstarnet/specialfeature" : [],
	"news.azstarnet/sports/index" : [],
	"news.azstarnet/sports_golf/index" : [],
	"news.azstarnet/sports_wildcats/index" : [],
	"news.azstarnet/stories/business" : [],
	"news.azstarnet/stories/local" : [],
	"news.azstarnet/stories/nationworld" : [],
	"news.azstarnet/stories/opinion" : [],
	"news.azstarnet/stories/spanish" : [],
	"news.azstarnet/stories/sports" : [],
	"news.azstarnet/stories/sports/golf" : [],
	"news.azstarnet/stories/sports/prep" : [],
	"news.azstarnet/stories/sports/wildcats" : [],
	"news.azstarnet/travel" : [],
	"news.azstarnet/weather" : [],
	"news.tucson" : [],
	"news.tucson/celebrations" : [],
	"news.tucson/education" : [],
	"news.tucson/email/obituaries" : [],
	"news.tucson/email/sports/golf" : [],
	"news.tucson/email/sports/wildcats" : [],
	"news.tucson/health" : [],
	"news.tucson/health/marketplace" : [],
	"news.tucson/index" : [],
	"news.tucson/index" : [],
	"news.tucson/inside" : [],
	"news.tucson/living" : [],
	"news.tucson/local/index" : [],
	"news.tucson/obituaries/index" : [],
	"news.tucson/specialfeature" : [],
	"news.tucson/sports/fanshop" : [],
	"news.tucson/sports/golf" : [],
	"news.tucson/sports/index" : [],
	"news.tucson/travel" : [],
	"news.tucson/weather" : [],
	"news.tucsoncitizen" : [],
	"news.tucsoncitizen/border" : [],
	"news.tucsoncitizen/breaking" : [],
	"news.tucsoncitizen/business" : [],
	"news.tucsoncitizen/business/index" : [],
	"news.tucsoncitizen/businessedge" : [],
	"news.tucsoncitizen/email/breaking" : [],
	"news.tucsoncitizen/email/business" : [],
	"news.tucsoncitizen/email/news" : [],
	"news.tucsoncitizen/health" : [],
	"news.tucsoncitizen/lifestyle" : [],
	"news.tucsoncitizen/lifestyle/index" : [],
	"news.tucsoncitizen/local/index" : [],
	"news.tucsoncitizen/nationworld/index" : [],
	"news.tucsoncitizen/opinion/index" : [],
	"news.tucsoncitizen/sports/index" : [],
	"news.tucsoncitizen/sports_golf/index" : [],
	"news.tucsoncitizen/sports_prep/index" : [],
	"news.tucsoncitizen/sports_wildcats/index" : [],
	"news.tucsoncitizen/stories" : [],
	"news.tucsoncitizen/stories/business" : [],
	"news.tucsoncitizen/stories/lifestyle" : [],
	"news.tucsoncitizen/stories/local" : [],
	"news.tucsoncitizen/stories/nationworld" : [],
	"news.tucsoncitizen/stories/opinion" : [],
	"news.tucsoncitizen/stories/sports" : [],
	"news.tucsoncitizen/stories/sports/golf" : [],
	"news.tucsoncitizen/underforty" : [],
	"news.tucsoncitizen/weather" : [],
	"other.azstarnet/multimedia" : [],
	"other.azstarnet/traffic" : [],
	"other.tucson" : [],
	"other.tucson/bridalfair" : [],
	"other.tucson/bridalfair/marketplace" : [],
	"other.tucson/contest" : [],
	"other.tucson/games" : [],
	"other.tucson/holiday" : [],
	"other.tucson/hoops" : [],
	"other.tucson/multimedia" : [],
	"other.tucson/star200" : [],
	"other.tucsoncitizen" : [],
	"other.tucsoncitizen/contest" : [],
	"other.tucsoncitizen/custservice" : [],
	"other.tucsoncitizen/index" : [],
	"other.tucsoncitizen/multimedia" : [],
	"other.tucsoncitizen/searchresults" : [],
	"other.tucsoncitizen/traffic" : [],
	"realestate.tucson/agents" : [],
	"realestate.tucson/calculator2" : [],
	"realestate.tucson/community" : [],
	"realestate.tucson/condos" : [],
	"realestate.tucson/finance" : [],
	"realestate.tucson/homelife" : [],
	"realestate.tucson/index" : [],
	"realestate.tucson/maps" : [],
	"realestate.tucson/new" : [],
	"realestate.tucson/newresults" : [],
	"realestate.tucson/resale" : [],
	"realestate.tucson/resaleprofile" : [],
	"realestate.tucson/resaleresults" : [],
	"realestate.tucson/schools" : [],
	"retail.tucson/index" : [],
	"retail.tucson/swstyle" : [],
	"test.tucson/index" : [],
	"umbrella.azstarnet" : [],
	"umbrella.azstarnet/index" : [],
	"umbrella.tucson/index" : [],
	"umbrella.tucsoncitizen/index" : [],
	"umbrella.tucsoncitizen/timeout" : []
};

// Yahoo APT settings for the site and page.
yld_mgr = {};
yld_mgr.container_type = "js";
yld_mgr.request_type = "ac";
yld_mgr.pub_id = "21084073782";
yld_mgr.site_name = "tucson.com";
OAS_sitepage = OAS_sitepage.replace(".com", "");
OAS_sitepage = OAS_sitepage.replace(".html", "");
OAS_sitepage = OAS_sitepage.replace(".htm", "");
if (typeof(OAS_sitepagemap[OAS_sitepage]) == "undefined" || !OAS_sitepagemap[OAS_sitepage].length)
{
	yld_mgr.content_topic_id_list = ["20275001"];
	yld_mgr.content_type_list = ["fn_news"];
}
else
{
	yld_mgr.content_topic_id_list = OAS_sitepagemap[OAS_sitepage][0];
	yld_mgr.content_type_list = OAS_sitepagemap[OAS_sitepage][1];
}

TNI__AdPosProcessed = false;
TNI__IgnorePositions = ["88x31_1"];
TNI__AboveTheFold = ["x25", "Right1"];
TNI__PositionMap = {
	"x14" : "250x90",
	"x15" : "250x90",
	"x16" : "250x90",
	"x17" : "250x90",
	"x25" : "1000x30",
	"Right1" : "300x250",
	"Right2" : "300x250"
};
function GetAdPosInfo(pos)
{
	var x, size, result = { 'width' : '', 'height' : '', 'fold' : 'ipbtf', 'minpos' : pos };

	for (x = 0; x < TNI__AboveTheFold.length && TNI__AboveTheFold[x] != pos; x++);
	if (x < TNI__AboveTheFold.length)  result.fold = "ipatf";
	x = pos.indexOf("_");
	if (x > -1)
	{
		if (pos.substring(x) == "_1")  result.fold = "ipatf";

		size = pos.substring(0, x).split("x");
		if (size.length == 2)
		{
			result.width = size[0];
			result.height = size[1];
		}

		result.minpos = pos.substring(0, x);
	}

	if (typeof(TNI__PositionMap[result.minpos]) != "undefined")  result.minpos = TNI__PositionMap[result.minpos];

	return result;
}

function ProcessAdPosition(pos)
{
	var x, temppos, origpos, fold, info;

	for (x = 0; x < TNI__IgnorePositions.length && pos != TNI__IgnorePositions[x]; x++);
	if (x < TNI__IgnorePositions.length)  return false;

	info = GetAdPosInfo(pos);

	yld_mgr.slots[pos] = {
		ad_size_list : [info.minpos],
		ad_delivery_mode : info.fold
	};

	TNI__AdPosProcessed = true;

	return true;
}

// Ad positions.  Extract from the old-school OAS format.  Assumes below the fold if not explicitly specified or calculated.
yld_mgr.slots = {};
if (typeof(window.OAS_listpos) == "string" && (typeof(window.OAS_delay) != "boolean" || !OAS_delay))
{
	OAS_listpos2 = OAS_listpos.split(",");
	for (x = 0; x < OAS_listpos2.length; x++)
	{
		ProcessAdPosition(OAS_listpos2[x]);
	}
}

// Execute the main ad loader.
if (TNI__AdPosProcessed)  document.write('<script type="text/javascript" src="http://e.yieldmanager.net/script.js"></script>');


function OAS_AD(pos)
{
	if (typeof(yld_mgr.place_ad_here) != "undefined")  yld_mgr.place_ad_here(pos);
}


// Injection routines.  Requires explicit injection by modifying the code.
function TNI_INJECT(id, width, height)
{
	styles = "";
	if (typeof width != "undefined" && width != "")  styles += " width: " + width + "px;";
	if (typeof height != "undefined" && height != "")  styles += " height: " + height + "px;";

	document.write('<div style="display: inline;' + styles + '" id="tni_inject_' + id + '"></div>');
}

function TNI_PREWRAP(id)
{
	document.write('<div id="tni_preinject_' + id + '"><div style="display: inline;" id="tni_wrap_' + id + '">');
}

function TNI_POSTWRAP(id)
{
	document.write('</div></div>');
	document.write('<script type="text/javascript">TNI_RELOCATE(\'' + id + '\');</script>\n');
}

function TNI_RELOCATE(id)
{
	div1 = document.getElementById("tni_wrap_" + id);
	div2 = document.getElementById("tni_inject_" + id);

	div3 = div1.parentNode.removeChild(div1);
	div2.appendChild(div3);
}

var TNI__AdPos = [];
var TNI__AdsDumped = 0;
function TNI_OAS_AD(pos)
{
	if (ProcessAdPosition(pos))
	{
		info = GetAdPosInfo(pos);

		TNI_INJECT("OAS_" + pos, info.width, info.height);

		TNI__AdPos[TNI__AdPos.length] = ["OAS_" + pos, TNI_OAS_AD_ACTUAL, { 'pos' : pos }];
	}
}

function TNI_OAS_AD_ACTUAL(data)
{
	OAS_AD(data.pos);
}

function TNI_GOOGLE_AD(client, slot, width, height)
{
	pos = TNI__AdPos.length;

	TNI_INJECT("GOOGLE_" + pos, width, height);

	TNI__AdPos[TNI__AdPos.length] = ["GOOGLE_" + pos, TNI_GOOGLE_AD_ACTUAL, { 'client' : client, 'slot' : slot, 'width' : width, 'height' : height }];
}

function TNI_GOOGLE_AD_ACTUAL(data)
{
	GOOGLE_AD(data.client, data.slot, data.width, data.height);
}

function TNI_AD_SCRIPTS()
{
	if (TNI__AdPosProcessed)  document.write('<script type="text/javascript" src="http://e.yieldmanager.net/script.js"></script>');
}

function TNI_AD_PREWRAP()
{
	if (TNI__AdsDumped >= TNI__AdPos.length)  return;

	TNI_PREWRAP(TNI__AdPos[TNI__AdsDumped][0]);
}

function TNI_AD_RUN()
{
	if (TNI__AdsDumped >= TNI__AdPos.length)  return;

	TNI__AdPos[TNI__AdsDumped][1](TNI__AdPos[TNI__AdsDumped][2]);
}

function TNI_AD_POSTWRAP()
{
	if (TNI__AdsDumped >= TNI__AdPos.length)  return;

	TNI_POSTWRAP(TNI__AdPos[TNI__AdsDumped][0]);
	TNI__AdsDumped++;
}


// Miscellaneous routines to make life simpler.
var __IFrameList = new Array();

function OAS_IFRAME_AD(pos, width, height)
{
	__IFrameList.push('OAS_POS_' + pos);
	document.write('<iframe id="OAS_POS_' + pos + '" src="http://www.tucson.com/includes/iframe_ads.php?page=' + escape(OAS_sitepage) + '&pos=' + pos + '" width="' + width + '" height="' + height + '" frameborder="0" scrolling="no"></iframe>\n');
}

function STATS_IFRAME()
{
	__IFrameList.push('STATS_IFRAME');
	document.write('<iframe id="STATS_IFRAME" src="http://www.tucson.com/includes/iframe_stats.php?section=' + escape(stats.section) +'&category=' + escape(stats.category) + '&subsection1=' + escape(stats.subsection1) + '" width="0" height="0" frameborder="0" scrolling="no"></iframe>\n');
}

function ReloadAdsAndStatsIframes()
{
	for (x in __IFrameList)
	{
		Frame = document.getElementById(__IFrameList[x]);
		if (Frame)  Frame.src = Frame.src;
	}
}

google_ad_client = '';
google_ad_slot = '';
google_ad_width = 1;
google_ad_height = 1;

function GOOGLE_AD(client, slot, width, height)
{
	google_ad_client = client;
	google_ad_slot = slot;
	google_ad_width = width;
	google_ad_height = height;
	document.write('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>\n');
}
