/* [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','2601',jdecode('Home'),jdecode(''),'/2601.html','true',[],'',''],
	['PAGE','2715',jdecode('Registration'),jdecode(''),'/2715.html','true',[],'',''],
	['PAGE','2652',jdecode('Staff'),jdecode(''),'/2652.html','true',[],'',''],
	['PAGE','2673',jdecode('Calendar'),jdecode(''),'/2673.html','true',[],'',''],
	['PAGE','2694',jdecode('Class+Descriptions'),jdecode(''),'/2694.html','true',[],'',''],
	['PAGE','18012',jdecode('Policies+%26+F.A.Qs'),jdecode(''),'/18012.html','true',[],'',''],
	['PAGE','2736',jdecode('Recital'),jdecode(''),'/2736.html','true',[],'',''],
	['PAGE','2757',jdecode('Competition'),jdecode(''),'/2757.html','true',[],'',''],
	['PAGE','2778',jdecode('Birthday+Parties'),jdecode(''),'/2778.html','true',[],'',''],
	['PAGE','20812',jdecode('Wedding+Dances'),jdecode(''),'/20812.html','true',[],'',''],
	['PAGE','24412',jdecode('Zumba'),jdecode(''),'/24412.html','true',[],'',''],
	['PAGE','2799',jdecode('Contact+Us'),jdecode(''),'/2799.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Cinema';
theSitetree.paletteFamily='B00E18';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16612';
theSitetree.graphicsetId='12208';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='B00E18';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cinema',
				paletteFamily: 	'B00E18',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16612',
				graphicsetId: 	'12208',
				contentColor: 	'FFFFFF',
				contentBGColor: 'B00E18',
				a_color: 		'000000',
				b_color: 		'C03E46',
				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['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '2799',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2601',
internalId:  '',
customField: '20100724-162502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2673',
internalId:  '',
customField: '20100724-163914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2652',
internalId:  '',
customField: '20100622-192828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2715',
internalId:  '',
customField: '20100724-164015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2694',
internalId:  '',
customField: '20100622-193332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2736',
internalId:  '',
customField: '20100719-132401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2757',
internalId:  '',
customField: '20100622-194450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2778',
internalId:  '',
customField: '20090813-142533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2799',
internalId:  '',
customField: '20100430-164717'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18012',
internalId:  '',
customField: '20100724-163852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20812',
internalId:  '',
customField: '20100302-114409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24412',
internalId:  '',
customField: '20100622-194553'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INE9F1';
var companyName   = 'Manda%27s+Rhythm+%26+Dance-+Clinton+Township%2FMacomb';
var htmlTitle	  = 'Manda%27s+Rhythm+%26+Dance+Clinton+Township+%28Twp.%29+Macomb+MI+Lessons';
var metaKeywords  = 'dance+lessons%2C+dance+studio%2C+ballet%2C+tap%2C+jazz+dance%2C+hip-hop+dance%2C+hip-hop%2C++lyrical%2C+creative+movement%2C+classes%2C+clinton+township%2C+clinton+twp.%2C+fraser%2C+warren%2C+Michigan%2C+MI%2C+macomb%2C+sterling+heights+%2C+macomb+county%2C+childrens+activities%2C+birthday+parties%2C+zumba%2C+wedding+dances%2C+wedding+lessons%2C+mount+clemens%2C+harrison+township%2C+harrison+twp.';
var metaContents  = 'Mandas+Rhythm++Dance+is+a+dance+studio+offering+lessons+for+children+and+adults+with+classes+that+focus+on+fun.+We+teach+technically+correct+dance+moves+to+enhance+a+students+poise%2C+self+confidence%2C+health+and+fitness.+Our+staff+consists+of+experienced+and+friendly+adult+teachers.+Our+dance+studio+has+viewing+windows+for+all+of+the+dance+rooms+so+that+the+parent+can+track+the+students+progress.+Our+dance+classes+not+only+teach+dance+but+they+teach+life+lessons+that+gain+friendships+and+teamwork.+We+have+locations+in+Macomb+and+Clinton+Township%2C+MI.+';
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();
};
