// dojo.require("dojo.io.cookie");
	/*
	
		To Use:
			To add or change an entry.
				$SCData( [name], [value] );
			To remove an entry.
				$SCData( [name], null );
			To get and entry value.
				$SCData( [name] );
	
		ls values (Login Success)
			0 = failed
			1 = sucess
			
		utype values (User Type)
			0 = Anonymous
			1 = Member (LFM)
			2 = Subscriber (NAPSTER)
			3 = NTG

		rs values (Registration Source)
			0 = Explicit
			1 = Play
			2 = Buy
			3 = NapsterLink
			4 = Removed
			5 = Error (Signin)
			6 = Error (Registration)
			
		ref values (Referral Sites)
			0 = NapsterLink
			1 = Media Defender
			3 = Other
			
		ter values (Territory)
			0 = US
			1 = GB
			2 = CA
			3 = DE
			4 = JP
			5 = Other
	*/
	if(document.location.hostname.indexOf("napster.com") > -1) {
		document.writeln( '<sc' + 'ript language="JavaScript1.2" type="text/javascript" src="/js/s_code_remote_H14.js"></' + 'script>' );
	} else {
		document.writeln( '<sc' + 'ript language="JavaScript1.2" type="text/javascript" src="http://home.gb.napster.com/js/s_code_remote_H14.js"></' + 'script>' );
	}
	var objSCData = new Object();

	objSCData['utype'] = new Array();
	objSCData['utype'][0] = 'Anonymous';
	objSCData['utype'][1] = 'LFM';
	objSCData['utype'][2] = 'Napster Subscriber';
	objSCData['utype'][3] = 'NTG Subscriber';
	
	objSCData['rs'] = new Array();
	objSCData['rs'][0] = 'Explicit';
	objSCData['rs'][1] = 'Play';
	objSCData['rs'][2] = 'Buy';
	objSCData['rs'][3] = 'NapsterLink';
	objSCData['rs'][4] = '';
	objSCData['rs'][5] = 'Error (Signin)';
	objSCData['rs'][6] = 'Error (Registration)';
	
	objSCData['ref'] = new Array();
	objSCData['ref'][0] = 'NapsterLink';
	objSCData['ref'][1] = 'Media Defender';
	objSCData['ref'][3] = 'Other';
	
	objSCData['ter'] = new Array();
	objSCData['ter'][0] = 'US';
	objSCData['ter'][1] = 'GB';
	objSCData['ter'][2] = 'CA';
	objSCData['ter'][3] = 'DE';
	objSCData['ter'][4] = 'JP';
	objSCData['ter'][5] = 'All Other';
	
	var FWSupportedCountries = new Object();
	FWSupportedCountries['US'] = true;
	FWSupportedCountries['GB'] = false;
	FWSupportedCountries['CA'] = false;
	FWSupportedCountries['DE'] = false;
	FWSupportedCountries['JP'] = false;

	var TerritoryMap = new Object();
	TerritoryMap['US'] = 0;
	TerritoryMap['GB'] = 1;
	TerritoryMap['CA'] = 2;
	TerritoryMap['DE'] = 3;
	TerritoryMap['JP'] = 4;
	TerritoryMap['Other'] = 5;
	
	var UserTypeMap = new Object();
	UserTypeMap['LFM'] = 1;
	UserTypeMap['SUB'] = 2;
	UserTypeMap['NTG'] = 3;

	var EventMap = new Object();
	EventMap['ContentAction'] = 'event1';
	EventMap['Click'] = 'event2';
	EventMap['Sign-In Completion'] = 'event3';
	EventMap['Registration Completion'] = 'event4';
	EventMap['HypermoduleClicks'] = 'event2';

	var GenreNameMap = new Array();
	GenreNameMap[0] = 'All Music';
	GenreNameMap[1] = 'Alternative';
	GenreNameMap[10] = 'Americana';
	GenreNameMap[2] = 'Blues';
	GenreNameMap[3] = 'Childrens Music';
	GenreNameMap[4] = 'Christian/Gospel';
	GenreNameMap[5] = 'Classical';
	GenreNameMap[6] = 'Comedy/Spoken Word';
	GenreNameMap[7] = 'Country';
	GenreNameMap[9] = 'Easy Listening';
	GenreNameMap[8] = 'Electronica';
	GenreNameMap[11] = 'Hip-Hop/Rap';
	GenreNameMap[13] = 'Jazz';
	GenreNameMap[14] = 'Latin';
	GenreNameMap[15] = 'New Age';
	GenreNameMap[16] = 'Pop';
	GenreNameMap[17] = 'R and B';
	GenreNameMap[19] = 'Rock';
	GenreNameMap[20] = 'Soundtracks';
	GenreNameMap[22] = 'World/Reggae';

	var MemberBrowseMap = new Object();
	MemberBrowseMap['track'] = new Object();
	MemberBrowseMap['track']['all'] = 'Track Listing';
	MemberBrowseMap['track']['playlist'] = 'Playlist Detail';
	MemberBrowseMap['track']['album'] = 'Album Detail';
	MemberBrowseMap['artist'] = new Object();
	MemberBrowseMap['artist']['all'] = 'Artists';
	MemberBrowseMap['album'] = new Object();
	MemberBrowseMap['album']['artist'] = 'Album Listing';
	MemberBrowseMap['playlist'] = new Object();
	MemberBrowseMap['playlist']['all'] = 'Playlist Listing';

	var SearchSubSegMap = new Object();
	SearchSubSegMap['toptracks'] = 'explore';
	SearchSubSegMap['topalbums'] = 'explore';
	SearchSubSegMap['topartists'] = 'explore';
	SearchSubSegMap['artistbyletter'] = 'explore';
	SearchSubSegMap['billboard'] = 'explore';
	SearchSubSegMap['videosbyletter'] = 'explore';
	SearchSubSegMap['artist'] = 'search';
	SearchSubSegMap['album'] = 'search';
	SearchSubSegMap['track'] = 'search';
	SearchSubSegMap['all'] = 'search';
	SearchSubSegMap['member'] = 'search';
	SearchSubSegMap['artisttracks'] = 'artist';
	SearchSubSegMap['artistalbum'] = 'artist';
	SearchSubSegMap['artistvideos'] = 'artist';
	SearchSubSegMap['albumtracks'] = 'artist';
	SearchSubSegMap['recommends'] = 'artist';
	SearchSubSegMap['allplaylist'] = 'explore';
	SearchSubSegMap['memberbrowse'] = 'member';

	var SearchSectionMap = new Object();
	SearchSectionMap['artist'] = "artists";
	SearchSectionMap['album'] = "albums";
	SearchSectionMap['track'] = "tracks";
	SearchSectionMap['all'] = "all fields";
	SearchSectionMap['member'] = "members";
	SearchSectionMap['artisttracks'] = "content";
	SearchSectionMap['artistalbum'] = "albums";
	SearchSectionMap['artistvideos'] = "videos";
	SearchSectionMap['albumtracks'] = "tracks";
	SearchSectionMap['recommends'] = "other members like";
	SearchSectionMap['toptracks'] = "top 100 tracks";
	SearchSectionMap['topalbums'] = "top 100 albums";
	SearchSectionMap['topartists'] = "top 100 artists";
	SearchSectionMap['videosbyletter'] = "music videos";
	SearchSectionMap['billboard'] = "billboard charts";
	SearchSectionMap['artistbyletter'] = "browse by artist";
	SearchSectionMap['allplaylist'] = "playlists"; // '"Playlists - Browse " + (SCqueryObj.select_by == "all" ? "All Playlists" : document.getElementById("playlistHeader").getElementsByTagName("h2")[0].innerHTML)';
	SearchSectionMap['memberbrowse'] = "member browse";
	/*** OLD ***/
	// SearchSectionMap['allplaylist'] = '"Playlists - Browse " + (SCqueryObj.select_by == "all" ? "All Playlists" : document.getElementById("playlistHeader").getElementsByTagName("h2")[0].innerHTML)';

	var SearchSpecialEvaluators = new Object();

	SearchSpecialEvaluators['artist'] = '$SUBSECTION+=" results"; try{s.prop8=document.getElementById("searchHeader").getElementsByTagName("div")[0].getElementsByTagName("h2")[0].getElementsByTagName("span")[0].innerHTML.toLowerCase();}catch(e){}';
	SearchSpecialEvaluators['album'] = '$SUBSECTION+=" results"; try{s.prop8=document.getElementById("searchHeader").getElementsByTagName("div")[0].getElementsByTagName("h2")[0].getElementsByTagName("span")[0].innerHTML.toLowerCase()}catch(e){}';
	SearchSpecialEvaluators['track'] = '$SUBSECTION+=" results"; try{s.prop8=document.getElementById("searchHeader").getElementsByTagName("div")[0].getElementsByTagName("h2")[0].getElementsByTagName("span")[0].innerHTML.toLowerCase()}catch(e){}';
	SearchSpecialEvaluators['all'] = '$SUBSECTION+=" results"; try{s.prop8=document.getElementById("searchHeader").getElementsByTagName("div")[0].getElementsByTagName("h2")[0].getElementsByTagName("span")[0].innerHTML.toLowerCase()}catch(e){}';
	SearchSpecialEvaluators['member'] = '$SUBSECTION+=" results"; try{s.prop8=document.getElementById("searchHeader").getElementsByTagName("div")[0].getElementsByTagName("h2")[0].getElementsByTagName("span")[0].innerHTML.toLowerCase()}catch(e){}';
	SearchSpecialEvaluators['billboard'] = '$SUBSECTION+=(":"+document.getElementById("chartName").innerHTML)';
	SearchSpecialEvaluators['artistbyletter'] = '$SUBSECTION=$CHANNEL+":"+((SCqueryObj.select_value == "00" || SCqueryObj.select_value == "0")?"home":("genre:" + getGenreName(SCqueryObj.select_value)))+":browse by artist letter " + SCqueryObj.filter_value.toLowerCase()';
	SearchSpecialEvaluators['allplaylist'] = '$SUBSECTION=$CHANNEL+":"+((SCqueryObj.select_value == "00" || SCqueryObj.select_value == "0")?"home":((SCqueryObj.select_by=="genre")?("genre:" + getGenreName(SCqueryObj.select_value)):("category:" + SCqueryObj.select_value))); s.prop5_temp="playlists:"+((SCqueryObj.select_value == "00" || SCqueryObj.select_value == "0")?"all":SCqueryObj.select_by)';
	SearchSpecialEvaluators['artisttracks'] = '$SUBSECTION=$CHANNEL+":tracks listing"; s.prop2_temp = document.getElementById("artistHeaderListing").getElementsByTagName("h2")[0].innerHTML';
	SearchSpecialEvaluators['artistalbum'] = 's.prop2_temp = document.getElementById("artistHeaderListing").getElementsByTagName("h2")[0].innerHTML';
	SearchSpecialEvaluators['artistvideos'] = 's.prop2_temp = document.getElementById("artistHeaderListing").getElementsByTagName("h2")[0].innerHTML';
	SearchSpecialEvaluators['albumtracks'] = 's.prop2_temp = document.getElementById("scArtistName").innerHTML; s.prop6_temp = document.getElementById("albumHeader").getElementsByTagName("h2")[0].getElementsByTagName("em")[0].innerHTML';
	SearchSpecialEvaluators['recommends'] = 's.prop2_temp = document.getElementById("scArtistName").innerHTML; s.prop6_temp = document.getElementById("albumHeader").getElementsByTagName("h2")[0].getElementsByTagName("em")[0].innerHTML';

