/* [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','108',jdecode('Home'),jdecode(''),'/108.html','true',[],'',''],
	['PAGE','129',jdecode('About+us'),jdecode(''),'/129.html','true',[],'',''],
	['PAGE','147',jdecode('Family+Events'),jdecode(''),'/147/index.html','true',[ 
		['PAGE','165',jdecode('Pinoy+Stuff'),jdecode(''),'/147/165.html','true',[],'',''],
		['PAGE','54001',jdecode('Eagles+Corner+'),jdecode(''),'/147/54001.html','true',[],'','']
	],'',''],
	['PAGE','69101',jdecode('Clan+Postings+'),jdecode(''),'/69101.html','true',[],'',''],
	['PAGE','4161',jdecode('Tikbalang+Groove'),jdecode(''),'/4161.html','true',[],'',''],
	['PAGE','201',jdecode('Human+Interest'),jdecode(''),'/201.html','true',[],'',''],
	['PAGE','71101',jdecode('Follow+the+Links'),jdecode(''),'/71101.html','true',[],'',''],
	['PAGE','1395',jdecode('Guestbook'),jdecode(''),'/1395/index.html','true',[ 
		['PAGE','1394',jdecode('Read+Guestbook'),jdecode(''),'/1395/1394.html','false',[],'','']
	],'',''],
	['PAGE','3433',jdecode('The+Year+in+Passing++...'),jdecode(''),'/3433.html','true',[],'',''],
	['PAGE','4680',jdecode('Our+History+in+Pictures....'),jdecode(''),'/4680.html','true',[],'',''],
	['PAGE','86901',jdecode('Reunion+1999'),jdecode(''),'/86901.html','true',[],'',''],
	['PAGE','102001',jdecode('Angel+%26+Aubrey%26%23x27%3Bs+Wedding'),jdecode(''),'/102001.html','true',[],'',''],
	['PAGE','141101',jdecode('Bakasyon+sa+Pilipinas'),jdecode(''),'/141101.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Pencil';
theSitetree.paletteFamily='2D3DA5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10726';
theSitetree.graphicsetId='10514';
theSitetree.contentColor='2d3da5';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Pencil',
				paletteFamily: 	'2D3DA5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10726',
				graphicsetId: 	'10514',
				contentColor: 	'2d3da5',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-64889']={
webappId:    '1501',
documentId:  '108',
internalId:  '64889',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141101',
internalId:  '',
customField: '20100705-082747'
};
webappMappings['1002']=webappMappings['1002-1395AHW050INXXUQ']={
webappId:    '1002',
documentId:  '1395',
internalId:  '1395AHW050INXXUQ',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-a8db0656eda09b1d8af2e1b78d00f1d8']={
webappId:    '7060',
documentId:  '141101',
internalId:  'a8db0656eda09b1d8af2e1b78d00f1d8',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '108',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-91ce41c064207701833a3d0224419bcc']={
webappId:    '7060',
documentId:  '3433',
internalId:  '91ce41c064207701833a3d0224419bcc',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-2662e3416a7260b5431bd43beee081e0']={
webappId:    '7060',
documentId:  '4680',
internalId:  '2662e3416a7260b5431bd43beee081e0',
customField: 'language:en;country:US;'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24G']={
webappId:    '5003',
documentId:  '_1',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24G',
customField: 'en:US:'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24G']={
webappId:    '5003',
documentId:  '108',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24G',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69101',
internalId:  '',
customField: '20100505-165311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108',
internalId:  '',
customField: '20100217-162209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129',
internalId:  '',
customField: '20100315-125743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147',
internalId:  '',
customField: '20100705-154938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165',
internalId:  '',
customField: '20100507-143509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54001',
internalId:  '',
customField: '20100507-223707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4161',
internalId:  '',
customField: '20100512-174330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201',
internalId:  '',
customField: '20091202-140240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71101',
internalId:  '',
customField: '20100503-221505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1395',
internalId:  '',
customField: '20100125-085453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1394',
internalId:  '',
customField: '20061202-031336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3433',
internalId:  '',
customField: '20100122-152041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4680',
internalId:  '',
customField: '20090102-131557'
};
webappMappings['7060']=webappMappings['7060-ab5eb4374c3fba2ddc9ad681516b9747']={
webappId:    '7060',
documentId:  '102001',
internalId:  'ab5eb4374c3fba2ddc9ad681516b9747',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-ad42238860f0dae4070857b1d59eca51']={
webappId:    '7060',
documentId:  '86901',
internalId:  'ad42238860f0dae4070857b1d59eca51',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86901',
internalId:  '',
customField: '20090702-161257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102001',
internalId:  '',
customField: '20100524-175224'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXXUQ';
var companyName   = 'D+E+L+B+R+O+S';
var htmlTitle	  = 'DELBROS++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();
};
