/* [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','1101',jdecode('Voice+Home'),jdecode(''), jdecode('%2F1101.html'), 'true',[],'',''],
	['PAGE','1173',jdecode('Voice+Productions'),jdecode(''), jdecode('%2F1173%2Findex.html'), 'true',[ 
		['PAGE','1194',jdecode('Upcoming+Performances'),jdecode(''), jdecode('%2F1173%2F1194.html'), 'true',[],'',''],
		['PAGE','1236',jdecode('Feedback+on+Performances'),jdecode(''), jdecode('%2F1173%2F1236.html'), 'true',[],'',''],
		['PAGE','1257',jdecode('Contacts+for+Productions'),jdecode(''), jdecode('%2F1173%2F1257.html'), 'true',[],'','']
	],'',''],
	['PAGE','6301',jdecode('VoicePhotos'),jdecode(''), jdecode('%2F6301.html'), 'true',[],'',''],
	['PAGE','1278',jdecode('Voice+School'),jdecode(''), jdecode('%2F1278%2Findex.html'), 'true',[ 
		['PAGE','1299',jdecode('Class+Announcements'),jdecode(''), jdecode('%2F1278%2F1299.html'), 'true',[],'',''],
		['PAGE','1320',jdecode('Class+Groups'),jdecode(''), jdecode('%2F1278%2F1320.html'), 'true',[],'',''],
		['PAGE','24701',jdecode('Class+Location'),jdecode(''), jdecode('%2F1278%2F24701.html'), 'true',[],'',''],
		['PAGE','1341',jdecode('Latest+Practice+information'),jdecode(''), jdecode('%2F1278%2F1341.html'), 'true',[],'',''],
		['PAGE','1362',jdecode('Contacts+for+School'),jdecode(''), jdecode('%2F1278%2F1362.html'), 'true',[],'','']
	],'',''],
	['PAGE','1152',jdecode('Voice+History'),jdecode(''), jdecode('%2F1152.html'), 'true',[],'',''],
	['PAGE','62601',jdecode('Support%2FDonations'),jdecode(''), jdecode('%2F62601.html'), 'true',[],'',''],
	['PAGE','1383',jdecode('Links'),jdecode(''), jdecode('%2F1383.html'), 'true',[],'',''],
	['PAGE','47106',jdecode('Guestbook%2FComments'),jdecode(''), jdecode('%2F47106%2Findex.html'), 'true',[ 
		['PAGE','47101',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F47106%2F47101.html'), 'false',[],'','']
	],'',''],
	['PAGE','63701',jdecode('Contact+Us'),jdecode(''), jdecode('%2F63701.html'), 'true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1755';
theSitetree.keyvisualName='kultur.jpg';
theSitetree.fontsetId='290';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'mitdnz',
  product: 'WSCSYSSSSLYTC22A'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1755',
				keyvisualName: 	'kultur.jpg',
				fontsetId: 		'290',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-c57fdd1f8b223c9b6dd215f830e39e8b']={
webappId:    '7060',
documentId:  '6301',
internalId:  'c57fdd1f8b223c9b6dd215f830e39e8b',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-2443211']={
webappId:    '1501',
documentId:  '1101',
internalId:  '2443211',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1101',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-3089']={
webappId:    '7008',
documentId:  '1362',
internalId:  '3089',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-3090']={
webappId:    '7008',
documentId:  '1257',
internalId:  '3090',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-47106avec10ine3il']={
webappId:    '1002',
documentId:  '47106',
internalId:  '47106avec10ine3il',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1101',
internalId:  '',
customField: '20111214-140335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1278',
internalId:  '',
customField: '20110809-010543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1320',
internalId:  '',
customField: '20090125-043751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62601',
internalId:  '',
customField: '20090125-151657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1299',
internalId:  '',
customField: '20110203-061136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1383',
internalId:  '',
customField: '20091030-224510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1173',
internalId:  '',
customField: '20111214-140522'
};
webappMappings['7008']=webappMappings['7008-3486']={
webappId:    '7008',
documentId:  '63701',
internalId:  '3486',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63701',
internalId:  '',
customField: '20090125-151350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1194',
internalId:  '',
customField: '20111127-054913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20070211-035244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1236',
internalId:  '',
customField: '20070210-071530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1257',
internalId:  '',
customField: '20110203-061815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20070210-082153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1341',
internalId:  '',
customField: '20090205-045014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1362',
internalId:  '',
customField: '20070222-054310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1152',
internalId:  '',
customField: '20070225-012828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47106',
internalId:  '',
customField: '20071023-063020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47101',
internalId:  '',
customField: '20071023-063020'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INE3IL';
var companyName   = 'Voice+Dance+Company';
var htmlTitle	  = 'Voice+Dance+Company%2Can+inspirational+dance+experience.';
var metaKeywords  = 'voice%2Cchristian+dance%2Cchurch+dance%2Cvoice+performances%2Cvoice+classes%2Cvoice+school%2Cworship+dance%2Cballet%2Cceroc%2Chip+hop%2Cjazz+ballet%2Cacrobatics%2Caerobics%2Cinspirational+dancing%2Cpeace%2Cgymnastics+using+ribbons%2Choops%2Cflibbons%2Cworship+the+lord+in+amazing+costumes%2C+wonderful+music%2Centhrall+you+congregation+with+christmas%2Ceaster+performances%2Ctales+of+the+bible+and+crucifixion+and+the+sacrifice+of+jesus+for+our+sins';
var metaContents  = 'Voice+aspires+to+excellence+in+Christian+Dance+and+aims+to+provide+its+audience+with+an+inspirational+dance+experience.';
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();
};

