/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],''],
	['PAGE','170312',jdecode('Bridal+Services'),jdecode(''),'/170312/index.html','true',[ 
		['PAGE','118912',jdecode('Gowns+for+%24150'),jdecode(''),'/170312/118912.html','true',[],''],
		['PAGE','170333',jdecode('Qualify+for+Free+Use'),jdecode(''),'/170312/170333.html','true',[],''],
		['PAGE','170812',jdecode('How+It+Works'),jdecode(''),'/170312/170812.html','true',[],''],
		['PAGE','3201',jdecode('Inventory+Available'),jdecode(''),'/170312/3201.html','true',[],''],
		['PAGE','63901',jdecode('Bride%26%23x27%3Bs+Agreement'),jdecode(''),'/170312/63901.html','true',[],'']
	],''],
	['PAGE','2264',jdecode('Ciao+Bella%21+Prom+Gown'),jdecode(''),'/2264/index.html','true',[ 
		['PAGE','7522',jdecode('Still+Single%3F+'),jdecode(''),'/2264/7522.html','true',[],'']
	],''],
	['PAGE','55901',jdecode('Donate'),jdecode(''),'/55901/index.html','true',[ 
		['PAGE','171812',jdecode('Volunteer'),jdecode(''),'/55901/171812.html','true',[],''],
		['PAGE','171833',jdecode('Donate+%24+or+in-kind'),jdecode(''),'/55901/171833.html','true',[],''],
		['PAGE','171854',jdecode('Fundraise'),jdecode(''),'/55901/171854.html','true',[],''],
		['PAGE','138012',jdecode('Dress+Drive+411'),jdecode(''),'/55901/138012.html','true',[],''],
		['PAGE','97601',jdecode('Tax+Ded.+Receipt+'),jdecode(''),'/55901/97601.html','true',[],'']
	],''],
	['PAGE','170412',jdecode('Resources'),jdecode(''),'/170412/index.html','true',[ 
		['PAGE','7501',jdecode('Details%21+Details%21'),jdecode(''),'/170412/7501.html','true',[],''],
		['PAGE','4101',jdecode('Reflections'),jdecode(''),'/170412/4101.html','true',[],''],
		['PAGE','57401',jdecode('MD+Great+Deals+'),jdecode(''),'/170412/57401.html','true',[],'']
	],''],
	['PAGE','43101',jdecode('Contact+Us'),jdecode(''),'/43101/index.html','true',[ 
		['PAGE','109212',jdecode('About+Us'),jdecode(''),'/43101/109212.html','true',[],''],
		['PAGE','73101',jdecode('Our+Directors%21+'),jdecode(''),'/43101/73101.html','true',[],''],
		['PAGE','171875',jdecode('Positions+Available'),jdecode(''),'/43101/171875.html','true',[],''],
		['PAGE','56001',jdecode('Guestbook'),jdecode(''),'/43101/56001.html','true',[],'']
	],''],
	['PAGE','55922',jdecode('AWARDS'),jdecode(''),'/55922.html','false',[],''],
	['PAGE','137812',jdecode('SPREADING+THE+WORD'),jdecode(''),'/137812.html','false',[],''],
	['PAGE','112212',jdecode('WAIT+LIST'),jdecode(''),'/112212.html','false',[],''],
	['PAGE','156612',jdecode('MD+DIRECTIONS'),jdecode(''),'/156612.html','false',[],''],
	['PAGE','161012',jdecode('STDs'),jdecode(''),'/161012.html','false',[],''],
	['PAGE','161033',jdecode('CRISIS+Pregnancy'),jdecode(''),'/161033.html','false',[],''],
	['PAGE','161054',jdecode('Renewal+of+Chastity'),jdecode(''),'/161054.html','false',[],''],
	['PAGE','161112',jdecode('Good+News%21'),jdecode(''),'/161112.html','false',[],''],
	['PAGE','162712',jdecode('Mercy++After+Abortion'),jdecode(''),'/162712.html','false',[],'']];
var siteelementCount=33;
theSitetree.topTemplateName='Herzchen';
theSitetree.paletteFamily='96BAF6';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17098';
theSitetree.graphicsetId='12484';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Herzchen',
				paletteFamily: 	'96BAF6',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17098',
				graphicsetId: 	'12484',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'96BAF6',
				e_color: 		'82A6F1',
				f_color: 		'85AAF1',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-56001aendu0in2cy4']={
webappId:    '1002',
documentId:  '56001',
internalId:  '56001aendu0in2cy4',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20100113-153057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100113-152938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20091109-164711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2264',
internalId:  '',
customField: '20100308-010305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97601',
internalId:  '',
customField: '20090218-153158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20091109-111337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7522',
internalId:  '',
customField: '20091208-010144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63901',
internalId:  '',
customField: '20091113-113332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55901',
internalId:  '',
customField: '20100116-011217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43101',
internalId:  '',
customField: '20100116-010102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55922',
internalId:  '',
customField: '20090701-153454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56001',
internalId:  '',
customField: '20090315-194859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57401',
internalId:  '',
customField: '20100308-004629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109212',
internalId:  '',
customField: '20100116-010133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73101',
internalId:  '',
customField: '20100113-154812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112212',
internalId:  '',
customField: '20090828-211541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118912',
internalId:  '',
customField: '20091208-001156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137812',
internalId:  '',
customField: '20090723-094854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138012',
internalId:  '',
customField: '20100307-235835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156612',
internalId:  '',
customField: '20091023-134832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161112',
internalId:  '',
customField: '20091109-131240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161054',
internalId:  '',
customField: '20091113-114732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161033',
internalId:  '',
customField: '20091113-130101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161012',
internalId:  '',
customField: '20091109-143536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162712',
internalId:  '',
customField: '20091109-150720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170312',
internalId:  '',
customField: '20100113-150806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170333',
internalId:  '',
customField: '20100113-152601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170812',
internalId:  '',
customField: '20100113-152639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170412',
internalId:  '',
customField: '20091207-015358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171875',
internalId:  '',
customField: '20100116-010818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171812',
internalId:  '',
customField: '20100116-011322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171833',
internalId:  '',
customField: '20100116-011616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171854',
internalId:  '',
customField: '20091207-021043'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2CY4';
var companyName   = 'St.+Anthony%27s+Bridal';
var htmlTitle	  = 'www.stanthonysbridal.com';
var metaKeywords  = 'Non-profit%2C+donations%2C+bridal%2C+wedding+gown%2C+wedding+dress%2C+bridesmaid%2C+tux+Chriistian%2C+Catholic%2C++St.+Anthony';
var metaContents  = 'Bridal+Non-proft+offering+wedding+gown%2C+dress%2C+gowns%2C+tuxes%2C+brides+information%2C+Maryland+D.C.+area+';
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();
};
