/* [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 theSitetree=[ 
	['PAGE','261',jdecode('Home'),jdecode(''),'/261.html','true',[],''],
	['PAGE','312',jdecode('Information'),jdecode(''),'/312/index.html','true',[ 
		['PAGE','417',jdecode('Hotel'),jdecode(''),'/312/417.html','true',[],''],
		['PAGE','459',jdecode('Staff'),jdecode(''),'/312/459.html','true',[],''],
		['PAGE','36601',jdecode('Schedule'),jdecode(''),'/312/36601.html','false',[],'']
	],''],
	['PAGE','333',jdecode('Guests'),jdecode(''),'/333/index.html','false',[ 
		['PAGE','42601',jdecode('Leah+Clark'),jdecode(''),'/333/42601.html','false',[],''],
		['PAGE','29601',jdecode('Patrick+Seitz'),jdecode(''),'/333/29601.html','false',[],''],
		['PAGE','28401',jdecode('Mark+Musashi'),jdecode(''),'/333/28401.html','false',[],''],
		['PAGE','24901',jdecode('Wendy+Powell'),jdecode(''),'/333/24901.html','false',[],''],
		['PAGE','24922',jdecode('Blake+Shepard'),jdecode(''),'/333/24922.html','false',[],''],
		['PAGE','40322',jdecode('Gordon+Roque'),jdecode(''),'/333/40322.html','false',[],''],
		['PAGE','24943',jdecode('The+Man+Power'),jdecode(''),'/333/24943.html','false',[],''],
		['PAGE','24964',jdecode('Electric+Attitude'),jdecode(''),'/333/24964.html','false',[],'']
	],''],
	['PAGE','354',jdecode('Events'),jdecode(''),'/354/index.html','false',[ 
		['PAGE','41501',jdecode('Akiba+Dreams+Maid+Cafe'),jdecode(''),'/354/41501.html','true',[],''],
		['PAGE','37901',jdecode('SeeD+Graduation+Ball'),jdecode(''),'/354/37901.html','true',[],''],
		['PAGE','41522',jdecode('CFF+Donation+Events'),jdecode(''),'/354/41522.html','true',[],''],
		['PAGE','522',jdecode('Cosplay+Contest'),jdecode(''),'/354/522.html','true',[],''],
		['PAGE','543',jdecode('AMV+Contest'),jdecode(''),'/354/543.html','true',[],''],
		['PAGE','795',jdecode('Lemon+x+Lime+Variety+Time'),jdecode(''),'/354/795.html','true',[],''],
		['PAGE','22601',jdecode('No+Time+Limit+Stunt+Show'),jdecode(''),'/354/22601.html','true',[],'']
	],''],
	['PAGE','375',jdecode('Registration'),jdecode(''),'/375/index.html','false',[ 
		['PAGE','564',jdecode('Attendee+Registration'),jdecode(''),'/375/564.html','true',[],''],
		['PAGE','585',jdecode('Dealer+Registration'),jdecode(''),'/375/585.html','true',[],''],
		['PAGE','606',jdecode('Artist+Registration'),jdecode(''),'/375/606.html','true',[],''],
		['PAGE','879',jdecode('Group+Registration'),jdecode(''),'/375/879.html','true',[],'']
	],''],
	['PAGE','38043',jdecode('Sponsors'),jdecode(''),'/38043.html','false',[],''],
	['PAGE','396',jdecode('Contact+Us'),jdecode(''),'/396.html','true',[],''],
	['PAGE','13101',jdecode('Forums'),jdecode(''),'/13101.html','true',[],'']];
var siteelementCount=30;
theSitetree.topTemplateName='Metal';
theSitetree.paletteFamily='8D8C67';
theSitetree.keyvisualId='809';
theSitetree.keyvisualName='gartenbau.jpg';
theSitetree.fontsetId='142';
theSitetree.graphicsetId='153';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Metal',
				paletteFamily: 	'8D8C67',
				keyvisualId: 	'809',
				keyvisualName: 	'gartenbau.jpg',
				fontsetId: 		'142',
				graphicsetId: 	'153',
				contentColor: 	'DDDDDD',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'8D8C67',
				b_color: 		'E4E2A7',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '261',
internalId:  '',
customField: '20100621-204356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '312',
internalId:  '',
customField: '20100102-142609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '417',
internalId:  '',
customField: '20100419-231815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24943',
internalId:  '',
customField: '20090924-205305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '459',
internalId:  '',
customField: '20091107-201332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '333',
internalId:  '',
customField: '20100525-194514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24964',
internalId:  '',
customField: '20090924-205613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29601',
internalId:  '',
customField: '20100102-141455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38043',
internalId:  '',
customField: '20100102-150154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '354',
internalId:  '',
customField: '20090731-170656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '522',
internalId:  '',
customField: '20090731-171345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '543',
internalId:  '',
customField: '20100526-125331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20100419-230816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '795',
internalId:  '',
customField: '20100419-220808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41522',
internalId:  '',
customField: '20100419-231612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '375',
internalId:  '',
customField: '20100621-203402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '564',
internalId:  '',
customField: '20091009-124223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '585',
internalId:  '',
customField: '20090731-172845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '606',
internalId:  '',
customField: '20090731-173145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '879',
internalId:  '',
customField: '20090731-173914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '396',
internalId:  '',
customField: '20090731-174059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20100419-231702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36601',
internalId:  '',
customField: '20100525-195240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28401',
internalId:  '',
customField: '20091102-215110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20091107-201636'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '261',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13101',
internalId:  '',
customField: '20091107-200443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40322',
internalId:  '',
customField: '20100219-022949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24901',
internalId:  '',
customField: '20090924-202208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24922',
internalId:  '',
customField: '20090924-203302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42601',
internalId:  '',
customField: '20100525-195145'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN3T9C';
var companyName   = 'PersaCon+-+June+24-26%2C+2011';
var htmlTitle	  = 'PersaCon+Official+Website';
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();
};
