/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var POS_TARGET=8;
var theSitetree=[ 
	['PAGE','1801',jdecode('Home-The+Name+That+Tune+Show+Vancouver'),jdecode(''), jdecode('%2F1801.html'), 'true',[],'',''],
	['PAGE','1852',jdecode('The+Show-The+Name+That+Tune+Show'),jdecode(''), jdecode('%2F1852.html'), 'true',[],'',''],
	['PAGE','1873',jdecode('Book-The+Name+That+Tune+Show+Vancouver'),jdecode(''), jdecode('%2F1873.html'), 'true',[],'','']];
var siteelementCount=3;
theSitetree.topTemplateName='Folder';
theSitetree.paletteFamily='F8B78C';
theSitetree.keyvisualId='11418';
theSitetree.keyvisualName='kv_11418.jpg';
theSitetree.fontsetId='31973';
theSitetree.graphicsetId='13811';
theSitetree.contentColor='E8F3FC';
theSitetree.contentBGColor='F8B78C';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'wl_enom',
  product: 'WSCENOSSSLYTC21A'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Folder',
				paletteFamily: 	'F8B78C',
				keyvisualId: 	'11418',
				keyvisualName: 	'kv_11418.jpg',
				fontsetId: 		'31973',
				graphicsetId: 	'13811',
				contentColor: 	'E8F3FC',
				contentBGColor: 'F8B78C',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-477']={
