/* [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','52',jdecode('OVATIONS'),jdecode(''), jdecode('%2F52.html'), 'true',[],'',''],
	['PAGE','105934',jdecode('Beauty+and+The+Beast'),jdecode(''), jdecode('%2F105934.html'), 'true',[],'',''],
	['PAGE','82',jdecode('Director+and+Staff'),jdecode(''), jdecode('%2F82.html'), 'true',[],'',''],
	['PAGE','91',jdecode('Class+description%2Frm+pics+'),jdecode(''), jdecode('%2F91.html'), 'true',[],'',''],
	['PAGE','46901',jdecode('Musical+Theatre+'),jdecode(''), jdecode('%2F46901.html'), 'true',[],'',''],
	['PAGE','145',jdecode('Nutcracker+Suite+Perf'),jdecode(''), jdecode('%2F145%2Findex.html'), 'true',[ 
		['PAGE','68612',jdecode('Nut.+Reh.+2011'),jdecode(''), jdecode('%2F145%2F68612.html'), 'false',[],'',''],
		['PAGE','1226',jdecode('Nutcracker+Pictures'),jdecode(''), jdecode('%2F145%2F1226.html'), 'true',[],'','']
	],'',''],
	['PAGE','136',jdecode('Repertory+Company'),jdecode(''), jdecode('%2F136%2Findex.html'), 'true',[ 
		['PAGE','5143',jdecode('Supporters'),jdecode(''), jdecode('%2F136%2F5143.html'), 'true',[],'',''],
		['PAGE','14831',jdecode('Chinese+Auction'),jdecode(''), jdecode('%2F136%2F14831.html'), 'true',[],'',''],
		['PAGE','5203',jdecode('Make+a+Donations'),jdecode(''), jdecode('%2F136%2F5203.html'), 'true',[],'',''],
		['PAGE','44801',jdecode('parent+guild'),jdecode(''), jdecode('%2F136%2F44801.html'), 'true',[],'','']
	],'',''],
	['PAGE','99112',jdecode('LI+Pulse+Mag'),jdecode(''), jdecode('%2F99112.html'), 'true',[],'',''],
	['PAGE','1698',jdecode('Nat.+Dance+May+7'),jdecode(''), jdecode('%2F1698.html'), 'false',[],'',''],
	['PAGE','20106',jdecode('Picture+Gallery'),jdecode(''), jdecode('%2F20106.html'), 'false',[],'',''],
	['PAGE','66712',jdecode('Testimonials'),jdecode(''), jdecode('%2F66712.html'), 'true',[],'',''],
	['PAGE','190',jdecode('Contact+Us'),jdecode(''), jdecode('%2F190.html'), 'true',[],'',''],
	['PAGE','1309',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F1309.html'), 'true',[],'',''],
	['PAGE','1316',jdecode('Guestbook'),jdecode(''), jdecode('%2F1316%2Findex.html'), 'true',[ 
		['PAGE','1315',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F1316%2F1315.html'), 'false',[],'','']
	],'',''],
	['PAGE','11200',jdecode('Links'),jdecode(''), jdecode('%2F11200.html'), 'true',[],'',''],
	['PAGE','99912',jdecode('Contact'),jdecode(''), jdecode('%2F99912.html'), 'true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Cinema';
theSitetree.paletteFamily='B00E18';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16612';
theSitetree.graphicsetId='12208';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='B00E18';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'optimum',
  product: 'WSCSYSSSSLYTC245'
};
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: 	'000000',
				contentBGColor: 'B00E18',
				a_color: 		'000000',
				b_color: 		'C03E46',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '1309',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44801',
internalId:  '',
customField: '20090227-130507'
};
webappMappings['1002']=webappMappings['1002-1316AHW050IN2CVH']={
webappId:    '1002',
documentId:  '1316',
internalId:  '1316AHW050IN2CVH',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99912',
internalId:  '',
customField: '20110309-104128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68612',
internalId:  '',
customField: '20120107-114635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52',
internalId:  '',
customField: '20120107-105029'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24G']={
webappId:    '5003',
documentId:  '52',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24G',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82',
internalId:  '',
customField: '20120107-113255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91',
internalId:  '',
customField: '20120107-113858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136',
internalId:  '',
customField: '20080829-120829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5143',
internalId:  '',
customField: '20080327-163019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14831',
internalId:  '',
customField: '20090707-123839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5203',
internalId:  '',
customField: '20070717-160343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145',
internalId:  '',
customField: '20120107-114612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1226',
internalId:  '',
customField: '20120107-115128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20106',
internalId:  '',
customField: '20100922-120805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1698',
internalId:  '',
customField: '20110429-114949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190',
internalId:  '',
customField: '20070427-001556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1309',
internalId:  '',
customField: '20060801-204614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1316',
internalId:  '',
customField: '20060801-204643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1315',
internalId:  '',
customField: '20060801-204643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105934',
internalId:  '',
customField: '20111020-182113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11200',
internalId:  '',
customField: '20090603-171324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66712',
internalId:  '',
customField: '20091029-124410'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '52',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-361835']={
webappId:    '1501',
documentId:  '52',
internalId:  '361835',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99112',
internalId:  '',
customField: '20110222-173152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46901',
internalId:  '',
customField: '20120107-115501'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN2CVH';
var companyName   = 'OVATIONS+DANCE+ACADEMY+INC.+';
var htmlTitle	  = 'ovationsdance';
var metaKeywords  = 'Dance%2C+Ballet%2C+Tap%2C+Pointe%2C+Jazz%2C+Hip+Hop%2C+Ballroom%2C+Children%2C+Lyrical%2C+Orlando+Pena%2C+Dance+Company%2C+Nutcracker%2C+www.ovationsdance.com%2C+ovations+dance+studio%2C+ovations+Dance+academy%2C+long+Island+Dance%2C+li+pulse+magazine%2C+Rachelle+Rak%2C+Orlando+Pena%2C+starlight+express%2C+li+pulse+magazine%2C+patchogue+theatre+for+the+performing+arts%2C+www.patchoguetheatre.com%2C+Bohemia+dance%2C+The+Nutcracker+Suite%2C+Long+Island+News+12%2C+Nutcracker+Ballet%2C+Orlando+Pena+dance%2C+Palma+Pascal%2C+Jesus+Alive+10-10-10%2C+';
var metaContents  = 'Orlando+Pena-Artistic+Director%0D%0A';
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();
};

