/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','473',jdecode('Calendar+of+Events'),jdecode(''),'/473.html','true',[],'',''],
	['PAGE','55201',jdecode('Heart+of+the+City+Gala'),jdecode(''),'/55201.html','true',[],'',''],
	['PAGE','55222',jdecode('Corazon+Fiesta'),jdecode(''),'/55222.html','true',[],'',''],
	['PAGE','38901',jdecode('Latino+Music+Fest'),jdecode(''),'/38901/index.html','true',[ 
		['PAGE','109101',jdecode('2LMF+ARTIST'),jdecode(''),'/38901/109101.html','true',[],'','']
	],'',''],
	['PAGE','31001',jdecode('Directions+%26+Plaza+Info'),jdecode(''),'/31001/index.html','true',[ 
		['PAGE','4222',jdecode('Amenities'),jdecode(''),'/31001/4222.html','true',[],'',''],
		['PAGE','452',jdecode('Hours+of+Operation'),jdecode(''),'/31001/452.html','true',[],'',''],
		['PAGE','18001',jdecode('Site+Map'),jdecode(''),'/31001/18001.html','true',[],'',''],
		['PAGE','10901',jdecode('Rules+%26+Guidelines'),jdecode(''),'/31001/10901.html','true',[],'',''],
		['PAGE','4243',jdecode('Hold+Your+Event'),jdecode(''),'/31001/4243.html','true',[],'',''],
		['PAGE','15601',jdecode('Main+Plaza+History'),jdecode(''),'/31001/15601.html','true',[],'','']
	],'',''],
	['PAGE','35001',jdecode('Farmer%26%23x27%3Bs+Market'),jdecode(''),'/35001/index.html','true',[ 
		['PAGE','35022',jdecode('Recipes+%26+More'),jdecode(''),'/35001/35022.html','true',[],'','']
	],'',''],
	['PAGE','26701',jdecode('Children%26%23x27%3Bs+Performances'),jdecode(''),'/26701.html','false',[],'',''],
	['PAGE','21501',jdecode('Event+Poster'),jdecode(''),'/21501.html','false',[],'',''],
	['PAGE','4201',jdecode('Special+Events'),jdecode(''),'/4201/index.html','true',[ 
		['PAGE','65601',jdecode('La+Alfombra'),jdecode(''),'/4201/65601.html','true',[],'','']
	],'',''],
	['PAGE','494',jdecode('Media+Room'),jdecode(''),'/494.html','false',[],'',''],
	['PAGE','515',jdecode('Plaza+Grounds+%26+Gardens'),jdecode(''),'/515.html','false',[],'',''],
	['PAGE','4264',jdecode('About+us'),jdecode(''),'/4264/index.html','true',[ 
		['PAGE','58601',jdecode('Redevelopment'),jdecode(''),'/4264/58601.html','true',[],'',''],
		['PAGE','19201',jdecode('Opportunities'),jdecode(''),'/4264/19201.html','true',[],'',''],
		['PAGE','4285',jdecode('Supporters'),jdecode(''),'/4264/4285.html','true',[],'',''],
		['PAGE','23801',jdecode('District+1+'),jdecode(''),'/4264/23801.html','true',[],'','']
	],'',''],
	['PAGE','4327',jdecode('Contact+Us'),jdecode(''),'/4327.html','true',[],'',''],
	['PAGE','5206',jdecode('Guestbook'),jdecode(''),'/5206.html','true',[],'',''],
	['PAGE','20601',jdecode('Main+Plaza+Photos'),jdecode(''),'/20601.html','true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Match';
theSitetree.paletteFamily='2354B7';
theSitetree.keyvisualId='2698';
theSitetree.keyvisualName='kv_2698.jpg';
theSitetree.fontsetId='10404';
theSitetree.graphicsetId='10633';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='C6E2FE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Match',
				paletteFamily: 	'2354B7',
				keyvisualId: 	'2698',
				keyvisualName: 	'kv_2698.jpg',
				fontsetId: 		'10404',
				graphicsetId: 	'10633',
				contentColor: 	'000000',
				contentBGColor: 'C6E2FE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'2354B7',
				e_color: 		'707070',
				f_color: 		'707070',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-9341255']={
webappId:    '1501',
documentId:  '401',
internalId:  '9341255',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-5206avec10inzzf5']={
webappId:    '1002',
documentId:  '5206',
internalId:  '5206avec10inzzf5',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100831-100347'
};
webappMappings['7060']=webappMappings['7060-5738b2e5d6a18e676319a3c54fa756bf']={
webappId:    '7060',
documentId:  '20601',
internalId:  '5738b2e5d6a18e676319a3c54fa756bf',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20090817-154655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100831-100848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100120-115207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31001',
internalId:  '',
customField: '20090601-134751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38901',
internalId:  '',
customField: '20100712-163610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26701',
internalId:  '',
customField: '20081211-125910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20091207-120835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35022',
internalId:  '',
customField: '20080812-191950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21501',
internalId:  '',
customField: '20081027-204301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20080902-190050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20090106-174655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20080516-161824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4222',
internalId:  '',
customField: '20100727-123920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20100120-115325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20090424-185653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4243',
internalId:  '',
customField: '20090601-141721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4264',
internalId:  '',
customField: '20100727-121857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20080731-175837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20090116-163001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4285',
internalId:  '',
customField: '20080514-170736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4327',
internalId:  '',
customField: '20100120-115441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5206',
internalId:  '',
customField: '20100308-172011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20080731-180416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55201',
internalId:  '',
customField: '20100610-175043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55222',
internalId:  '',
customField: '20100415-153303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58601',
internalId:  '',
customField: '20090424-165930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65601',
internalId:  '',
customField: '20100104-105248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109101',
internalId:  '',
customField: '20091023-095343'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZZF5';
var companyName   = 'Main+Plaza+-+the+Heart+of+the+City';
var htmlTitle	  = '';
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();
};