webappId:    '7008',
documentId:  '1873',
internalId:  '477',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20110221-165926'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20090930-103730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20110221-165827'
};
var webAppHostname = 'wsc.ehost-services.com:80';
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN330INZ2R4';
var companyName   = 'Name+That+Tune+Show+Vancouver';
var htmlTitle	  = 'Name+That+Tune+Show+Vancouver+Corporate+Team+Building+Parties+Pubs+Clubs';
var metaKeywords  = 'Vancouver+DJ+Name+That+Tune+Show%2CSpin+Doctor+DJ+name+That+Tune+Show%2C+Vancouver+Music+Trivia+Game%2C+Burnaby+DJ++Name+That+Tune+Show%2C+Burnaby+Music+Trivia+Game%2CNew+Westminster+DJ+Name+That+Tune%2C+New+Westminster+Music+Trivia+Game%2C+Surrey+DJ+Name+That+Tune+Show%2C+Surrey+Music+Trivia+Game%2C+Richmond+DJ+Name+That+Tune+Show%2C+Richmond+Music+Trivia+Game%2C+Delta+DJ+Name+That+Tune+Show%2C+Delta+Music+Trivia+Game%2C+White+Rock+DJ+Name+That+Tune+Show%2C+White+Rock+Music+Trivia+Game%2C+Langley+DJ+Name+That+Tune+Show%2CLangley+Music+Trivia+Game%2C++Aldergrove+DJ+Name+That+Tune+Show%2C+Aldergrove+Music+Trivia+Game%2C+Abbotsford+DJ+Name+That+Tune+Show%2C+Abbotsford+Music+Trivia+Game%2C+Chilliwack+DJ+Name+That+Tune+Show%2C+Chilliwack+Music+Trivia+Game%2CWest+Vancouver+DJ+Name+That+Tune+Show%2C+West+Vancouver+Music+Trivia%2C+North+Vancouver+Name+That+Tune+Show%2C+North+vancouver+Music+Trivia+Game%2C+Coquitlam+DJ+Name+That+Tune+Show%2C+Coquitlam+Music+Trivia+Game%2C+Port+Coquitlam+DJ+Name+That+Tune+Show%2C+Port+Coquitlam+Music+Trivia+Game%2CMaple+Ridge+DJ+Name+That+Tune+Show%2C+Maple+Ridge+Music+Trivia+Game%2C+Mission+DJ+Name+That+Tune+Show%2C+Mission+Music+Trivia+Game%2C+Harrison+Hot+Springs+DJ+Name+That+Tune+Show%2CHope+DJ+Name+That+Tune+Show%2CVancouver+Video+DJ%2C+Vancouver+Karaoke+DJ%2C+Vancouver+Wedding+DJ%2C+Vancouver+DJ+Casinos%2C+Vancouver+DJ+Corporate+Parties%2C+Vancouver+Grad+DJ%2C+Vancouver+DJ+Christmas+Parties%2C+Vancouver+DJ%2C+Vancouver+DJ+Boat+Cruises%2C+Vancouver+DJ+Weddings%2C+Whistler+DJ%2C+Squamish+DJ%2C+North+Vancouver+DJ+Christmas+Parties%2CNorth+Vancouver+DJ%2C+North+Vancouver+Wedding+DJ%2C+North+Vancouver+Grad+DJ%2C+West+Vancouver+DJ%2C+West+Vancouver+Wedding+DJ%2C+West+Vancouver+DJ+Christmas+Parties%2C+West+Vancouver+Grad+DJ%2C+Burnaby+DJ%2C+Burnaby+Wedding+DJ%2C+Burnaby+DJ+Christmas+Parties%2C+Burnaby+Grad+DJ%2C+New+Westminster+DJ%2C+New+Westminster+Wedding+DJ%2C+New+Westminster+DJ+Christmas+Parties%2C+New+Westminster+Grad+DJ%2C+Coquitlam+DJ%2C+Coquitlam+Wedding+DJ%2C+Coquitlam+DJ+Christmas+Parties%2C+Coquitlam+Grad+DJ%2C+Port+Coquitlam+DJ%2C+Port+Coquitlam+Wedding+DJ%2C++Port+Coquitlam+DJ+Christmas+Parties%2C+Port+Coquitlam+Grad+DJ%2C+Pitt+Meadows+DJ%2C+Pitt+Meadows+Wedding+DJ%2C+Pitt+Meadows+DJ+Christmas+Parties%2C+Pitt+Meadows+Grad+DJ%2C+Maple+Ridge+DJ%2C+Maple+Ridge+Wedding+DJ%2C+Maple+Ridge+DJ+Christmas+Parties%2C+Maple+Ridge+Grad+DJ%2C+Mission+DJ%2C+Mission+Wedding+DJ%2C+Mission+DJ+Christmas+Parties%2C+Mission+Grad+DJ%2C+Richmond+DJ%2C+Richmond+Wedding+DJ%2C++Richmond+DJ+Christmas+Parties%2C+Richmond+Grad+DJ%2CFraser+Valley+DJ%2C+Delta+DJ%2C+Delta+Wedding+DJ%2C+Delta+DJ+Christmas+Parties%2C+Delta+Grad+DJ%2C+White+Rock+DJ%2C+White+Rock+Wedding+DJ%2C+White+Rock+DJ+Christmas+Parties%2C+White+Rock+Grad+DJ%2C+Fraser+Valley+Wedding+DJ%2CFraser+Valley+DJ+Christmas+Parties%2C+Surrey+DJ%2C+Surrey+Wedding+DJ%2C+Surrey+DJ+Christmas++Party%2C+Langley+DJ%2C+Langley+Wedding+DJ%2C+Langley+DJ+Christmas+Parties%2CLangley+Grad+DJ%2C+Abbotsford+DJ%2C+Abbotsford+Wedding+DJ%2CAbbotsford+DJ+Christmas+Parties%2C+Aldergrove+DJ%2C+Chilliwack+DJ%2C+Chilliwack+Wedding+DJ%2C+Chilliwack+DJ+Christmas+Parties%2C+Chilliwack+Grad+DJ%2C+Harrison+Hot+Springs+DJ%2C+Harrison+Hot+Springs++Wedding+DJ+%2CHarrison+Hot+Springs+DJ+Parties%2C+Whistler+DJ+Weddings%2C+Vancouver+DJ+Wedding+Ceremonies%2C+Vancouver+DJ+Karaoke%2C+Vancouver+DJ+Boat+Cruises%2C+Vancouver+DJ+Grads%2C+Burnaby+DJ+Grads%2C+Surrey+DJ+Grads%2C+Langley+DJ+Grads%2C+White+Rock+DJ+Grads%2C+Abbotsford+DJ+Grads%2C+Chilliwack+DJ+Grads%2C+Maple+Ridge+DJ+Grads%2C+New+Westminster+Grads%2C+Corporate++Private+Parties%2C+Vancouver+Christmas+Parties+DJ%2C+Surrey+Christmas+Parties+DJ%2C+Fraser+Valley+Christmas+Parties+DJ%2C+Lower+Mainland+Christmas+Parties+DJ%2C+Sports+Banquets+DJ%2C+Fashion+Shows+DJ%2C+Product+Launches+DJ%2C+New+Years+Parties+DJ%2C+Fundraisers%2CProfessional%2CDJ%2C+wedding+music%2C+wedding+entertainment%2Cwedding+disc+jockey%2Cwedding+dj%2Cdisc+jockey%2Cdj+services%2Cdisc+jockeys%2Cgame+show%2Ckaraoke%2Cdisc+jockey+services%2Cmusicians+bands+and+disc+jockeys%2Cdisc+jockey+service%2Cwedding+reception%2Cwedding+planning%2Cevent+planning%2Cdance+music%2Ccorporate+events%2Cparty+planning%2Cparty+services%2Cbirthday+party%2Cparty+dj%2Cvancouver+party+dj%2Cvancouverdj%2Cbcdj%2Cmobile+dj%2Cdjservice%2Cwedding+djs%2Cmobile+disc+jockey%2Cprofessional+dj%2Cprofessional+disc+jockey%2Cmusic+trivia%2Cname+that+tune+show';
var metaContents  = 'Name+That+Tune+Show+Vancouver%2C+BC+is+a+Vancouver+Game+Show+based+on+music+trivia+that+leads+the+way+in+Corporate+Team+Building+Events+by+initiating+competition%2C+knowledge%2C+building+team+spirit+and+values.+We+can+incorporate+our+two+hour+show+with+our+DJ+or+Karaoke-DJ+services+to+provide+a+fun-filled+evening+of+excitement+and+dancing%21+The+show+is+hosted+by+radio+personality+Bruce+Williams+from+News+1130+Radio+in+Vancouver.We+also+do+Christmas+parties%2C+conventions%2C+pubs%2C+clubs%2C+birthdays%2C+anniversaries%2Cdances+and+charity+events.Vancouver+Professional+DJ+Service%2C+Vancouver%2C+Bellingham%2C+Whistler%2C+Squamish%2C+West+Vancouver%2C+North+Vancouver%2C+Burnaby%2C+New+Westminster%2C+Surrey%2C+Richmond%2C+Delta%2C+White+Rock%2C+Langley%2C+Coquitlam%2C+Port+Coquitlam%2C+Pitt+Meadows%2C+Maple+Ridge%2C+Mission%2C+Aldergrove%2C+Abbotsford%2C+Chilliwack%2C+Harrison+Hot+Springs%2C+Minter+Gardens%2C+Hope%2C+The+Fraser+Valley%2C+Wedding++DJ+and+Corporate+DJ%2C+Entertainment+Specialists%2C+professional%2C+highly+experienced+DJs%2C+Professional+DJ+Services%2C+Karaoke+DJ+Services%2C+Video+DJ+Services+for+Weddings%2C+Wedding+Ceremonies%2C+Corporate+Events%2C+Casinos%2C+Christmas+Parties%2C+Grads%2C+Dry+Grads%2C+Birthdays%2C+Anniversaries%2C+Reunions%2C+Destination+Management+Companies%2C+Boat+Cruises';
theSitetree.getById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		if (ar[i][POS_ID] == id){
			return ar[i];
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getParentById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {
			if (ar[i][POS_CHILDS][j][POS_ID] == id) {
				// child found
				return ar[i];
			}
			var result=this.getParentById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getName = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAME];
	}
	return null;
};

theSitetree.getNavigationText = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAVIGATIONTEXT];
	}
	return null;
};

theSitetree.getHREF = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_HREF];
	}
	return null;
};

theSitetree.getIsNavigation = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_ISNAVIGATION];
	}
	return null;
};

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {
	if (typeof(lastTemplateName) == 'undefined'){
		lastTemplateName = this.topTemplateName;
	}
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		var actTemplateName = ar[i][POS_TEMPLATENAME];
		if (actTemplateName == ''){
			actTemplateName = lastTemplateName;
		}
		if (ar[i][POS_ID] == id) {
			return actTemplateName;
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};

