/* [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(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','216011',jdecode('COMING+SOON...'),jdecode(''), jdecode('%2F216011.html'), 'true',[],'',''],
	['PAGE','147701',jdecode('SILVER+BELLS'),jdecode(''), jdecode('%2F147701.html'), 'true',[],'',''],
	['PAGE','35001',jdecode('FARMERS%26%23x27%3B+MARKET'),jdecode(''), jdecode('%2F35001.html'), 'true',[],'',''],
	['PAGE','38901',jdecode('LATINO+MUSIC+FEST'),jdecode(''), jdecode('%2F38901.html'), 'true',[],'',''],
	['PAGE','191811',jdecode('CHESS+ON+THE+PLAZA'),jdecode(''), jdecode('%2F191811.html'), 'true',[],'',''],
	['PAGE','195911',jdecode('ARTIST+ON+PLAZA'),jdecode(''), jdecode('%2F195911.html'), 'true',[],'',''],
	['PAGE','473',jdecode('HAPPENINGS'),jdecode(''), jdecode('%2F473.html'), 'true',[],'',''],
	['PAGE','153523',jdecode('VENDOR+OPPS'),jdecode(''), jdecode('%2F153523.html'), 'true',[],'',''],
	['PAGE','4201',jdecode('PLAZA+EVENTS+PAST'),jdecode(''), jdecode('%2F4201%2Findex.html'), 'true',[ 
		['PAGE','65601',jdecode('La+Alfombra'),jdecode(''), jdecode('%2F4201%2F65601.html'), 'true',[],'','']
	],'',''],
	['PAGE','143701',jdecode('WEEKEND+PARKING'),jdecode(''), jdecode('%2F143701.html'), 'true',[],'',''],
	['PAGE','31001',jdecode('PLAZA+INFO'),jdecode(''), jdecode('%2F31001%2Findex.html'), 'true',[ 
		['PAGE','4222',jdecode('Amenities'),jdecode(''), jdecode('%2F31001%2F4222.html'), 'true',[],'',''],
		['PAGE','452',jdecode('Hours+of+Operation'),jdecode(''), jdecode('%2F31001%2F452.html'), 'true',[],'',''],
		['PAGE','18001',jdecode('Site+Map'),jdecode(''), jdecode('%2F31001%2F18001.html'), 'true',[],'',''],
		['PAGE','10901',jdecode('Rules+%26+Guidelines'),jdecode(''), jdecode('%2F31001%2F10901.html'), 'true',[],'',''],
		['PAGE','4243',jdecode('Hold+Your+Event'),jdecode(''), jdecode('%2F31001%2F4243.html'), 'true',[],'',''],
		['PAGE','15601',jdecode('Main+Plaza+History'),jdecode(''), jdecode('%2F31001%2F15601.html'), 'true',[],'','']
	],'',''],
	['PAGE','4264',jdecode('ABOUT+US'),jdecode(''), jdecode('%2F4264%2Findex.html'), 'true',[ 
		['PAGE','58601',jdecode('Redevelopment'),jdecode(''), jdecode('%2F4264%2F58601.html'), 'true',[],'',''],
		['PAGE','19201',jdecode('Opportunities'),jdecode(''), jdecode('%2F4264%2F19201.html'), 'true',[],'',''],
		['PAGE','4285',jdecode('Supporters'),jdecode(''), jdecode('%2F4264%2F4285.html'), 'true',[],'',''],
		['PAGE','23801',jdecode('District+1+'),jdecode(''), jdecode('%2F4264%2F23801.html'), 'true',[],'','']
	],'',''],
	['PAGE','55222',jdecode('CORAZON+FIESTA'),jdecode(''), jdecode('%2F55222.html'), 'false',[],'',''],
	['PAGE','55201',jdecode('GALA'),jdecode(''), jdecode('%2F55201.html'), 'false',[],'',''],
	['PAGE','26701',jdecode('Children%26%23x27%3Bs+Performances'),jdecode(''), jdecode('%2F26701.html'), 'false',[],'',''],
	['PAGE','21501',jdecode('Event+Poster'),jdecode(''), jdecode('%2F21501.html'), 'false',[],'',''],
	['PAGE','494',jdecode('Media+Room'),jdecode(''), jdecode('%2F494.html'), 'false',[],'',''],
	['PAGE','515',jdecode('Plaza+Grounds+%26+Gardens'),jdecode(''), jdecode('%2F515.html'), 'false',[],'',''],
	['PAGE','4327',jdecode('CONTACT+US'),jdecode(''), jdecode('%2F4327.html'), 'true',[],'',''],
	['PAGE','5206',jdecode('GUESTBOOK'),jdecode(''), jdecode('%2F5206.html'), 'false',[],'',''],
	['PAGE','20601',jdecode('PHOTOS'),jdecode(''), jdecode('%2F20601.html'), 'false',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Heart';
theSitetree.paletteFamily='8B8C8C';
theSitetree.keyvisualId='7802';
theSitetree.keyvisualName='kv_7802.jpg';
theSitetree.fontsetId='16809';
theSitetree.graphicsetId='12275';
theSitetree.contentColor='535353';
theSitetree.contentBGColor='CECFD0';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Heart',
				paletteFamily: 	'8B8C8C',
				keyvisualId: 	'7802',
				keyvisualName: 	'kv_7802.jpg',
				fontsetId: 		'16809',
				graphicsetId: 	'12275',
				contentColor: 	'535353',
				contentBGColor: 'CECFD0',
				a_color: 		'000000',
				b_color: 		'000000',
				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['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: '20120103-105853'
};
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: '20111228-214304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20111102-142131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20111228-214803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31001',
internalId:  '',
customField: '20090601-134751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38901',
internalId:  '',
customField: '20111206-160910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26701',
internalId:  '',
customField: '20081211-125910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20111230-183903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '216011',
internalId:  '',
customField: '20120123-135132'
};
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: '20110513-143523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20101103-153704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20110513-144744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4243',
internalId:  '',
customField: '20111228-215049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4264',
internalId:  '',
customField: '20110924-104158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20110617-190404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20110513-145032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4285',
internalId:  '',
customField: '20101103-154204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4327',
internalId:  '',
customField: '20110630-185522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5206',
internalId:  '',
customField: '20110513-145959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143701',
internalId:  '',
customField: '20110513-142517'
};
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: '20111228-214515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147701',
internalId:  '',
customField: '20111206-155004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191811',
internalId:  '',
customField: '20111027-162047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153523',
internalId:  '',
customField: '20110513-142355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '195911',
internalId:  '',
customField: '20110923-194651'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.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();
};

