/* [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','901',jdecode('Home'),jdecode(''), jdecode('%2F901.html'), 'true',[],'',''],
	['PAGE','5101',jdecode('About+us'),jdecode(''), jdecode('%2F5101%2Findex.html'), 'true',[ 
		['PAGE','5122',jdecode('Our+Team'),jdecode(''), jdecode('%2F5101%2F5122.html'), 'true',[],'',''],
		['PAGE','5143',jdecode('Dance+Recitals'),jdecode(''), jdecode('%2F5101%2F5143.html'), 'true',[],'','']
	],'',''],
	['PAGE','5164',jdecode('Classes'),jdecode(''), jdecode('%2F5164.html'), 'true',[],'',''],
	['PAGE','5206',jdecode('Dance+Camps'),jdecode(''), jdecode('%2F5206.html'), 'true',[],'',''],
	['PAGE','5227',jdecode('2011+Summer+Schedule+'),jdecode(''), jdecode('%2F5227.html'), 'true',[],'',''],
	['PAGE','59401',jdecode('2011-2012+Class+Schedule'),jdecode(''), jdecode('%2F59401.html'), 'true',[],'',''],
	['PAGE','5248',jdecode('Calendar'),jdecode(''), jdecode('%2F5248.html'), 'true',[],'',''],
	['PAGE','5269',jdecode('Links'),jdecode(''), jdecode('%2F5269.html'), 'true',[],'',''],
	['PAGE','5290',jdecode('NEEMA+News'),jdecode(''), jdecode('%2F5290.html'), 'true',[],'',''],
	['PAGE','5311',jdecode('Registration'),jdecode(''), jdecode('%2F5311.html'), 'true',[],'',''],
	['PAGE','5353',jdecode('Contact'),jdecode(''), jdecode('%2F5353%2Findex.html'), 'true',[ 
		['PAGE','19301',jdecode('Contact+%28follow+up+page%29'),jdecode(''), jdecode('%2F5353%2F19301.html'), 'false',[],'',''],
		['PAGE','5374',jdecode('Addresses'),jdecode(''), jdecode('%2F5353%2F5374.html'), 'true',[],'',''],
		['PAGE','5395',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F5353%2F5395.html'), 'true',[],'',''],
		['PAGE','31201',jdecode('Adresses'),jdecode(''), jdecode('%2F5353%2F31201.html'), 'true',[],'','']
	],'',''],
	['PAGE','5416',jdecode('Jobs'),jdecode(''), jdecode('%2F5416.html'), 'true',[],'',''],
	['PAGE','20606',jdecode('Guestbook'),jdecode(''), jdecode('%2F20606%2Findex.html'), 'true',[ 
		['PAGE','20601',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F20606%2F20601.html'), 'false',[],'','']
	],'',''],
	['PAGE','27901',jdecode('NEEMA+faces'),jdecode(''), jdecode('%2F27901.html'), 'true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Triangle';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='12008';
theSitetree.keyvisualName='kv_12008.jpg';
theSitetree.fontsetId='33260';
theSitetree.graphicsetId='14139';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'enom',
  product: 'WSCENOSSSLYTC21T'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Triangle',
				paletteFamily: 	'000000',
				keyvisualId: 	'12008',
				keyvisualName: 	'kv_12008.jpg',
				fontsetId: 		'33260',
				graphicsetId: 	'14139',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-11566483']={
webappId:    '1501',
documentId:  '901',
internalId:  '11566483',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-20606aen010inv99d']={
webappId:    '1002',
documentId:  '20606',
internalId:  '20606aen010inv99d',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-8f0c399c4f145a519173441d33ed765f']={
webappId:    '7060',
documentId:  '27901',
internalId:  '8f0c399c4f145a519173441d33ed765f',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20110802-075255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20110802-075524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5122',
internalId:  '',
customField: '20110802-090545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5143',
internalId:  '',
customField: '20100112-143843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5164',
internalId:  '',
customField: '20100112-143711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5206',
internalId:  '',
customField: '20110802-080810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5227',
internalId:  '',
customField: '20110802-081023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59401',
internalId:  '',
customField: '20110802-081922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5248',
internalId:  '',
customField: '20110802-085945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5269',
internalId:  '',
customField: '20080102-201118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5290',
internalId:  '',
customField: '20110802-090708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5311',
internalId:  '',
customField: '20110802-090804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5353',
internalId:  '',
customField: '20080101-131958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20080101-130334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5374',
internalId:  '',
customField: '20080101-132846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5395',
internalId:  '',
customField: '20080101-133036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31201',
internalId:  '',
customField: '20080722-101822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5416',
internalId:  '',
customField: '20080102-201657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20606',
internalId:  '',
customField: '20080101-134255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20080101-134255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27901',
internalId:  '',
customField: '20080408-120603'
};
webappMappings['7008']=webappMappings['7008-1338']={
webappId:    '7008',
documentId:  '5353',
internalId:  '1338',
customField: 'language:en;country:US;'
};
var webAppHostname = 'wsc.ehost-services.com:80';
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010INV99D';
var companyName   = 'NEEMA+International+Performing+Arts';
var htmlTitle	  = 'NEEMA';
var metaKeywords  = '';
var metaContents  = '';
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();
};

