/* [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('Home'),jdecode(''),'/52.html','true',[],'',''],
	['PAGE','82',jdecode('Director+and+Staff'),jdecode(''),'/82.html','true',[],'',''],
	['PAGE','80212',jdecode('Summer+Prog%2Fsch.+'),jdecode(''),'/80212.html','true',[],'',''],
	['PAGE','1698',jdecode('Nat.+Dance+Wk+'),jdecode(''),'/1698.html','false',[],'',''],
	['PAGE','91',jdecode('Class+description%2Frm+pics+'),jdecode(''),'/91.html','true',[],'',''],
	['PAGE','46901',jdecode('Musical+Theatre+'),jdecode(''),'/46901.html','true',[],'',''],
	['PAGE','136',jdecode('Repertory+Company'),jdecode(''),'/136/index.html','true',[ 
		['PAGE','5143',jdecode('Supporters'),jdecode(''),'/136/5143.html','true',[],'',''],
		['PAGE','14831',jdecode('Fundraiser'),jdecode(''),'/136/14831.html','false',[],'',''],
		['PAGE','5203',jdecode('Make+a+Donations'),jdecode(''),'/136/5203.html','true',[],'',''],
		['PAGE','44801',jdecode('parent+guild'),jdecode(''),'/136/44801.html','false',[],'','']
	],'',''],
	['PAGE','83812',jdecode('JA+10-10-10'),jdecode(''),'/83812.html','true',[],'',''],
	['PAGE','145',jdecode('Nutcracker+Suite+Perf'),jdecode(''),'/145/index.html','true',[ 
		['PAGE','1226',jdecode('Nutcracker+Pictures'),jdecode(''),'/145/1226.html','true',[],'',''],
		['PAGE','68612',jdecode('Nut.+Rehearsal'),jdecode(''),'/145/68612.html','false',[],'','']
	],'',''],
	['PAGE','20106',jdecode('Past+productions'),jdecode(''),'/20106.html','true',[],'',''],
	['PAGE','66712',jdecode('Testimonials'),jdecode(''),'/66712.html','true',[],'',''],
	['PAGE','190',jdecode('Contact+Us'),jdecode(''),'/190.html','true',[],'',''],
	['PAGE','1309',jdecode('How+to+find+us'),jdecode(''),'/1309.html','true',[],'',''],
	['PAGE','1316',jdecode('Guestbook'),jdecode(''),'/1316/index.html','true',[ 
		['PAGE','1315',jdecode('Read+Guestbook'),jdecode(''),'/1316/1315.html','false',[],'','']
	],'',''],
	['PAGE','11200',jdecode('Links'),jdecode(''),'/11200.html','true',[],'','']];
var siteelementCount=22;
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 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:  '68612',
internalId:  '',
customField: '20091215-163225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52',
internalId:  '',
customField: '20100716-150657'
};
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: '20100607-165556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91',
internalId:  '',
customField: '20090707-123858'
};
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: '20091028-151438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1226',
internalId:  '',
customField: '20090324-115109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20106',
internalId:  '',
customField: '20100313-122358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1698',
internalId:  '',
customField: '20100504-175437'
};
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:  '80212',
internalId:  '',
customField: '20100504-182752'
};
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:  '83812',
internalId:  '',
customField: '20100721-142833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46901',
internalId:  '',
customField: '20100716-150929'
};
var canonHostname = 'wsc-worker03.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+';
var metaContents  = 'Ballet%2C+Nutcracker+ballet%2C+Nutcracker+Suite%2C+Jazz%2C+tap%2C+lyrical%2C+patchogue+Theatre%2C+Sayville+Chamber%2C+Holbrook+Chamber+of+Commerce%2C+ovations+dance+%2C+ovations+dance+academy%2C+Rachelle+Rak%2C+Orlando+Pena%2C+patchogue+chamber+of+commerce%2C+li+pulse+magazine';
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();
};
