/* [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','5001',jdecode('Home'),jdecode(''),'/5001.html','true',[],'',''],
	['PAGE','5052',jdecode('Event+Schedule'),jdecode(''),'/5052.html','true',[],'',''],
	['PAGE','5073',jdecode('Band+Members'),jdecode(''),'/5073.html','true',[],'',''],
	['PAGE','5115',jdecode('Photos'),jdecode(''),'/5115.html','true',[],'',''],
	['PAGE','5136',jdecode('Press'),jdecode(''),'/5136.html','true',[],'',''],
	['PAGE','5094',jdecode('CDs'),jdecode(''),'/5094.html','true',[],'',''],
	['PAGE','23601',jdecode('Songs'),jdecode(''),'/23601.html','true',[],'',''],
	['PAGE','35101',jdecode('Charts'),jdecode(''),'/35101.html','true',[],'',''],
	['PAGE','32343',jdecode('Blog'),jdecode(''),'/32343.html','true',[],'',''],
	['PAGE','5157',jdecode('Links'),jdecode(''),'/5157.html','true',[],'',''],
	['PAGE','5178',jdecode('Contact'),jdecode(''),'/5178.html','true',[],'','']];
var siteelementCount=11;
theSitetree.topTemplateName='Clearline';
theSitetree.paletteFamily='B71602';
theSitetree.keyvisualId='3288';
theSitetree.keyvisualName='kv_3288.jpg';
theSitetree.fontsetId='10589';
theSitetree.graphicsetId='10715';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Clearline',
				paletteFamily: 	'B71602',
				keyvisualId: 	'3288',
				keyvisualName: 	'kv_3288.jpg',
				fontsetId: 		'10589',
				graphicsetId: 	'10715',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'B71602',
				e_color: 		'989696',
				f_color: 		'989696',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100701-103335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5052',
internalId:  '',
customField: '20100826-135541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5073',
internalId:  '',
customField: '20100715-234725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5136',
internalId:  '',
customField: '20100826-140213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5115',
internalId:  '',
customField: '20100607-131726'
};
webappMappings['7060']=webappMappings['7060-17ca7ddff82f58a05c9a665080645796']={
webappId:    '7060',
documentId:  '5115',
internalId:  '17ca7ddff82f58a05c9a665080645796',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-2734']={
webappId:    '7008',
documentId:  '5178',
internalId:  '2734',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5178',
internalId:  '',
customField: '20090407-174239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23601',
internalId:  '',
customField: '20100612-130301'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5094',
internalId:  '',
customField: '20090416-115842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5157',
internalId:  '',
customField: '20100116-232007'
};
webappMappings['7050']=webappMappings['7050-880']={
webappId:    '7050',
documentId:  '32343',
internalId:  '880',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35101',
internalId:  '',
customField: '20090416-165029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32343',
internalId:  '',
customField: '20090404-181734'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INLA23';
var companyName   = 'THE+BIG+BAND+SOUND';
var htmlTitle	  = 'The+Big+Band+Sound+jazz+orchestra';
var metaKeywords  = 'Big+Bands%2C+Stan+Kenton%2C+Count+Basie%2C+Glenn+Miller%2C+Tommy+Dorsey%2C+Benny+Goodman%2C+Artie+Shaw%2C+Duke+Ellington%2C+Harry+James%2C+Wappingers+Falls%2C+Poughkeepsie%2C+Beacon%2C+LaGrange%2C+swing%2C+In+the+Mood%2C+Stardust%2C+Chattanooga+Choo+Choo%2C+Tuxedo+Junction%2C+April+in+Paris%2C+Jimmy+Dorsey%2C+Frank+Sinatra%2C+Mohonk+Mountain+House%2C+Rhinebeck%2C+New+Paltz%2C+Highland%2C+Les+Brown%2C+Leap+Frog%2C+Sentimental+Journey%2C+big+band%2CBoogie+Woogie+Bugle+Boy%2C+Ciribiribin%2C+Lets+Dance%2C+Begin+the+Beguine%2C+Woody+Herman%2C+Sing+Sing+Sing%2C+Cherokee%2C+Charlie+Barnet%2C+Four+Brothers%2C+It+Dont+Mean+a+Thing+If+It+Aint+Got+That+Swing%2C+Marie%2C+The+Andrews+Sisters%2C+Opus+One%2C+Satin+Doll%2C+Jim+Lowe%2C+Julius+LaRosa%2C+Joe+Daily%2Cjazz%2C+string+of+pearls%2C+you+made+me+love+you%2C+Cab+Calloway%2C+Doc+Severinsen%2C+live+and+swingin%2C+savoy%2C+Beacon%2C+Freedom+Park%2C+Mesier+Park%2C+Greenvale+Park%2C+swingin%2C+New+York';
var metaContents  = 'The+Big+Band+Sound+orchestra%2C+a+20-piece+big+band+based+in+Poughkeepsie%2C+New+York%2C+recreates+the+swinging+jazz+sounds+of+the+big+band+era.+Classic%2C+swinging+big+band+jazz%21';
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();
};
