/* [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','9601',jdecode('Welcome+to+COPS'),jdecode(''),'/9601.html','true',[],'',''],
	['PAGE','9694',jdecode('About+Us'),jdecode(''),'/9694.html','true',[],'',''],
	['PAGE','12401',jdecode('Espanol'),jdecode(''),'/12401.html','true',[],'',''],
	['PAGE','9673',jdecode('Foundation+of+Apostles+%26+Prophets'),jdecode(''),'/9673.html','true',[],'',''],
	['PAGE','9778',jdecode('Media'),jdecode(''),'/9778.html','true',[],'',''],
	['PAGE','9736',jdecode('Articles'),jdecode(''),'/9736.html','true',[],'',''],
	['PAGE','9757',jdecode('Upcoming+Events+%26+Conferences'),jdecode(''),'/9757.html','true',[],'',''],
	['PAGE','9652',jdecode('Links'),jdecode(''),'/9652.html','true',[],'',''],
	['PAGE','9799',jdecode('Contact'),jdecode(''),'/9799.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='292';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'292',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7050']=webappMappings['7050-15249']={
webappId:    '7050',
documentId:  '9736',
internalId:  '15249',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20110601-000204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9652',
internalId:  '',
customField: '20110101-144438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12401',
internalId:  '',
customField: '20100628-163218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9736',
internalId:  '',
customField: '20100311-203842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9778',
internalId:  '',
customField: '20100402-151435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9799',
internalId:  '',
customField: '20100621-130917'
};
webappMappings['7008']=webappMappings['7008-26184']={
webappId:    '7008',
documentId:  '9799',
internalId:  '26184',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9673',
internalId:  '',
customField: '20100311-202739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9694',
internalId:  '',
customField: '20100702-182644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9757',
internalId:  '',
customField: '20110601-001249'
};
webappMappings['1501']=webappMappings['1501-41164899']={
webappId:    '1501',
documentId:  '9601',
internalId:  '41164899',
customField: '1501'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INL92P';
var companyName   = 'Coalition+Of+Prophets+-+COPS';
var htmlTitle	  = 'Coalition+of+Prophets+-+www.CoalitionOfProphets.com+-+Apostolic%2FProphetic+ministers+to+the+Church+at+large%2C+and+will+be+instrumental+in+helping+local+Pastors+and+leaders+to+fulfill+the+vision+of+God+for+their+respective+regions+and+communities+-+Ministeri';
var metaKeywords  = 'Coalition+Of+Prophets%2C+Prophets%2C+Apostles%2C+Prophetic%2C+Apostolic%2C+Profetas%2C+Apostol%2C+Holy+Spirit%2C+Espiritu+Santo%2C+Bible%2C+Word+of+God%2C+Gene+Bacon%2C+ICA%2C+COPS%2C+Jesus+Christ%2C+God%2C+International+Coalition+of+Apostles%2C+Rick+Joyner%2C+Bill+Johnson%2C+Emma+Escobar+de+Pecorini%2C+Mujer+Apostolica%2C+Profecia%2C+Emma+Pecorini%2C+Argentina%2C+USA%2C+Canada%2C+Apostol+Angel+L.+Rosado%2C+Carlos+Anacondia%2C+Five-fold+Ministry%2C+Restoration+of+Apostles+and+Prophets+to+the+Church%2C+Evangelists%2C+Pastors%2C+Teachers%2C+End+Times+Revelation';
var metaContents  = 'The+Official+Website+of+COALITION+of+PROPHETS+-+CoPS+%28An+international+coalition%29+%7C+El+Sitio+Oficial+de+COALICION+de+PROFETAS+-+CoPS+%28Una+coalicion+internacional%29COPS+%28Coalition+Of+Prophets%29+is+the+name+of+this++ministry+given+by+revelation+of+the+Holy+Spirit+to+Gene+Bacon+in+the+early+part+of+2010.++On+February+22nd.+2010+God+spoke+very+clearly+to+Gene+that+He+was+going+to+use+COPS+as+a+vehicle+to+restore+Apostolic+and+Prophetic+authority+back+to+the+Church+and+to+the+world.++The+Holy+Spirit+said+%E2%80%9CApostolic++Prophetic++AUTHORITY.On+that+day+as+Gene+was+driving+home+from+a+Sunday+meeting+in+Quincy%2C+Illinois.+The+Holy+Spirit+began+to+speak+to+him+and+then+began+to+prophesy+through+him+about+the+restoration+of+authority+and+power+through+His+HOLY+Apostles+and+Prophets+to+the+Church+and+to+the+world.++The+Holy+Spirit+began+to+lay+out+a+plan+for+the+restoration+of+Apostolic+and+Prophetic+authority+and+how+it+would+relate+to+and+affect+the+Church.The+following+week-end+Gene+ministered+at+an+Assembly+of+God+Church+in+Belleville%2C+Kansas.+The+authority+that+God+had+spoken+to+him+about+was+evident+in+his+ministry+in+the+two+services+he+conducted.+God+said+that+this+authority+would+continue+to+be+unveiled+and+released+in+the+days+to+come.God+has+used+Gene+in+the+ministry+of+the+Prophet++for+about+sixteen+years%2C+and+then+began+a+transition+into+the+Apostolic+ministry+in+the+following+years.+Today+Gene+ministers+to+some+Churches+as+a+Prophet+and+to+some+as+an+Apostle.+The+anointing+of+Apostle+is+being+increased+in+Gene+while+still+ministering+in+the+Prophetic+anointing+as+well.+The+Apostolic+ministry+and+authority+is+being+increased+in+Gene+since+that+Word+came+from+the+Holy+Spirit+on+that+day.God+is+changing+the+look+and+feel+of+Apostolic+and+Prophetic+ministry+as+it+is+now+functioning+in+the+Church.+A+new+dynamic+of+the+ministry+of+Apostles+and+Prophets+will+soon+be+revealed+through+Jesus+Christ%2C+the+giver+of+the+Five-Fold+ministry+gifts.+Interestingly+enough+is+that+the+new+dynamic+is+the+same+pattern+given+for+Apostles+and+Prophets+in+the+Holy+Scriptures.+The+word+%E2%80%9CHOLY%E2%80%9D+will+be+repeated+more+and+more+as+the+ministries+of+Christ+are+revealed.In+order+to+understand+the+ministry+of+Apostles+and+Prophets%2C++we+must+look+at+these+ministries+in+the+Scriptures.+In+the+New+Testament+we+see+the+ministry+of+the+Apostles+given+as+a+pattern+for+all+Apostles+who+would+follow+in+their+footsteps.In+the+Old+Testament+we+have+the+pattern+for+all+succeeding+prophets+to+follow.+The+ministry+of+Old+Testament+Prophets+was+defined+as+a+ministry+of+power+and+authority.+We+will+cover+the+ministry+of+Old+Testament+Prophets+later+on+our+site.Unfortunately%2C+many+present+day+Apostles+and+Prophets+don%E2%80%99t++even+come+close+to+the+pattern+and+examples+of+their+biblical+predecessors.+For+this+reason%2C+Jesus+is+restoring+the+true+Apostles+and+Prophets+and+is+releasing+the+authority+of+these+ministers.+Prophets+and+Apostles+will+arise+who+have+been+hidden+from+view+until+this+time.+These+ministers+will+imitate+the+life+and+ministry+of+the+Chief+Apostle+and+Prophet%2C+Jesus+Christ.++Care+will+be+taken+to+adhere+to+the+written+Word+of+God+and+to+be+led+by+the+Spirit+of+Truth.+The+Holy+Spirit+is+Holy+and+His+ministers+will+be+holy+and+will+minister+the+Holy+Word+of+the+Lord.+Along+with+Gene+Bacon+other+Apostolic+and+Prophetic+ministers+will+be+a+part+of+COPS.++The+other+ministers+who+are+now+a+part+of+the+Coalition+Of+Prophets+will+form+a+core+group+of+Prophets+and+Apostles+who+will+minister+to+the+Church+at+large%2C+and+will+be+instrumental+in+helping+local+Pastors+and+leaders+to+fulfill+the+vision+of+God+for+their+respective+regions+and+communities.+Through+this+leadership+team+God+will+release+power+and+authority+in+the+local+Churches+as+the+foundation+for+the+Church+to+be+built+upon.+THE+FOUNDATION+OF+APOSTLES+AND+PROPHETS%3A++++';
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();
};