function getCookieHash(cookieName) {
	var results = new Array();
	var cookie = dojo.io.cookie.getCookie(cookieName);
	if (cookie != null && cookie.length > 0) {
		var names = cookie.split("&");

		for (var i = 0; i < names.length; i += 2) {
			results[unescape(names[i])] = unescape(names[i + 1]);
		}
	}

	return results;
}

var SDAT = getCookieHash('SDAT');
var purchaseInfo = getCookieHash('PURCHASEINFO');

	var $SCData = function(){
		if( arguments[0] != null ){
			var strSCDName = arguments[0];
			var strSCDValue = null;
			if( arguments.length == 2 )
				strSCDValue = arguments[1];
			var strSCCookieData = dojo.io.cookie.getCookie( 'SCD' ) ? dojo.io.cookie.getCookie('SCD') : "";
			if( arguments.length == 1 ){
				var aryDataPairs = strSCCookieData.split( '&' );
				for( intDataIndex = 0; intDataIndex < aryDataPairs.length; intDataIndex++ ){
					var intPosition = aryDataPairs[intDataIndex].indexOf('=');
					if( intPosition == -1 ) continue;
					var strDataName = aryDataPairs[intDataIndex].substring( 0, intPosition );
					var strDataValue = aryDataPairs[intDataIndex].substring( intPosition + 1 );
					if( strDataName == strSCDName ){
						if( objSCData[strDataName] != null )
							return unescape( objSCData[strDataName][strDataValue] );
						else
							return unescape( strDataValue );
					}
				}
			} else if( arguments.length == 2 ){
				var strSCData = '';
				var aryDataPairs = strSCCookieData.split( '&' );
				var objSCD = new Object();
				for( intDataIndex = 0; intDataIndex < aryDataPairs.length; intDataIndex++ ){
					var intPosition = aryDataPairs[intDataIndex].indexOf('=');
					if( intPosition == -1 ) continue;
					var strDataName = aryDataPairs[intDataIndex].substring( 0, intPosition );
					var strDataValue = aryDataPairs[intDataIndex].substring( intPosition + 1 );
					objSCD[strDataName] = unescape( strDataValue );
				}
				objSCD[strSCDName] = strSCDValue;
				for( var strValues in objSCD ){
                                        if (strValues.indexOf('toSource') > -1) continue;
					if( objSCD[strValues] != null && objSCD[strValues] != 'null' )
						strSCData += "&" + strValues + '=' + escape( objSCD[strValues] );
                                }
				strSCData = strSCData.substring( 1 );
				dojo.io.cookie.setCookie('SCD',strSCData,365,'/','.napster.com',0);
			}
		}
	}


	
	if( location.search.indexOf( 'debug=sc' ) > -1 )
		$SCData( 'debug', true );
	
	if( typeof( $SCData( 'r' ) ) == 'undefined' )
		$SCData( 'r', 0 );
	
	var NUID = "";
	
	if( (dojo.io.cookie.getCookie( 'CLID' ) || dojo.io.cookie.getCookie( 'NUID')) && $SCData( 'r' ) == 0 ) {
		$SCData( 'r', 1 );
	}
	
	if(dojo.io.cookie.getCookie('NUID')) {
		NUID = dojo.io.cookie.getCookie('NUID');
	}
	
	if( typeof( $SCData( 'utype' ) ) == 'undefined' ){
		$SCData( 'utype', 0 );
		var objDate = new Date();
		$SCData( 'time', ( objDate.getTime() / 1000 ) );
	} else{
		if( dojo.io.cookie.getCookie( 'SL' ) == null || dojo.io.cookie.getCookie( 'SL' ) == '' ) {
			// look for necessary SDAT values
			if(SDAT) {
				var calcSub = SDAT['LFM'] == 'Y' ? 'LFM' : (SDAT['JANUS'] == 'N' ? 'SUB' : 'NTG');
				$SCData( 'utype', UserTypeMap[calcSub] );
			} else {
				$SCData( 'utype', 0 );
			}
		} else {
			$SCData( 'utype', UserTypeMap[dojo.io.cookie.getCookie( 'SL' )] );
		}
	}
	
	if( typeof( FWSupportedCountries[dojo.io.cookie.getCookie( 'COUNTRYCODE' )] ) == 'undefined' )
		$SCData( 'ter', TerritoryMap['Other'] )
	else
		$SCData( 'ter', TerritoryMap[dojo.io.cookie.getCookie( 'COUNTRYCODE' )] )
	
	function IsNewUser(){
		var intTime = ( $SCData( 'time' ) * 1000 ) + 864000;
		var objDate = new Date();
		var intNowTime = objDate.getTime();
		if( intNowTime < intTime )
			return "New";
		else
			return "Returning";
	}

	/*
		s_channel = {channel of page}
		s_prop1 = {subsection of page - blank if none}
		s_prop2 = {identifying variables for the particular page [i.e. if it's an artist page, put the artist name here,
					browse - put the browse genre name here]}
		s_prop3 = {subscription level, stored in the SL cookie - we're looking for "visitor", "web user" (LFM), or
					"subscriber", so translate cookie value as necessary}
	*/

	function getGenreName(gid) {
		if(typeof (gid) != 'undefined' && gid != 'all') {
			gid = gid - 0;
			genreName = "";
			try { genreName = GenreNameMap[gid].toLowerCase(); } catch(e) {}
			return genreName;
		} else {
			return "main";
		}
	}

	function getSearchSection(tid) {
		tid = tid.toLowerCase();
		// redefine this every time - needs to be a global for access by other functions
		ChannelBase = isClient() ? 'client' : 'web';
		if(SearchSpecialEvaluators[tid]) {
			var searchEval = eval(SearchSpecialEvaluators[tid]);
		}
		var SubSectionName = SearchSectionMap[tid];
		return SubSectionName;
	}

	var channelOverrides = new Object();
	//channelOverrides['ns/registration'] = 'Registration';
	channelOverrides['ns/login'] = 'Registration';
	channelOverrides['devices'] = 'Company Pages';


	function chOverride(path) {
		// override channel if our path matches
		for(i in channelOverrides) {
			if(path.indexOf(i) > -1) {
				s.channel = channelOverrides[i];
				continue;
			}
		}
	}


	var objChannels = new Object();
	objChannels['frameset'] = ['explore','','frameset'];
	objChannels['ns/home'] = ['explore','','']; //getGenreName(SCqueryObj.genre_id)
	objChannels['ns/videos'] = ['Music Videos','Music Videos - Main' ];
	objChannels['ns/videos/player.html'] = ['Video Player','Video Player - Play' ];
	objChannels['ns/playlists'] = ['Playlists','Playlists - Main' ];
	// objChannels['cgi-bin/featuresXML'] = ['Web App','"New Releases - " + getGenreName(SCqueryObj.select_value)'];
	objChannels['cgi-bin/featuresXML'] = ['explore','',''];
	objChannels['ns/execs/new_releases.html'] = ['explore','','new releases'];
	objChannels['ns/execs/staff_picks.html'] = ['explore','','staff picks'];
	objChannels['cgi-bin/searchXML'] = ['','',''];
	objChannels['ns/search/browse.html'] = ['','',''];
	objChannels['ns/search/chart.html'] = ['explore','billboard charts',''];
	objChannels['ns/search/recent.html'] = ['my library','content','' ];
	objChannels['cgi-bin/radioXML'] = ['Radio','"Radio - " + (SCqueryObj.select_by == \'all\' ? "Main" : getGenreName(SCqueryObj.select_value))'];
	objChannels['ns/execs/radio.html'] = ['Radio','"Radio - " + (SCqueryObj.select_by == \'all\' ? "Main" : getGenreName(SCqueryObj.select_value))'];
	objChannels['cgi-bin/playlistXML'] = ['','',''];
	objChannels['ns/execs/playlist.html'] = ['playlists','detail',''];
	objChannels['ns/view/artist'] = ['artist','','home'];
	objChannels['ns/view/artist/bio.html'] = ['artist','','bio'];
	objChannels['ns/view/album'] = ['artist','album detail:',''];
	objChannels['ns/view/album/review.html'] = ['artist','album detail:','review'];
	objChannels['player'] = ['player','content',''];
	objChannels['ns/login'] = ['signin','',''];
	objChannels['ns/login/forgot_password.html'] = ['signin','forgot password'];
	objChannels['ns/login/napsterlink_login.html'] = ['Sign In','Sign In - Napsterlink Sign In'];
	objChannels['ns/share'] = ['Napsterlinks','Napsterlinks - Share Page' ];
	objChannels['ns/share/send_music.html'] = ['Napsterlinks','Napsterlinks - Email Sent Confirmation' ];
	objChannels['ns/account/accountstatus.html'] = ['My Account','My Account - Account Status' ];
	objChannels['ns/account/payment_information.html'] = ['My Account','My Account - Payment Information' ];
	objChannels['ns/account/request_billing_history.html'] = ['My Account','My Account - Request Billing History' ];
	objChannels['ns/account/change_membership.html'] = ['My Account','My Account - Change Membership' ];
	objChannels['ns/account/redeem_cards_codes.html'] = ['My Account','My Account - Redeem Cards and Codes' ];
	objChannels['ns/account/manage_pcs.html'] = ['My Account','My Account - Manage My PCs' ];
	objChannels['ns/account/manage_devices.html'] = ['My Account','My Account - Manage My Devices' ];
	objChannels['ns/account/preferences.html'] = ['My Account','My Account - Preferences' ];
	objChannels['info/terms.html'] = ['Help','Help - Terms and Conditions' ];
	objChannels['info/privacypolicy.html'] = ['Help','Help - Privacy Policy' ];
	objChannels['tutorial/one_sheet.html'] = ['Help','Help - Tutorial' ];
	objChannels['devices'] = ['Devices and More','Devices and More landing page' ];
	objChannels['devices/compatible_devices.html'] = ['Devices and More','Compatible Devices' ];
	objChannels['devices/non_ntg_compatible.html'] = ['Devices and More','Non-NTG Compatible Devices' ];
	objChannels['devices/living_room.html'] = ['Devices and More','Napster In The Living Room' ];
	objChannels['devices/napstermobile.html'] = ['Devices and More','Napster Mobile' ];
	objChannels['devices/special_offers.html'] = ['Napster Web - Special Offer','Special Offers' ];
	objChannels['MyLibrary/AllTracks'] = ['my library','content','all tracks' ];
	objChannels['MyLibrary/RecentlyPlayed'] = ['my library','content','recently played'];
	objChannels['MyLibrary/RecentlyAdded'] = ['my library','content','recently added'];
	objChannels['MyLibrary/Album'] = ['Library','Library - Album' ];
	objChannels['MyLibrary/Playlist'] = ['Library','Library - Playlists' ];
	objChannels['GB/en/ns/registration/promo_code/redeem.html'] = ['Promo Code','Registration 1 - Redeem Cards and Codes' ];
	objChannels['GB/en/ns/registration/promo_code/illegal_transition.html'] = ['Promo Code','Registration 1 - Illegal Transition' ];
	objChannels['GB/en/ns/registration/promo_code/cancel.html'] = ['Promo Code','Registration 2 - Cancel Billing Info' ];
	objChannels['GB/en/ns/registration/promo_code/add_payment_info.html'] = ['Promo Code','"Registration 2 - Enter Billing Info " + (SCqueryObj.payment_method == \'paypal\'? "PP" : "CC")' ];
	objChannels['GB/en/ns/registration/promo_code/confirmation_cancel.html'] = ['Promo Code','Registration 3 - Cancellation Confirmation' ];
	objChannels['GB/en/ns/registration/promo_code/confirmation.html'] = ['Promo Code','"Registration 3 - " + ($SCData(\'utype\').indexOf(\'NTG\') > -1 ? "DL NTG Trial" : "DL Trial")' ];
	objChannels['GB/en/ns/registration/upgrade/ntg_verify.html'] = ['Subscription Upgrade Flow','Upgrade - Verify NTG Option' ];
	objChannels['GB/en/ns/registration/upgrade/cancel.html'] = ['Subscription Upgrade Flow','Upgrade - Cancel Billing Info' ];
	objChannels['GB/en/ns/registration/upgrade/confirmation_cancel.html'] = ['Subscription Upgrade Flow','Upgrade - Cancellation Confirmation' ];
	objChannels['GB/en/ns/registration/upgrade/confirmation.html'] = ['Subscription Upgrade Flow','"Upgrade - " + ($SCData(\'utype\').indexOf(\'NTG\') > -1 ? "DL NTG Trial" : "DL Trial")' ];
	objChannels['GB/en/ns/registration/upgrade/add_payment_info.html'] = ['Subscription Upgrade Flow','"Upgrade - Enter Billing Info " + (SCqueryObj.payment_method == \'paypal\'? "PP" : "CC")' ];
	objChannels['GB/en/ns/registration/standard/create_account.html'] = ['registration','membership:','standard' ];
	objChannels['GB/en/ns/registration/standard/create_account_cancel.html'] = ['Free Trial Registration Flow','Registration 1 - Cancel Create Member Name' ];
	objChannels['GB/en/ns/registration/standard/cancel.html'] = ['Free Trial Registration Flow','Registration 2 - Cancel Billing Info' ];
	objChannels['GB/en/ns/registration/standard/confirmation_lfm.html'] = ['Free Trial Registration Flow','Registration 3 - LFM Account Confirmation' ];
	objChannels['GB/en/ns/registration/standard/confirmation.html'] = ['registration','thankyou:','"standard:" + ($SCData(\'utype\').indexOf(\'NTG\') > -1 ? "ntg 7day trial" : "naps 7day trial")' ];
	objChannels['GB/en/ns/registration/standard/add_payment_info.html'] = ['registration','billinginfo:','"standard:" + (SCqueryObj.payment_method == \'paypal\'? "paypal" : "cc")' ];
	objChannels['GB/en/ns/registration/standard/upsell/trackpack.html'] = ['registration','membership:','standard' ];
	objChannels['GB/en/ns/registration/standard/upsell/trackpack_verify.html'] = ['registration','membership:','standard' ];
	objChannels['GB/en/ns/registration/standard/upsell/trackpack_confirm.html'] = ['registration','membership:','standard' ];
	objChannels['GB/en/ns/registration/standard/upsell/trackpack_purchase.html'] = ['registration','membership:','standard' ];
    objChannels['GB/en/ns/registration/standard/save/offer.html'] = ['registration','membership:','standard' ];
    objChannels['GB/en/ns/registration/standard/save/add_payment_info.html'] = ['registration','billinginfo:','"standard:" + (SCqueryObj.payment_method == \'paypal\'? "paypal" : "cc")' ];




	objChannels['GB/en/ns/registration/bundle/agree_terms.html'] = ['Bundle Registration Flow','Registration 2 - Agree To Bundle Terms' ];
	objChannels['GB/en/ns/registration/bundle/login.html'] = ['Bundle Registration Flow','Registration 1 - Login Existing User' ];
	objChannels['GB/en/ns/registration/bundle/create_account.html'] = ['Bundle Registration Flow','Registration 1 - Create Member Name' ];
	objChannels['GB/en/ns/registration/bundle/create_account_cancel.html'] = ['Bundle Registration Flow','Registration 1 - Cancel Create Member Name' ];
	objChannels['GB/en/ns/registration/bundle/cancel.html'] = ['Bundle Registration Flow','Registration 2 - Cancel Billing Info' ];
	objChannels['GB/en/ns/registration/bundle/confirmation_lfm.html'] = ['Bundle Registration Flow','Registration 3 - LFM Account Confirmation' ];
	objChannels['GB/en/ns/registration/bundle/confirmation.html'] = ['Bundle Registration Flow','"Registration 3 - " + ($SCData(\'utype\').indexOf(\'NTG\') > -1 ? "DL NTG Trial" : "DL Trial")' ];
	objChannels['GB/en/ns/registration/bundle/add_payment_info.html'] = ['Bundle Registration Flow','"Registration 2 - Enter Billing Info " + (SCqueryObj.payment_method == \'paypal\'? "PP" : "CC")' ];
	objChannels['client/upgrade_info.html'] = ['Help Section','What\'s New Page' ];
	objChannels['marketing/visitor.html'] = ['upsell','landing:','visitor free trial upsell landing page'];
	objChannels['marketing/light_upgrade.html'] = ['upsell','landing:','lfm free trial upsell landing page'];
	
	objChannels['GB/en/ns/purchase/clear/purchase_verify.html'] = ['purchase','verification',''];
	objChannels['GB/en/ns/purchase/clear/purchase_complete.html'] = ['purchase','thankyou',''];
	objChannels['GB/en/ns/purchase/clear/purchase_create_member.html'] = ['purchase','membership',''];
	objChannels['GB/en/ns/purchase/clear/purchase_login.html'] = ['purchase','signin',''];
	objChannels['GB/en/ns/purchase/clear/purchase_payment_info.html'] = ['purchase','billinginfo',''];
	objChannels['GB/en/ns/purchase/clear/purchase_payment_info_cc.html'] = ['purchase','billinginfo',''];
	objChannels['GB/en/ns/purchase/clear/purchase_payment_info_paypal.html'] = ['purchase','billinginfo',''];
	objChannels['GB/en/ns/purchase/clear/purchase_unavailable.html'] = ['purchase','unavailable',''];
	objChannels['GB/en/ns/purchase/clear/purchase_promo_code_input.html'] = ['purchase','promocode',''];
	objChannels['GB/en/ns/purchase/clear/purchase_promo_code_validate.html'] = ['purchase','promocode',''];

	objChannels['GB/en/ns/purchase/clear/inpage'] = ['purchase','verification',''];
	objChannels['GB/en/ns/purchase/clear/inpage/purchase_complete.html'] = ['purchase','thankyou',''];
	objChannels['GB/en/ns/purchase/clear/inpage/purchase_promo_code_input.html'] = ['purchase','promocode',''];
	objChannels['GB/en/ns/purchase/clear/inpage/purchase_promo_code_validate.html'] = ['purchase','promocode',''];
	
	objChannels['ns/registration/offer/create_account.html'] = ['registration','membership',':promoredeem:Dell free year+60' ];
	objChannels['ns/registration/offer/confirmation.html'] = ['registration','thankyou',':promoredeem:bel sub Dell free year+60' ];
	
	var objSpecialEvaluators = new Object();
	objSpecialEvaluators['ns/registration/offer/create_account.html'] = 's.prop5_temp="registration:promoredeem"; if( $SCData( \'rs\' ) != null && $SCData( \'rs\' ) != \'\' ){s.eVar6 = $SCData( \'rs\' )}';

    objSpecialEvaluators['ns/registration/offer/confirmation.html'] = 's.channel= "confirmationBellagioDellpromofreeyear+60";s.prop1="confirmationBellagioDellpromofreeyear+60";s.prop5_temp = "confirmationBellagioDellpromofreeyear+60";if(!(SCqueryObj.source && SCqueryObj.source=="inPageReg")){ s.events_temp="event11"; s.eVar18_temp = (document.getElementById("scErrorType") ? document.getElementById("scErrorType").innerHTML : "");}';
	
	objSpecialEvaluators['frameset'] = 'setCampaignVars();';
	objSpecialEvaluators['GB/en/ns/home'] = 's.prop1 = $CHANNEL + ":" + ((SCqueryObj.genre_id == "00" || SCqueryObj.genre_id == "0")?"home":("genre:" + getGenreName(SCqueryObj.genre_id)));$SUBSECTION = s.prop1 + ":main";s.prop5_temp = "explore:genres";';
	objSpecialEvaluators['GB/en/ns/login'] = '$SUBSECTION+="main"; s.prop5_temp="signin:standard"; if( $SCData( \'rs\' ) != null && $SCData( \'rs\' ) != \'\' ){s.eVar6 = $SCData( \'rs\' )}';
	objSpecialEvaluators['cgi-bin/featuresXML'] = 's.prop1 = $CHANNEL + ":" + ((typeof(SCqueryObj.select_value) == "undefined")?"home":("genre:" + getGenreName(SCqueryObj.select_value)));$SUBSECTION = s.prop1 + ((SCqueryObj.type_id == "staffpick")?":staff picks":":new releases"); s.prop5_temp=((SCqueryObj.type_id == "staffpick")?"staff picks":"new releases")+":"+((SCqueryObj.select_value == "00" || SCqueryObj.select_value == "0")?"all":"genre")';
	objSpecialEvaluators['GB/en/ns/execs/new_releases.html'] = 'SCqueryObj.select_value = SCqueryObj.genre_id; SCqueryObj.type_id = "newreleases"; ' + objSpecialEvaluators['cgi-bin/featuresXML'];
	objSpecialEvaluators['GB/en/ns/execs/staff_picks.html'] = 'SCqueryObj.select_value = SCqueryObj.genre_id; SCqueryObj.type_id = "staffpick"; ' + objSpecialEvaluators['cgi-bin/featuresXML'];
	objSpecialEvaluators['GB/en/ns/execs/radio.html'] = '$SUBSECTION = eval($SUBSECTION)';
	objSpecialEvaluators['cgi-bin/searchXML'] = 'scSearchType=(SCqueryObj.type_id ? SCqueryObj.type_id : SCqueryObj.type); $CHANNEL=ChannelBase+SearchSubSegMap[scSearchType.toLowerCase()]; s.channel=$CHANNEL; s.prop1=$CHANNEL + ":" + SearchSectionMap[scSearchType.toLowerCase()]; $SUBSECTION=s.prop1; try{eval(SearchSpecialEvaluators[scSearchType.toLowerCase()]);}catch(e){alert(e.message);}';
	// '$SUBSECTION = s.prop1 + SearchSectionMap[(SCqueryObj.type_id ? SCqueryObj.type_id : SCqueryObj.type)];s.prop5_temp="search:"+SearchSectionMap[(SCqueryObj.type_id ? SCqueryObj.type_id : SCqueryObj.type)];try{s.prop8=document.getElementById("searchHeader").getElementsByTagName("div")[0].getElementsByTagName("h2")[0].getElementsByTagName("span")[0].innerHTML}catch(e){}';
	// objSpecialEvaluators['GB/en/ns/search/browse.html'] =  's.prop1 = SearchSubSegMap[(SCqueryObj.type_id ? SCqueryObj.type_id : SCqueryObj.type)]; $SUBSECTION = getSearchSection((SCqueryObj.type_id ? SCqueryObj.type_id : SCqueryObj.type))';
	objSpecialEvaluators['GB/en/ns/search/browse.html'] = objSpecialEvaluators['cgi-bin/searchXML'];
	// objSpecialEvaluators['GB/en/ns/search/browse.html'] =  'scSearchType=(SCqueryObj.type_id ? SCqueryObj.type_id : SCqueryObj.type); $CHANNEL=ChannelBase+SearchSubSegMap[scSearchType]; s.channel=$CHANNEL; s.prop1=$CHANNEL + ":" + SearchSectionMap[scSearchType]; $SUBSECTION=s.prop1; try{eval(SearchSpecialEvaluators[scSearchType]);}catch(e){alert(e.message);}';
	// objSpecialEvaluators['GB/en/ns/search/chart.html'] =  '$SUBSECTION = getSearchSection(SCqueryObj.type_id)';
	objSpecialEvaluators['GB/en/ns/search/chart.html'] = objSpecialEvaluators['cgi-bin/searchXML'];
	objSpecialEvaluators['GB/en/ns/search/recent.html'] = '$SUBSECTION = $CHANNEL + ":" + (SCqueryObj.type_id == \'played\' ? "recently played" : "recently added")';
	objSpecialEvaluators['player'] = '$SUBSECTION = $CHANNEL + ":main"';
	objSpecialEvaluators['cgi-bin/radioXML'] = '$SUBSECTION = eval($SUBSECTION)';
	// objSpecialEvaluators['cgi-bin/playlistXML'] = '$SUBSECTION = s.prop1 + (SCqueryObj.select_by == \'all\' ? "all playlists listing" : (SCqueryObj.select_by == \'playlist\' ? "detail" : SCqueryObj.select_by + ":" + document.getElementById("playlistHeader").getElementsByTagName("h2")[0].innerHTML))';
	objSpecialEvaluators['cgi-bin/playlistXML'] = 'scSearchType=(SCqueryObj.type_id ? SCqueryObj.type_id : SCqueryObj.type); $CHANNEL=ChannelBase+SearchSubSegMap[scSearchType]; s.channel=$CHANNEL; s.prop1=$CHANNEL + ":" + SearchSectionMap[scSearchType]; $SUBSECTION=s.prop1; try{eval(SearchSpecialEvaluators[scSearchType]);}catch(e){alert(e.message);}';
	objSpecialEvaluators['GB/en/ns/execs/playlist.html'] = 's.prop7_temp = document.getElementById("playList").getElementsByTagName("div")[1].getElementsByTagName("h4")[0].getElementsByTagName("a")[0].innerHTML;';
	objSpecialEvaluators['GB/en/ns/view/artist'] = 's.prop2_temp = document.getElementById("artistHeader").getElementsByTagName("h2")[0].innerHTML';
	objSpecialEvaluators['MyLibrary/RecentlyPlayed'] = '';
	objSpecialEvaluators['MyLibrary/RecentlyAdded'] = '';
	objSpecialEvaluators['GB/en/ns/view/artist/bio.html'] = 's.prop2_temp = document.getElementById("artistHeader").getElementsByTagName("h2")[0].innerHTML'; 
	objSpecialEvaluators['GB/en/ns/view/album'] = '$SUBSECTION += (SCqueryObj.type_id == "albumtracks" ? "tracks" : "other members like"); s.prop2_temp = document.getElementById("scArtistName").innerHTML; s.prop6_temp = document.getElementById("albumHeader").getElementsByTagName("h2")[0].getElementsByTagName("em")[0].innerHTML';  
	objSpecialEvaluators['GB/en/ns/view/album/review.html'] = 's.prop2_temp = document.getElementById("scArtistName").innerHTML; s.prop6_temp = document.getElementById("albumHeader").getElementsByTagName("h2")[0].getElementsByTagName("em")[0].innerHTML';
	objSpecialEvaluators['GB/en/ns/registration/upgrade/add_payment_info.html'] = '$SUBSECTION = eval($SUBSECTION)';
	objSpecialEvaluators['GB/en/ns/registration/upgrade/confirmation.html'] = '$SUBSECTION = eval($SUBSECTION); $SCEG(\'Registration Completion\',\'s.eVar7="\' + (isClient() ? "Client Application" : "Web Application") + \'"\');';	

	// Standard Reg
	objSpecialEvaluators['GB/en/ns/registration/standard/create_account.html'] = '$SUBSECTION += (document.getElementById("scRegPage") ? document.getElementById("scRegPage").innerHTML : "") + (document.getElementById("scError") ? document.getElementById("scError").innerHTML : "");s.prop5_temp = "registration:standard";s.events_temp="event11";';
	objSpecialEvaluators['GB/en/ns/registration/standard/add_payment_info.html'] = '$SUBSECTION = s.prop1 + eval($SUBSECTION);$SUBSECTION += (document.getElementById("scRegPage") ? document.getElementById("scRegPage").innerHTML : "") + (document.getElementById("scError") ? document.getElementById("scError").innerHTML : "");s.prop5_temp = "registration:standard";s.events_temp="event12";';
	objSpecialEvaluators['GB/en/ns/registration/standard/confirmation.html'] = '$SUBSECTION = s.prop1 + eval($SUBSECTION);$SUBSECTION += (document.getElementById("scRegPage") ? document.getElementById("scRegPage").innerHTML : "") + (document.getElementById("scError") ? document.getElementById("scError").innerHTML : "");  var regAcctType = "reg " + ($SCData(\'utype\').indexOf(\'NTG\') > -1 ? "ntg 7day trial" : "naps 7day trial"); s.channel = regAcctType; s.prop1 = regAcctType; s.prop5_temp = regAcctType;s.events_temp="event13";';
	objSpecialEvaluators['GB/en/ns/registration/standard/confirmation_lfm.html'] = '$SCEG(\'Registration Completion\',\'s.eVar7="\' + (isClient() ? "Client Application" : "Web Application") + \'"\');';
	
	// Darwin Reg Upsell/Save
    objSpecialEvaluators['GB/en/ns/registration/standard/upsell/trackpack.html'] = '$SUBSECTION += (document.getElementById("scRegPage") ? document.getElementById("scRegPage").innerHTML : "") + (document.getElementById("scError") ? document.getElementById("scError").innerHTML : "");s.prop5_temp = "registration:standard";s.events_temp="event11";';
    objSpecialEvaluators['GB/en/ns/registration/standard/upsell/trackpack_verify.html'] = '$SUBSECTION += (document.getElementById("scRegPage") ? document.getElementById("scRegPage").innerHTML : "") + (document.getElementById("scError") ? document.getElementById("scError").innerHTML : "");s.prop5_temp = "registration:standard";s.events_temp="event11";';
    objSpecialEvaluators['GB/en/ns/registration/standard/upsell/trackpack_confirm.html'] = '$SUBSECTION += (document.getElementById("scRegPage") ? document.getElementById("scRegPage").innerHTML : "") + (document.getElementById("scError") ? document.getElementById("scError").innerHTML : "");s.prop5_temp = "registration:standard";s.events_temp="event11";';
    objSpecialEvaluators['GB/en/ns/registration/standard/upsell/trackpack_purchase.html'] = '$SUBSECTION += (document.getElementById("scRegPage") ? document.getElementById("scRegPage").innerHTML : "") + (document.getElementById("scError") ? document.getElementById("scError").innerHTML : "");s.prop5_temp = "registration:standard";s.events_temp="event11";';
    objSpecialEvaluators['GB/en/ns/registration/standard/save/offer.html'] = '$SUBSECTION += (document.getElementById("scRegPage") ? document.getElementById("scRegPage").innerHTML : "") + (document.getElementById("scError") ? document.getElementById("scError").innerHTML : "");s.prop5_temp = "registration:standard";s.events_temp="event11";';
    objSpecialEvaluators['GB/en/ns/registration/standard/save/add_payment_info.html'] = '$SUBSECTION = s.prop1 + eval($SUBSECTION);$SUBSECTION += (document.getElementById("scRegPage") ? document.getElementById("scRegPage").innerHTML : "") + (document.getElementById("scError") ? document.getElementById("scError").innerHTML : "");s.prop5_temp = "registration:standard";s.events_temp="event12";';

	objSpecialEvaluators['GB/en/ns/registration/bundle/add_payment_info.html'] = '$SUBSECTION = eval($SUBSECTION)';
	objSpecialEvaluators['GB/en/ns/registration/bundle/confirmation.html'] = '$SUBSECTION = eval($SUBSECTION); $SCEG(\'Registration Completion\',\'s.eVar7="\' + (isClient() ? "Client Application" : "Web Application") + \'"\');';	
	objSpecialEvaluators['GB/en/ns/registration/bundle/confirmation_lfm.html'] = '$SCEG(\'Registration Completion\',\'s.eVar7="\' + (isClient() ? "Client Application" : "Web Application") + \'"\');';
	objSpecialEvaluators['GB/en/ns/registration/promo_code/add_payment_info.html'] = '$SUBSECTION = eval($SUBSECTION)';
	objSpecialEvaluators['GB/en/ns/registration/promo_code/confirmation.html'] = '$SUBSECTION = eval($SUBSECTION); $SCEG(\'Registration Completion\',\'s.eVar7="\' + (isClient() ? "Client Application" : "Web Application") + \'"\');';
	
	
	objSpecialEvaluators['GB/en/ns/purchase/clear/purchase_verify.html'] = 's.prop5_temp="purchase:"+purchaseInfo[\'type\'];s.events_temp="scCheckout";s.products_temp=";"+purchaseInfo[\'type\'];setCampaignVars();';
	objSpecialEvaluators['GB/en/ns/purchase/clear/purchase_complete.html'] = 's.prop5_temp="purchased:"+purchasedType;s.prop1=s.prop5_temp;s.channel=s.prop5_temp;$SUBSECTION+=(":"+purchasedType);s.events_temp="purchase,event7";s.products_temp=";"+purchasedType+";"+purchasedTrackCount+";"+purchasedCost+";event7="+purchasedCreditsUsed;';
	objSpecialEvaluators['GB/en/ns/purchase/clear/purchase_create_member.html'] = 's.prop5_temp="purchase:"+purchaseType();$SUBSECTION+=((document.title.indexOf("- Error") > 0)?":error":""); s.prop1 = $SUBSECTION + ":ala carte";s.events="event11";setCampaignVars();';
	objSpecialEvaluators['GB/en/ns/purchase/clear/purchase_login.html'] = 's.prop5_temp="purchase:"+purchaseInfo[\'type\'];setCampaignVars();';
	objSpecialEvaluators['GB/en/ns/purchase/clear/purchase_payment_info.html'] = 's.prop5_temp="purchase:"+purchaseInfo[\'type\'];s.events="event12";setCampaignVars();';
	objSpecialEvaluators['GB/en/ns/purchase/clear/purchase_payment_info_cc.html'] = 's.prop5_temp="purchase:"+purchaseInfo[\'type\'];s.events="event12";setCampaignVars();';
	objSpecialEvaluators['GB/en/ns/purchase/clear/purchase_payment_info_paypal.html'] = 's.prop5_temp="purchase:"+purchaseInfo[\'type\'];s.events="event12";setCampaignVars();';
	objSpecialEvaluators['GB/en/ns/purchase/clear/purchase_unavailable.html'] = 's.prop5_temp="purchase:"+purchaseInfo[\'type\'];';
	objSpecialEvaluators['GB/en/ns/purchase/clear/purchase_promo_code_input.html'] = 's.prop5_temp="purchase:"+purchaseInfo[\'type\'];';
	objSpecialEvaluators['GB/en/ns/purchase/clear/purchase_promo_code_validate.html'] = 's.prop5_temp="purchase:"+purchaseInfo[\'type\'];';
	
	objSpecialEvaluators['GB/en/ns/purchase/clear/inpage'] = 's.prop5_temp="purchase:"+purchaseInfo[\'type\'];s.events_temp="scCheckout";s.products_temp=";"+purchaseInfo[\'type\'];';
	objSpecialEvaluators['GB/en/ns/purchase/clear/inpage/purchase_complete.html'] = '$SUBSECTION=ChannelBase+":thankyou:track";s.prop5_temp="purchased:track";s.prop1=s.prop5_temp;s.channel=s.prop5_temp;s.events_temp="purchase,event7";s.products_temp=";track;1;"+document.getElementById("totalCost").innerHTML+";event7="+document.getElementById("totalCredits").innerHTML;';
	
	objSpecialEvaluators['marketing/visitor.html'] = 's.prop5_temp = "upsell:landing";';
	objSpecialEvaluators['marketing/light_upgrade.html'] = 's.prop5_temp = "upsell:landing";';
	
	function purchaseType() {
		var type = purchaseInfo['type'];
		if(type == "track") {
			if(purchaseInfo['content_ids'].indexOf(",") > 0) {
				type = "multi_track";
			} else {
				type = "single_track";
			}
		}
		return type;
	}
	
	function setCampaignVars() {
		if(SDAT['ARPDATA']) {
			var campaignVarsArr = SDAT['ARPDATA'].split(",");
			if(typeof(campaignVarsArr[2]) != "unknown") {
				s.campaign = campaignVarsArr[1] + ":" + campaignVarsArr[2];
				s.eVar14 = campaignVarsArr[0];
			}
		} else {
			if(SCqueryObj.affiliate_id && SCqueryObj.referral_id && SCqueryObj.promo_id) {
				s.campaign = SCqueryObj.referral_id + ":" + SCqueryObj.promo_id;
				s.eVar14 = SCqueryObj.affiliate_id;
			}
		}
	}

	var $SUBSECTION = '';
	var $CHANNEL = '';
	var ChannelBase = '';

	function defineChannel(navPath){
		var XS_ROOT_PATH = '/';
		var strThisPath = (typeof(navPath) == "undefined")?(location.pathname != "/" ? location.pathname : ("/" + location.hash.substring(1))):("/" + navPath);
		// redefine this every time - needs to be a global for access by other functions
		ChannelBase = isClient() ? 'client' : 'web';
		// lookup table for backwards channel compatibility
		var baseTrans = new Object();
		baseTrans['web'] = "Web App";
		// baseTrans['client'] = "Client App";
		baseTrans['client'] = "client:";
		// end
		var strThisFile = '';
		var inQuery = '';
		var strThisFile = strThisPath.replace( XS_ROOT_PATH, '' );
		if(strThisFile.indexOf("?") > -1) {
			// we've got a hash URL, split the query off
			var tmpSplit = strThisFile.split("?");
			strThisFile = tmpSplit[0];
			inQuery = tmpSplit[1];
		} else {
			inQuery = location.search.substring(1);
		}

		// strip quotes
		var stripQuotes = /"/g;
		inQuery = inQuery.replace(stripQuotes,'');
		var stripEnc = /%22/g;
		inQuery = inQuery.replace(stripEnc,'');
		SCqueryObj = new Arguments(inQuery);
		// exception code to change channel to registration if we're in any reg flow
		//chOverride(strThisFile);
		var strSubSection = strThisFile;
		if( strThisFile.indexOf( 'index.html' ) > -1 ){
			strThisFile = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
			strSubSection = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
		} else if( strThisFile.indexOf('XML') == strThisFile.length - 3) {
			// leave this alone, these are scripts
		} else if( strThisFile.indexOf( '.html' ) == -1 ){
			strThisFile = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
			strSubSection = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
		}

		if( objChannels[strThisFile] ){
			if( typeof objChannels[strThisFile] == 'object' ){
				if (objChannels[strThisFile].length > 2) {
					ChannelBase	+= ":" + objChannels[strThisFile][0];
				} else {
					// retranslate to "Web App/Client App" til we change everything
					ChannelBase = baseTrans[ChannelBase];
				}
			}
			return ChannelBase;
		}

		else if( !objChannels[strThisFile] && strThisFile.indexOf( '.html' ) > -1 ){
			strThisFile = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
			if( objChannels[strThisFile] ){
				if( typeof objChannels[strThisFile] == 'object' ){
					if (objChannels[strThisFile].length > 2) {
						ChannelBase	+= ":" + objChannels[strThisFile][0];
					} else {
						// retranslate to "Web App/Client App" til we change everything
						ChannelBase = baseTrans[ChannelBase];
					}
				}
				return ChannelBase;
			} else
				return 'Napster Web';
		} else {
			return 'Napster Web';
		}
	}

	var strSL = dojo.io.cookie.getCookie( 'SL' );
	var $SUBLEVEL = IsNewUser() + ' ' + $SCData( 'utype' ) + (SDAT['TRIAL'] == 'Y' ? ' Trial' : '');
	var $COUNTRYCODE = $SCData( 'ter' );

	var $FILEPATH = function(){
		var strPath = location.href;
		if( strPath.indexOf( '?' ) > -1 )
			return strPath.substring( 0, strPath.indexOf( '?' ) );
		else
			return strPath
	};

	function $SCE( strID ){
		try{
			s.events = "Play";
			s.eVar1 = strID;
			s.gs( "napsterweb" );
		}
		catch(e){}
	}
	
	function $SCEG( strEvent, strEVars ){
		var s=s_gi('napsterunitedkingdom');
		s.eVar6 = $SUBLEVEL;
		//s.eVar5 = $COUNTRYCODE;
		try{
			s.linkTrackVars =  "eVar3,eVar6,eVar7,eVar8,eVar9,eVar10,events";
			s.linkTrackEvents = EventMap[strEvent];
			s.events = EventMap[strEvent];
			eval( strEVars );
			// o = custom, e = exit, d = download
			s.tl( true ,'o', strEvent );
			if( $SCData( 'debug' ) ){
				DebugSiteCat( strEvent );
			}
		}
		catch(e){}
	}
	
	var objDebugWindow = null;

	function OpenDebugWindow(){
		objDebugWindow = open( '', 'DebugWindow', 'width=500,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,z-lock=0' );
	}
	if( $SCData( 'debug' ) ){
		if( objDebugWindow == null || ( objDebugWindow.closed || !objDebugWindow.closed ) ){
			OpenDebugWindow();
			if( objDebugWindow.window.blnLoaded == null ){
				objDebugWindow.document.writeln( '<style type="text/css">' );
				objDebugWindow.document.writeln( 'BODY{' );
				objDebugWindow.document.writeln( 'margin-top : 0px ;' );
				objDebugWindow.document.writeln( 'font-family : Helvetica, Arial, sans-serif ;' );
				objDebugWindow.document.writeln( 'font-size : 11px ;' );
				objDebugWindow.document.writeln( 'color : #000000 ;' );
				objDebugWindow.document.writeln( '}' );
				objDebugWindow.document.writeln( '</style>' );
				objDebugWindow.document.writeln( '<h3>Site Cat. Debugger</h3><br />' );
				objDebugWindow.document.writeln( '<div id="Debug"></div>' );
				objDebugWindow.document.writeln( '<script language="JavaScript1.2" type="text/javascript">' );
				objDebugWindow.document.writeln( ' var blnLoaded = false;' );
				objDebugWindow.document.writeln( 'function DisplayValue( strLabel, strValue ){' );
				objDebugWindow.document.writeln( "var objDestination = document.getElementById( 'Debug' );" );
				objDebugWindow.document.writeln( "var objDiv = document.createElement( 'DIV' );" );
				objDebugWindow.document.writeln( 'if( strValue != null )' );
				objDebugWindow.document.writeln( "objDiv.innerHTML = strLabel + ' = ' + strValue;" );
				objDebugWindow.document.writeln( 'else' );
				objDebugWindow.document.writeln( "objDiv.innerHTML = '<br><br><hr><br><br>';" );
				objDebugWindow.document.writeln( 'objDestination.appendChild( objDiv );' );
				objDebugWindow.document.writeln( '}' );
				objDebugWindow.document.writeln( 'var blnLoaded = true;' );
				objDebugWindow.document.writeln( '</scr' + 'ipt>' );
			}
		}
	}

	function DebugSiteCat( strEvent ){
		if( objDebugWindow.window.blnLoaded != null && objDebugWindow.window.blnLoaded ){
			if( strEvent == null || strEvent == '' )
				objDebugWindow.window.DisplayValue( 'Event type', 'Page Load' );
			else
			objDebugWindow.window.DisplayValue( 'Event type', strEvent );
			objDebugWindow.window.DisplayValue( 'Page URL', location.href + '<br /><br />' );
			objDebugWindow.window.DisplayValue( 's.events', s.events );
			objDebugWindow.DisplayValue( 's.pageName', s.pageName );
			objDebugWindow.DisplayValue( 's.channel', s.channel );
			for( n = 1; n < 51; n++ ){
				try{
					var strProp = eval( 's.prop' + n );
					if( strProp != '' && strProp != 'undefined' )
						objDebugWindow.DisplayValue( 's.prop' + n, strProp );
				}
				catch(e){}
			}
			
			for( n = 1; n < 51; n++ ){
				try{
					var strProp = eval( 's.eVar' + n );
					if( strProp != '' && strProp != 'undefined' )
						objDebugWindow.DisplayValue( 's.eVar' + n, strProp );
				}
				catch(e){}
			}
			objDebugWindow.DisplayValue( 'space', null );
		} else
			setTimeout( DebugSiteCat, 1000 );
	}

	function $SUBSEG(navPath){
		var XS_ROOT_PATH = '/';
		var strThisPath = (typeof(navPath) == "undefined")?(location.pathname != "/" ? location.pathname : ("/" + location.hash.substring(1))):("/" + navPath);
		var strThisFile = '';
		var inQuery = '';
		var strThisFile = strThisPath.replace( XS_ROOT_PATH, '' );
		if(strThisFile.indexOf("?") > -1) {
			// we've got a hash URL, split the query off
			var tmpSplit = strThisFile.split("?");
			strThisFile = tmpSplit[0];
			inQuery = tmpSplit[1];
		} else {
			inQuery = location.search.substring(1);
		}

		// strip quotes
		var stripQuotes = /"/g;
		inQuery = inQuery.replace(stripQuotes,'');
		var stripEnc = /%22/g;
		inQuery = inQuery.replace(stripEnc,'');
		SCqueryObj = new Arguments(inQuery);
		// exception code to change channel to registration if we're in any reg flow
		chOverride(strThisFile);
		var strSubSection = strThisFile;
		if( strThisFile.indexOf( 'index.html' ) > -1 ){
			strThisFile = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
			strSubSection = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
		} else if( strThisFile.indexOf('XML') == strThisFile.length - 3) {
			// leave this alone, these are scripts
		} else if( strThisFile.indexOf( '.html' ) == -1 ){
			strThisFile = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
			strSubSection = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
		}

		if( objChannels[strThisFile] ){
			if( typeof objChannels[strThisFile] == 'object' ){
				if(objChannels[strThisFile].length > 2) {
					var tmpSubSeg = $CHANNEL + ":" + objChannels[strThisFile][1];
					$SUBSECTION = tmpSubSeg + objChannels[strThisFile][2]; 
					return tmpSubSeg;
				} else {
					$SUBSECTION = objChannels[strThisFile][1];
					return objChannels[strThisFile][0];
				}
			} else 
				return objChannels[strThisFile];
		}

		else if( !objChannels[strThisFile] && strThisFile.indexOf( '.html' ) > -1 ){
			strThisFile = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
			if( objChannels[strThisFile] ){
				if( typeof objChannels[strThisFile] == 'object' ){
					if(objChannels[strThisFile].length > 2) {
						var tmpSubSeg = $CHANNEL + ":" + objChannels[strThisFile][1];
						$SUBSECTION = tmpSubSeg + objChannels[strThisFile][2]; 
						return tmpSubSeg;
					} else {
						$SUBSECTION = objChannels[strThisFile][1];
						return objChannels[strThisFile][0];
					}
				} else {
					return objChannels[strThisFile];
				}
			} else
				return 'Napster Web';
		} else {
			return 'Napster Web';
		}
	}


	function RunEvaluator(navPath){
		navPath = "/" + navPath;
		try {
			var XS_ROOT_PATH = '/';
			var strThisFile = '';
			var strThisFile = navPath.replace( XS_ROOT_PATH, '' );

			if(strThisFile.indexOf("?") > -1) {
				// we've got a hash URL, split the query off
				var tmpSplit = strThisFile.split("?");
				strThisFile = tmpSplit[0];
			}
			if( strThisFile.indexOf( 'index.html' ) > -1 )
				strThisFile = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
			else if( strThisFile.indexOf('XML') == strThisFile.length - 3) {
				// leave this alone, these are scripts
			} else if( strThisFile.indexOf( '.html' ) == -1 )
				strThisFile = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
			if( typeof( objSpecialEvaluators[strThisFile] ) != 'undefined' ){
				eval( objSpecialEvaluators[strThisFile] );
			} else if( typeof( objSpecialEvaluators[strThisFile] ) == 'undefined' && strThisFile.indexOf( '.html' ) > -1 ){
				strThisFile = strThisFile.substring( 0, strThisFile.lastIndexOf( '/' ) );
				if( typeof( objSpecialEvaluators[strThisFile] ) != 'undefined' )
					eval( objSpecialEvaluators[strThisFile] );
			}
		} catch(e) {
			alert(e.message + " in " + objSpecialEvaluators[strThisFile]);
		}
	}

	var SCqueryObj = '';
	
	function transformPath(navPath) { // handle redirected pages/special cases where content changes the page name
		navPath = (typeof(navPath) == "undefined")?(location.pathname != "/" ? (location.pathname): (location.hash.substring(1))):(navPath);
		if(navPath.indexOf('/') == 0) { navPath = navPath.substring(1); }
		switch(navPath) {
			case "ns/purchase/clear/purchase_verify.html": // Client
				if((location.search.indexOf('buy=1') > -1) && (location.search.indexOf('skin=inpage') > -1) && (document.getElementById("main").getElementsByTagName("h2")[0].innerHTML.indexOf("Thanks") > -1)) {
					
					navPath = "ns/purchase/clear/inpage/purchase_complete.html";
				}
				break;
			case "ns/purchase/clear/inpage/purchase_verify.html?buy=1": // Web
				if((document.getElementById("trackPurchase").getElementsByTagName("h2")[0].innerHTML.indexOf("Thanks") > -1)) {
					navPath = "ns/purchase/clear/inpage/purchase_complete.html";
				}
				break;
		}
		return navPath;
	}

	function runSCPageLoad(navPath) {
		purchaseInfo = getCookieHash('PURCHASEINFO');
		eval(initSCvars);
		// clear out the old query
		SCqueryObj = '';
		s.prop2_temp = '';
		s.prop5_temp = '';
		s.prop6_temp = ''; // Album Title
		s.prop7_temp = ''; // Playlist Title
		s.prop8 = ''; // Search Query
		s.events_temp = '';
		s.products_temp = '';
		// set up the basic page variables
		navPath = transformPath(navPath);
		$CHANNEL = defineChannel(navPath);
		s.server = isClient() ? 'client' : 'web';
		s.channel = $CHANNEL
		// set up any special tags for this page
		s.prop1 = $SUBSEG(navPath);
		RunEvaluator(navPath);
		s.hier1 = (s.prop1.charAt(s.prop1.length-1) == ":")?s.prop1.slice(0,-1):s.prop1;
		s.pageName = ( ( $SUBSECTION != '' )? $SUBSECTION : '' );
		s.prop2 = ( typeof( s.prop2_temp ) != 'undefined' )? s.prop2_temp : "";
		s.prop3 = $SUBLEVEL;
		
		s.pageType = "";
		s.prop4 = typeof(navPath) != 'undefined' ? navPath : self.location.href;
		s.prop5 = (typeof(s.prop5_temp)=='undefined'||s.prop5_temp=="")?s.prop1.slice(s.prop1.indexOf(":")+1):s.prop5_temp;
		s.prop6 = (typeof(s.prop6_temp)!='undefined')?s.prop6_temp:"";
		s.prop7 = (typeof(s.prop7_temp)!='undefined')?s.prop7_temp:"";
		// s.prop8 = (typeof(s.prop8)!='undefined')?s.prop8:"";
		s.prop9 = NUID;
		s.prop10 = "";
		/* E-commerce Variables */
		// s.campaign = "";
		s.state = "";
		s.zip = "";
		s.events = s.events_temp;
		s.products = s.products_temp;
		s.purchaseID = "";
		s.eVar1 = "";
		s.eVar2 = "";
		s.eVar3 = "";
		s.eVar4 = "";
		s.eVar5 = "";
		s.eVar6 = $SUBLEVEL;
		s.eVar7 = (ChannelBase.charAt(ChannelBase.length-1) == ":")?ChannelBase.slice(0,-1):ChannelBase;
		s.eVar8 = "";
		s.eVar9 = "";
		s.eVar10 = "";
		s.eVar15 = NUID;

		$SCData( 'ch', $CHANNEL );
		// run the site catalyst function to update the vars
		void(s.t());
		//open the debugger if we need to	
		if( $SCData( 'debug' ) ){
			DebugSiteCat();
		}
	}
