/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','83112',jdecode('2009+Prom'),jdecode(''),'/83112/index.html','true',[ 
		['PAGE','56301',jdecode('2008+Prom'),jdecode(''),'/83112/56301.html','true',[],''],
		['PAGE','55001',jdecode('2007+Prom'),jdecode(''),'/83112/55001.html','true',[],''],
		['PAGE','67322',jdecode('FAQ+about+Prom'),jdecode(''),'/83112/67322.html','true',[],'']
	],''],
	['PAGE','36701',jdecode('Online+store'),jdecode(''),'/36701/index.html','true',[ 
		['PAGE','19701',jdecode('Shirts'),jdecode(''),'/36701/19701.html','true',[],''],
		['PAGE','31001',jdecode('Where+our+Shirts+Have+Sold'),jdecode(''),'/36701/31001.html','true',[],''],
		['PAGE','70001',jdecode('Key+to+be+carefree'),jdecode(''),'/36701/70001.html','true',[],'']
	],''],
	['PAGE','24101',jdecode('In+the+News'),jdecode(''),'/24101/index.html','true',[ 
		['PAGE','47601',jdecode('Press+Releases'),jdecode(''),'/24101/47601.html','true',[],''],
		['PAGE','41501',jdecode('+KNX+1070+Radio+Interview'),jdecode(''),'/24101/41501.html','true',[],''],
		['PAGE','48801',jdecode('ABC+7+Eyewitness+News+Interview'),jdecode(''),'/24101/48801.html','true',[],''],
		['PAGE','58101',jdecode('Teen+Talk+Television+Show'),jdecode(''),'/24101/58101.html','true',[],''],
		['PAGE','60901',jdecode('NextStep+Magazine'),jdecode(''),'/24101/60901.html','true',[],''],
		['PAGE','61601',jdecode('IDEA'),jdecode(''),'/24101/61601.html','true',[],''],
		['PAGE','62401',jdecode('KTLA+News'),jdecode(''),'/24101/62401.html','true',[],''],
		['PAGE','64301',jdecode('Los+Angeles+Times'),jdecode(''),'/24101/64301.html','true',[],'']
	],''],
	['PAGE','4801',jdecode('Donations'),jdecode(''),'/4801.html','true',[],''],
	['PAGE','452',jdecode('About+Us'),jdecode(''),'/452/index.html','true',[ 
		['PAGE','5501',jdecode('Our+Story'),jdecode(''),'/452/5501.html','true',[],'']
	],''],
	['PAGE','536',jdecode('Contact+Us'),jdecode(''),'/536.html','true',[],''],
	['PAGE','84112',jdecode('Our+Partners'),jdecode(''),'/84112.html','true',[],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Court';
theSitetree.paletteFamily='EEBE79';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16443';
theSitetree.graphicsetId='12145';
theSitetree.contentColor='472A15';
theSitetree.contentBGColor='FCE7CA';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Court',
				paletteFamily: 	'EEBE79',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16443',
				graphicsetId: 	'12145',
				contentColor: 	'472A15',
				contentBGColor: 'FCE7CA',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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['4001']=webappMappings['4001-6039639']={
webappId:    '4001',
documentId:  '36701',
internalId:  '6039639',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-acde24dffa70b7cecc6b520076d20e5e']={
webappId:    '7060',
documentId:  '41501',
internalId:  'acde24dffa70b7cecc6b520076d20e5e',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-70f5fdcc4a3ef410519d60b491149041']={
webappId:    '7060',
documentId:  '48801',
internalId:  '70f5fdcc4a3ef410519d60b491149041',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-d68d880bf76b961d3fc291b5bfa8dd56']={
webappId:    '7060',
documentId:  '55001',
internalId:  'd68d880bf76b961d3fc291b5bfa8dd56',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090919-103904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83112',
internalId:  '',
customField: '20090919-072750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56301',
internalId:  '',
customField: '20090919-072818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70001',
internalId:  '',
customField: '20081229-203834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36701',
internalId:  '',
customField: '20080804-110523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20081229-203917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31001',
internalId:  '',
customField: '20070104-102330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55001',
internalId:  '',
customField: '20090919-072845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67322',
internalId:  '',
customField: '20090919-073034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24101',
internalId:  '',
customField: '20090630-132844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47601',
internalId:  '',
customField: '20080605-212756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20071228-153725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48801',
internalId:  '',
customField: '20071228-154022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58101',
internalId:  '',
customField: '20071228-155159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60901',
internalId:  '',
customField: '20080114-223307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61601',
internalId:  '',
customField: '20080114-225719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62401',
internalId:  '',
customField: '20080129-141606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64301',
internalId:  '',
customField: '20080326-200947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20090919-073246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090919-104007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20090919-104046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20090919-073305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84112',
internalId:  '',
customField: '20090212-194414'
};
var canonHostname = 'cm4all.aplus.net';
var accountId     = 'AAPLU0INEJFI';
var companyName   = 'No+Worries+Now+Foundation';
var htmlTitle	  = 'No+Worries+Now';
var metaKeywords  = 'osteosarcoma%2C+shiri%2C+bone+cancer%2C+gumbiner%2C+frederick+scarf%2C+la+youth%2C+shiri+gumbiner';
var metaContents  = 'The+Shiri+Foundation%2C+Nothing+is+Impossible';
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();
};
