/* [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','301',jdecode('Home'),jdecode(''),'/301/index.html','true',[ 
		['PAGE','5001',jdecode('SPEAK%21+Mission+%26+Vision'),jdecode(''),'/301/5001.html','true',[],'',''],
		['PAGE','5022',jdecode('Who+We+Are'),jdecode(''),'/301/5022.html','true',[],'',''],
		['PAGE','16069',jdecode('Contact+SPEAK%21'),jdecode(''),'/301/16069.html','true',[],'','']
	],'',''],
	['PAGE','13601',jdecode('Event+Categories'),jdecode(''),'/13601.html','true',[],'',''],
	['PAGE','5085',jdecode('SPEAK%21+Schedule'),jdecode(''),'/5085/index.html','true',[ 
		['PAGE','5722',jdecode('Practice+Sites'),jdecode(''),'/5085/5722.html','true',[],'','']
	],'',''],
	['PAGE','5106',jdecode('Registration'),jdecode(''),'/5106/index.html','true',[ 
		['PAGE','37901',jdecode('SPEAK%21+Application'),jdecode(''),'/5106/37901.html','true',[],'',''],
		['PAGE','69723',jdecode('Wee+SPEAK%21'),jdecode(''),'/5106/69723.html','true',[],'',''],
		['PAGE','11401',jdecode('FAQ%26%23x27%3Bs'),jdecode(''),'/5106/11401.html','true',[],'','']
	],'',''],
	['PAGE','5064',jdecode('SPEAK%21+News'),jdecode(''),'/5064.html','true',[],'',''],
	['PAGE','19122',jdecode('Donations%2FSponorship'),jdecode(''),'/19122.html','true',[],'',''],
	['PAGE','10601',jdecode('Speaker%26%23x27%3Bs+Bureau'),jdecode(''),'/10601.html','true',[],'',''],
	['PAGE','5043',jdecode('Oratory+Links'),jdecode(''),'/5043.html','true',[],'',''],
	['PAGE','5127',jdecode('Volunteer'),jdecode(''),'/5127/index.html','true',[ 
		['PAGE','10001',jdecode('Volunteer+Request+Form'),jdecode(''),'/5127/10001.html','true',[],'','']
	],'',''],
	['PAGE','5701',jdecode('Photo+Gallery'),jdecode(''),'/5701/index.html','true',[ 
		['PAGE','88623',jdecode('Glenarden+Woods+Chapter+Final+Performance+2009'),jdecode(''),'/5701/88623.html','true',[],'',''],
		['PAGE','100045',jdecode('Spring+2010+Tournament'),jdecode(''),'/5701/100045.html','true',[],'',''],
		['PAGE','53944',jdecode('Fall+2009+Tournament'),jdecode(''),'/5701/53944.html','true',[],'',''],
		['PAGE','54423',jdecode('Spring+09+Tournament'),jdecode(''),'/5701/54423.html','true',[],'',''],
		['PAGE','64523',jdecode('Barnes+%26+Noble+Bookfair'),jdecode(''),'/5701/64523.html','true',[],'','']
	],'',''],
	['PAGE','32801',jdecode('Coaches'),jdecode(''),'/32801.html','false',[],'',''],
	['PAGE','32822',jdecode('Judges'),jdecode(''),'/32822.html','false',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Comedy';
theSitetree.paletteFamily='85A246';
theSitetree.keyvisualId='2796';
theSitetree.keyvisualName='spirale.jpg';
theSitetree.fontsetId='10601';
theSitetree.graphicsetId='10719';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='9EBA61';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Comedy',
				paletteFamily: 	'85A246',
				keyvisualId: 	'2796',
				keyvisualName: 	'spirale.jpg',
				fontsetId: 		'10601',
				graphicsetId: 	'10719',
				contentColor: 	'000000',
				contentBGColor: '9EBA61',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'647C2F',
				e_color: 		'647C2F',
				f_color: 		'647C2F',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-511']={
webappId:    '7008',
documentId:  '10601',
internalId:  '511',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-512']={
webappId:    '7008',
documentId:  '10001',
internalId:  '512',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-4be3ce119f9bdcfc8be8df531ac0cb3f']={
webappId:    '7060',
documentId:  '53944',
internalId:  '4be3ce119f9bdcfc8be8df531ac0cb3f',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-894763']={
webappId:    '1501',
documentId:  '301',
internalId:  '894763',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69723',
internalId:  '',
customField: '20100226-064913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100511-093003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100501-114803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20100501-114955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16069',
internalId:  '',
customField: '20090809-115833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20100201-152530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5085',
internalId:  '',
customField: '20100201-152859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5722',
internalId:  '',
customField: '20100201-154933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64523',
internalId:  '',
customField: '20090506-145723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5106',
internalId:  '',
customField: '20100201-140731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20090716-145307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20100412-090923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19122',
internalId:  '',
customField: '20100510-193930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5127',
internalId:  '',
customField: '20090809-122834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20090506-140442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20090506-141146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5064',
internalId:  '',
customField: '20100330-212318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20100510-192949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5043',
internalId:  '',
customField: '20090506-141123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32801',
internalId:  '',
customField: '20081119-221251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32822',
internalId:  '',
customField: '20081119-221251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100045',
internalId:  '',
customField: '20100721-182049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53944',
internalId:  '',
customField: '20100201-175233'
};
webappMappings['7060']=webappMappings['7060-a0c30c671cd5d076148ed083ec8f20a6']={
webappId:    '7060',
documentId:  '88623',
internalId:  'a0c30c671cd5d076148ed083ec8f20a6',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54423',
internalId:  '',
customField: '20100201-174337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88623',
internalId:  '',
customField: '20100315-124903'
};
webappMappings['7060']=webappMappings['7060-72bdca7b9436472a5863b774b053ec37']={
webappId:    '7060',
documentId:  '100045',
internalId:  '72bdca7b9436472a5863b774b053ec37',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INEMAY';
var companyName   = 'SPEAK%21++MD+Oratory+League%2C+Inc.';
var htmlTitle	  = 'SPEAK%21++MD+Oratory+League%2C+Inc';
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();
};
