/* [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','38701',jdecode('Home'),jdecode(''),'/38701.html','true',[],'',''],
	['PAGE','301',jdecode('Visi%C3%B3n'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','457',jdecode('Doctrina'),jdecode(''),'/457.html','true',[],'',''],
	['PAGE','96901',jdecode('Niveles'),jdecode(''),'/96901.html','true',[],'',''],
	['PAGE','59401',jdecode('Matr%C3%ADcula'),jdecode(''),'/59401.html','true',[],'',''],
	['PAGE','352',jdecode('Links'),jdecode(''),'/352.html','true',[],'',''],
	['PAGE','478',jdecode('Contacto'),jdecode(''),'/478.html','true',[],'',''],
	['PAGE','28701',jdecode('Tutor%C3%ADa'),jdecode(''),'/28701/index.html','true',[ 
		['PAGE','28722',jdecode('Definici%C3%B3n'),jdecode(''),'/28701/28722.html','true',[],'',''],
		['PAGE','28743',jdecode('Aplicaci%C3%B3n'),jdecode(''),'/28701/28743.html','true',[],'',''],
		['PAGE','28764',jdecode('Interacci%C3%B3n'),jdecode(''),'/28701/28764.html','true',[],'','']
	],'',''],
	['PAGE','10601',jdecode('Servicios'),jdecode(''),'/10601/index.html','true',[ 
		['PAGE','10622',jdecode('Seminarios'),jdecode(''),'/10601/10622.html','true',[],'',''],
		['PAGE','10643',jdecode('Campa%C3%B1as'),jdecode(''),'/10601/10643.html','true',[],'',''],
		['PAGE','10664',jdecode('Instituto+Intensivo'),jdecode(''),'/10601/10664.html','true',[],'',''],
		['PAGE','10685',jdecode('Gu%C3%ADas+'),jdecode(''),'/10601/10685.html','true',[],'','']
	],'',''],
	['PAGE','16301',jdecode('Noticias'),jdecode(''),'/16301.html','true',[],'',''],
	['PAGE','5701',jdecode('Galer%C3%ADa'),jdecode(''),'/5701.html','true',[],'',''],
	['PAGE','5506',jdecode('Guestbook'),jdecode(''),'/5506.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Champagne';
theSitetree.paletteFamily='426388';
theSitetree.keyvisualId='11360';
theSitetree.keyvisualName='kv_11360.jpg';
theSitetree.fontsetId='31943';
theSitetree.graphicsetId='13786';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='426388';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Champagne',
				paletteFamily: 	'426388',
				keyvisualId: 	'11360',
				keyvisualName: 	'kv_11360.jpg',
				fontsetId: 		'31943',
				graphicsetId: 	'13786',
				contentColor: 	'000000',
				contentBGColor: '426388',
				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['1002']=webappMappings['1002-5506aendu0in2kqq']={
webappId:    '1002',
documentId:  '5506',
internalId:  '5506aendu0in2kqq',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-6db5ded433e30f9f24d01b957529b01b']={
webappId:    '7060',
documentId:  '5701',
internalId:  '6db5ded433e30f9f24d01b957529b01b',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-26']={
webappId:    '7008',
documentId:  '478',
internalId:  '26',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-13']={
webappId:    '7050',
documentId:  '16301',
internalId:  '13',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100727-100903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20100727-142045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28701',
internalId:  '',
customField: '20080306-212701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28722',
internalId:  '',
customField: '20080306-230822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28743',
internalId:  '',
customField: '20080209-153617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28764',
internalId:  '',
customField: '20100727-141312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20080205-092830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10622',
internalId:  '',
customField: '20080206-142456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10643',
internalId:  '',
customField: '20080306-231006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10664',
internalId:  '',
customField: '20080306-231028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10685',
internalId:  '',
customField: '20080306-231048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '457',
internalId:  '',
customField: '20100727-113952'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '38701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '478',
internalId:  '',
customField: '20080205-112334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5506',
internalId:  '',
customField: '20100727-162912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20080205-165518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16301',
internalId:  '',
customField: '20080317-161850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38701',
internalId:  '',
customField: '20100811-162802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59401',
internalId:  '',
customField: '20100727-095856'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '38701',
internalId:  '1501',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-14460']={
webappId:    '7008',
documentId:  '59401',
internalId:  '14460',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96901',
internalId:  '',
customField: '20100811-162754'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2KQQ';
var companyName   = 'INSTITUTO+TEOL%C3%93GICO+BEREA+INTERNACIONAL';
var htmlTitle	  = 'Instituto+Teol%C3%B3gico+Berea+Internacional+%3A%3A+AMIP';
var metaKeywords  = 'Instituto%2C+instituto%2C+teol%C3%B3gico%2C+teologico%2C+b%C3%ADblico%2C+cristiano%2C+berea%2C+ibberea%2C+amip%2C+zonaandina%2C+biblia%2C+iglesia%2C+pentecostal%2C+pentecost%C3%A9s%2Cmovimiento%2Cmisionero%2Capostolico%2Ccatolico%2Cuniversal';
var metaContents  = 'Instituto+Teol%C3%B3gico+Berea+Internacional+Amip';
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();
};

