/* [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','11901',jdecode('ABOUT+BRIDGES+MINISTRY'),jdecode(''),'/11901.html','true',[],''],
	['PAGE','801',jdecode('IT%26%23x27%3BS+PARABOLIC'),jdecode(''),'/801.html','true',[],''],
	['PAGE','97312',jdecode('Why+REVELATORY+MINISTRY%3F'),jdecode(''),'/97312.html','true',[],''],
	['PAGE','13601',jdecode('DON%26%23x27%3BT+BE+RELIGIOUS'),jdecode(''),'/13601.html','true',[],''],
	['PAGE','14301',jdecode('+NEWSLETTER+%26+ARCHIVE'),jdecode(''),'/14301.html','true',[],''],
	['PAGE','32812',jdecode('BUY+THE+BOOK'),jdecode(''),'/32812.html','true',[],''],
	['PAGE','38612',jdecode('LINKS'),jdecode(''),'/38612.html','true',[],''],
	['PAGE','48812',jdecode('CONTACT'),jdecode(''),'/48812.html','true',[],''],
	['PAGE','82612',jdecode('Prophetic+Forum'),jdecode(''),'/82612.html','true',[],''],
	['PAGE','89912',jdecode('INVITE+BRIDGES+'),jdecode(''),'/89912.html','true',[],''],
	['PAGE','91212',jdecode('Jerry+Phillips+Ministries'),jdecode(''),'/91212.html','true',[],''],
	['PAGE','17312',jdecode('SHOP'),jdecode(''),'/17312.html','true',[],''],
	['PAGE','110212',jdecode('The+OOZE'),jdecode(''),'/110212.html','true',[],''],
	['PAGE','122923',jdecode('PODCASTS+%26+Webinars'),jdecode(''),'/122923.html','true',[],'']];
var siteelementCount=14;
theSitetree.topTemplateName='Champagne';
theSitetree.paletteFamily='BECCD8';
theSitetree.keyvisualId='11354';
theSitetree.keyvisualName='kv_11354.jpg';
theSitetree.fontsetId='31943';
theSitetree.graphicsetId='13785';
theSitetree.contentColor='FAFFFF';
theSitetree.contentBGColor='BECCD8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Champagne',
				paletteFamily: 	'BECCD8',
				keyvisualId: 	'11354',
				keyvisualName: 	'kv_11354.jpg',
				fontsetId: 		'31943',
				graphicsetId: 	'13785',
				contentColor: 	'FAFFFF',
				contentBGColor: 'BECCD8',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['4001']=webappMappings['4001-2064922']={
webappId:    '4001',
documentId:  '17312',
internalId:  '2064922',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-abri10in2yvs11917815079']={
webappId:    '1003',
documentId:  '82612',
internalId:  'abri10in2yvs11917815079',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20090624-153827'
};
webappMappings['7008']=webappMappings['7008-341']={
webappId:    '7008',
documentId:  '89912',
internalId:  '341',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20090908-160447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20081121-184727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20100126-145112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17312',
internalId:  '',
customField: '20070209-183129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32812',
internalId:  '',
customField: '20091021-155946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38612',
internalId:  '',
customField: '20090626-141434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48812',
internalId:  '',
customField: '20090908-160021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110212',
internalId:  '',
customField: '20081208-212946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82612',
internalId:  '',
customField: '20091215-155942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89912',
internalId:  '',
customField: '20080708-181405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91212',
internalId:  '',
customField: '20091124-163643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122923',
internalId:  '',
customField: '20100407-163756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97312',
internalId:  '',
customField: '20090624-153411'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11901',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABRI10IN2YVS';
var companyName   = 'BRIDGES++%7E++++PROPHETIC+%2C++REVELATORY+MINISTRY';
var htmlTitle	  = 'BRIDGES+REVELATORY+MINISTRY';
var metaKeywords  = 'HEADprophetic%3BJesus+Christ%3BHoly+Spirit%3Bsupernatural%3B%3Bprophetic+ministry%3Brevelation%3Brevelatory+ministry%3Bpersonal+prophetic+word%3B+speakers%3B+conference%3Bconference+speakers%3Bvision%3B+vision+casting%3Bnewsletter%3Billuminations%3B+prophetic%3Bprophecy%3Bprophesy%3Brevelation%3Bspiritual+readings%3Bvision%3Btranslation%3BJerry+Phillips+Ministries%3Bdreams%3Bdream+interpretation%3Bprediction%3Bpsychic+reading%3BTanzania%3Bvision%3Bvisions%3Bvision+casting%3Bprayer%3Bheaven%3BCatholic%2CCatholics%3BGodislove%3BBiblestudy%3Bjournal%3Bapostolic%3Bparable%3Bparabolic%3Btrance%3Bvision%2FHEAD';
var metaContents  = 'prophetic%3Bprophetic+word%3Bprophetic+ministry%3Brevelation%2C+revelatory%3B+revelatory+ministry%2C+speakers%3B+conference+speakers%3B+personal+prophetic+ministry%3Bprophetic+word%3BPARABOLA+%3B+Parabola+Experiencing+Jesus+Christ+as+Reality%3B+Reality%2C+cosmology%3B+quantum+physicsprediction%3Bdream%3Bdreams%3Bdream+interpretation%3Bprophecy%3Bprophetic+word%3Bprophetic+reading%3BJesus+Christ%3BCatholic%3BCatholics%3Bsupernatural%3BTanzania%3Bmissions%3Bother+dimensions%3Bheaven%3Bmetaphysical%3BJerry+Phillips+Ministries%3BKingdom%3BKingdom+of+God%3BHoly+Spirit%3BKingdom+of+Jesus+Christ%3Bcosmology%3Bquantum+physics%3Btranslations%3Bangels%3Bangelic%3Bnon-locality%3Bastraltravel%2FHEAD';
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();
};
