
var currentEdition = "20050106"

//Declare pageName if it is not done already
if (typeof pageName == 'undefined') {
 pageName = "";
}


//Get the path(URL) to the current file
var temp = location.pathname
temp = temp.toLowerCase();
	//set news props
	if (temp.indexOf("/news") != -1) {
		prop6 = "news"
		//set prop7
		if (pageName.indexOf("Local News Index") != -1) {
			prop7 = "news_front"
		}
		else if ((temp.indexOf("/topstories/") != -1) || (temp.indexOf("/localnews/") != -1)) {
			prop7 = "local_news"
		}
		else if (temp.indexOf("/localsports") != -1) {
			prop7 = "sports"
		}
		else if (temp.indexOf("/nationworld") != -1) {
			prop7 = "nation_world"
		}
		else if (temp.indexOf("/obituaries") != -1) {
			prop7 = "obituaries"
		}
		else if (temp.indexOf("/opinion") != -1) {
			prop7 = "opinion"
		}
		else if ((temp.indexOf("/lifestyle") != -1)  || (temp.indexOf("/neighbors/") != -1)){
			prop7 = "lifestyle"
		}
		else if (temp.indexOf("/e/") != -1) {
			prop7 = "technology"
		}
		else if (temp.indexOf("/weathernews") != -1) {
			prop7 = "weather"
		}
		else if ((temp.indexOf("/occasions") != -1) ||  (temp.indexOf("/announcements") != -1) ||  (temp.indexOf("/celebrations") != -1)) {
			prop7 = "announcements"
		}
		else if (temp.indexOf("/space") != -1) {
   prop6="news"
			prop7 = "space"
		}
	}

//set entertainment props
	else if (temp.indexOf("/entertainment") != -1 || (temp.indexOf("/fe/") != -1)) {
		prop6 = "entertainment_tourism"
		//set prop7
		if((pageName.indexOf("Entertainment Index") != -1) || pageName.indexOf("entertainment front") != -1) {
		    prop7="entertainment_front"
      prop1="ent front: " + temp;
		}
		else if (temp.indexOf("/calendar") != -1) {
			prop7 = "calendar"
		}
		else if (temp.indexOf("/comics") != -1) {
			prop7 = "entertainment"
		}
	else if (temp.indexOf("/movies") != -1) {
			prop7 = "movies"
		}
		else if (temp.indexOf("/dining") != -1) {
			prop7 = "dining"
		}
		else if ((temp.indexOf("/attractions") != -1)  || (temp.indexOf("/events") != -1) || (temp.indexOf("/transportation") != -1) || (temp.indexOf("/wineries") != -1) || (temp.indexOf("/casinos") != -1)) {
			prop7 = "tourism"
		}
		else if ((temp.indexOf("/recreation") != -1) || (temp.indexOf("/golf") != -1) || (temp.indexOf("/water") != -1) || (temp.indexOf("/hiking") != -1) || (temp.indexOf("/skiing") != -1) || (temp.indexOf("/parks") != -1) || (temp.indexOf("/golf") != -1)) {
			prop7 = "recreation"
		}
		else if ((temp.indexOf("/concert") != -1) || (temp.indexOf("/event") != -1) || (temp.indexOf("/exhibit") != -1) || (temp.indexOf("/theater") != -1) || (temp.indexOf("/arts") != -1) || (temp.indexOf("/culturalevents") != -1)) {
			prop7 = "art"
		}
		else if ((temp.indexOf("/clubs") != -1) || (temp.indexOf("/music") != -1)) {
			prop7 = "music"
		}
		//retail props
		else if ((temp.indexOf("lodging") != -1) ||  (temp.indexOf("retail") != -1)){
		  prop6="retail";
		  prop7="directories";
		
		}
	}

//Set the s_code just in case it is not set elsewhere on the page.
s_code=' '


//Edition is only defined for daily news (in XTQ template) so we need to check here and set it to currentEdition, otherwise all non-daily news sections will have prop6 = archive.
//currentEdition is also defined in XTQ
if (typeof currentEdition == 'undefined') {
		   currentEdition = "";
		}
if (typeof edition == 'undefined') {
		   edition = currentEdition;
		}

	
		//Change the prop6, prop7 if the page is in the archive. Edition is set in XTQ on each html page
		if ((edition != currentEdition) && (prop6 != "entertainment_tourism")) {
				//trying to find an error
				//prop1 = "Edition: " + edition + ' Current Edition: ' + currentEdition + " " + prop6 + " " + prop7	
				prop6  = "archives"
				prop7 = "free_archives"
				if ((pageName.indexOf(edition) == -1) && (pageName != "")) {
					pageName = edition + " - " + pageName
				}
				if(pageName != "") {
					pageName = "Free Archive - " + pageName
				}

		}