adsonar_pid = 305760;
adsonar_zw = 480;
adsonar_zh = 200;
adsonar_jv= "ads.adsonar.com";

adsonar_ps = null;
qasd_why = "480x200";

winloc = window.location.toString();

// use omniture s_channel to determine what and where i am
if(typeof window.qasd_ww == "undefined" && typeof window.s_channel != "undefined"){
	qasd_what = null;
	qasd_where = null;

// WHAT AM I? // determine whether this page is an article or an index
	if(s_channel.indexOf("Stories") != -1)
		qasd_what = "article"; // siteweaver identified article
	if(s_channel.indexOf("Index") != -1)
		qasd_what = "index"; // siteweaver identified index
	if(qasd_what == null && (winloc.charAt(winloc.length - 1) == "/" || winloc.indexOf("/index.") != -1))
		qasd_what = "index"; // static index
	if(qasd_what == null && winloc.indexOf("?") == -1)
		qasd_what = "article"; // non-query (static) pages that are not index
	if(qasd_what == null && winloc.indexOf("calendar.cjonline.com") != -1)
		qasd_what = "article";

// WHERE AM I? // determine which section this page is in
	if(s_channel.indexOf("News") != -1)
		qasd_where = "news";
	if(s_channel.indexOf("Entertainment") != -1)
		qasd_where = "entertainment"; // don't need to know entertainment for qas_core_rail.js
	if(s_channel.indexOf("Sports") != -1)
		qasd_where = "sports";
	if(s_channel.indexOf("Business") != -1)
		qasd_where = "business";
	if(s_channel.indexOf("Features") != -1)
		qasd_where = "features";
	if(s_channel.indexOf("Celebrations") != -1){
		qasd_where = "celebrations"; qasd_what = "article";
	}
	if(s_channel.indexOf("AP") != -1)
		qasd_where = "ap";
	if(s_channel == "CJOnline:FrontPage")
		qasd_where = "homepage"; // don't need to know homepage for qas_core_rail.js
	if(s_channel.toLowerCase().indexOf("prepzone") != -1){
		qasd_where = "prepzone"; qasd_what = "article";
	}
	if(s_channel.toLowerCase().indexOf("catzone") != -1){
		qasd_where = "catzone"; qasd_what = "article";
	}
	if(s_channel.toLowerCase().indexOf("hawkzone") != -1){
		qasd_where = "hawkzone"; qasd_what = "article";
	}
	if(s_channel == "CJOnline:DailyArchive")
		qasd_where = "news";


	// classifieds
	if(s_channel.indexOf("Classifieds") != -1){
		qasd_where = "classifieds";
		if(winloc.indexOf("classifieds-bin") != -1)
			qasd_what = "article";
		else
			qasd_what = "index";
	}

	if(qasd_where != null && qasd_what != null) qasd_ww = qasd_where + "|" + qasd_what;
	else qasd_ww = null;
}

// this code will only include adsonar_ps combinations appropriate for THIS position
// qas_core_rightrail = 160x600 under MaxAd (articles and indexes)
// qas_core_storyfoot = 480x276 above copyright (articles ONLY)
if(typeof window.qasd_ww != "undefined" && qasd_ww != null){
	switch(qasd_ww){
		case "news|article": adsonar_pid = 305760; adsonar_ps = 733673; break;
		case "business|article": adsonar_pid = 305763; adsonar_ps = 735670; break;
		case "sports|article": adsonar_pid = 305757; adsonar_ps = 736673; break;
		case "features|article": adsonar_pid = 306757; adsonar_ps = 736667; break;
		case "60miles|article": adsonar_pid = 306757; adsonar_ps = 736667; break;
		case "entertainment|article":adsonar_pid = 305761; adsonar_ps = 736676; break;
		case "classifieds|article": adsonar_pid = 305758; adsonar_ps = 785669; break;
		case "ap|article": adsonar_pid = 305760; adsonar_ps = 789685; break;
		case "prepzone|article": adsonar_pid = 305757; adsonar_ps = 878668; break;
		case "catzone|article": adsonar_pid = 305757; adsonar_ps = 878670; break;
		case "hawkzone|article": adsonar_pid = 305757; adsonar_ps = 878672; break;
		case "celebrations|article": adsonar_pid = 305764; adsonar_ps = 878674; break;
		default: break;
	}
}

if(typeof window.qasd_report == "undefined") qasd_report = "";
qasd_report += "\n\n" + qasd_why;
if(adsonar_ps != null)
	qasd_report += "\nhere i am: " + (qasd_ww.split("|").join(", ")) + " - and i will deliver ads now.\nadsonar_pid = " + adsonar_pid + "\nadsonar_ps = " + adsonar_ps;
else qasd_report += "\ni do not know where i am" + (qasd_what?("\nqasd_what = " + qasd_what):"") + (qasd_where?("\nqasd_where = " + qasd_where):"");

if(adsonar_ps != null){
	document.write("<scr" + "ipt type=\'text\/javascript\' src=\'http://js.adsonar.com/js/adsonar.js\'><\/scr" + "ipt>");
}

