/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],''],
	['PAGE','7101',jdecode('Exiting+reality'),jdecode(''),'/7101.html','true',[],''],
	['PAGE','7901',jdecode('Interesting+links'),jdecode(''),'/7901.html','true',[],''],
	['PAGE','15701',jdecode('B+Mad%40+Jim+Kramer'),jdecode(''),'/15701.html','true',[],''],
	['PAGE','8301',jdecode('Planet+Quick+Fix'),jdecode(''),'/8301.html','true',[],''],
	['PAGE','9501',jdecode('Wave+Vibrations'),jdecode(''),'/9501.html','true',[],''],
	['PAGE','11301',jdecode('Your+Future'),jdecode(''),'/11301.html','true',[],''],
	['PAGE','12301',jdecode('Message+to+Lewis+Black'),jdecode(''),'/12301.html','true',[],''],
	['PAGE','12901',jdecode('Revolutionaries'),jdecode(''),'/12901.html','true',[],''],
	['PAGE','14701',jdecode('Terrorists'),jdecode(''),'/14701.html','true',[],'']];
var siteelementCount=10;
theSitetree.topTemplateName='Metal';
theSitetree.paletteFamily='C6E5F6';
theSitetree.keyvisualId='773';
theSitetree.keyvisualName='sicherheit.jpg';
theSitetree.fontsetId='142';
theSitetree.graphicsetId='159';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Metal',
				paletteFamily: 	'C6E5F6',
				keyvisualId: 	'773',
				keyvisualName: 	'sicherheit.jpg',
				fontsetId: 		'142',
				graphicsetId: 	'159',
				contentColor: 	'DDDDDD',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'C6E5F6',
				b_color: 		'A4BDCC',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20090831-105453'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20090105-085932'
};
webappMappings['7008']=webappMappings['7008-566']={
webappId:    '7008',
documentId:  '7101',
internalId:  '566',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20090314-111458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20090105-080542'
};
webappMappings['7060']=webappMappings['7060-a8aa36e928a554869cb669336bba84b6']={
webappId:    '7060',
documentId:  '9501',
internalId:  'a8aa36e928a554869cb669336bba84b6',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20090117-110316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20090203-073633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20090313-114840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12301',
internalId:  '',
customField: '20090308-214253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12901',
internalId:  '',
customField: '20090215-091422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20090307-105224'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABRI10INV7D4';
var companyName   = 'His+House';
var htmlTitle	  = 'Working+to+bring+the+USA+back+from+a+den+of+thieves+to+a+house+of+prayer';
var metaKeywords  = 'USA+America+country+prosperity+nation+people+civil+rights+inalienable+human+constitution+law+legal+police+cops+judge+God+truth+love+power+justice+system+the+poor+religion+unity+religion%2Cspirituality%2Cworld%2Cgreek%2Closing%2Cmy%2Cbelief%2Cislam%2Ccatholic%2Cfreedom%2Cmuslim%2Cbuddhism%2Cjewish%2Cchristian%2Cfox%2Cnews%2Ccnn%2Cbbc%2Cabc%2Ccbs%2Cnbc%2Cnewport%2Cyahoo%2Cmedia%2Cphilippine%2Cbreaking%2Cdallas%2Cmorning%2Cnew+york%2Cdaily%2Cworld%2Chome+based%2Cbusiness%2Copportunity%2Ccard%2Cservices%2Cbetter+business+bureau%2Csmall+business%2Cschool%2Cinternet%2Cb2b%2C+btob%2Ctravel%2Ceconomy%2Cfor+sale%2Csale%2Cplan%2Cstarting+a+business%2Cinsurance%2Cdirectory%2Csearch%2Conline%2Ccredit+card%2Ccheck%2Ccash%2Cmoney%2Cinvestment%2Cdegree%2Cgift%2Cresource%2Cfind%2Cloan%2Cemployment%2Cvoip%2Centrepreneur%2Cweb+hosting%2Cmailing+list%2Cmarketing%2Cbroker%2Csoftware%2Csmall+business%2Chosting+solution%2Cgovernment%2Cconstitution%2Crights%2Cbear+arms%2Cfreedom%2Cliberty%2Cjustice%2Cspeech%2Cassembly%2Ctrust%2Cfiduciary%2Crifle%2Cwarrior%2Ctruth%2Cmorality%2Ccivil+rights%2Cbill+of+rights%2Camendment%2Cprotest%2Cvote%2Cveto%2Clobby%2Covercome%2Cdemonstration';
var metaContents  = 'His+House+Media+is+a+company+started+by+Rev.+Matthew+W.+Pittaway+in+2001.+The+vision+began+in+1993+after+Matthew+traveled+around+the+USA+itinerating+and+became+very+disturbed+by+the+spiritual+deadness+he+felt+in+the+Christian+churches.+He+knew+the+church+was+misrepresenting+Christ%2C+and+since+it+was+the+teachings+of+Christ+that+brought+Matt+out+of+drug+addiction+and+depression+into+a+healthy+socail+human+being%2C+he+saw+that+media+is+the+answer.++++In+his+own+words+I+wanted+to+use+multi-media+to+try+and+re-create+the+image+of+Christ+in+peoples+minds+from+the+puritanical+right+wing+schizoid+%28pricne+of+peace+bombing+Irq%2C+et+al%29+American+church+Jesus+to+the+Assyrian+prophet+who+walked+on+the+dirt+of+Nazareth+and+the+water+of+Galilee.+I+feel+many+more+people+would+taek+an+interest+and+study+His+actual+WORDS+instead+of+listening+to+some+corporate+control+freak+tell+you+how+to+interpret+them%2C+and+then+judging+Christ+on+TRUTH+not+gossip.+';
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();
};

