/* [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','4555',jdecode('Home'),jdecode(''),'/4555.html','true',[],'',''],
	['PAGE','9022',jdecode('%C2%BFQui%C3%A9nes+somos%3F'),jdecode(''),'/9022.html','true',[],'',''],
	['PAGE','115633',jdecode('CREDITO+PYME'),jdecode(''),'/115633.html','true',[],'',''],
	['PAGE','134112',jdecode('EMERGENTE+PYME'),jdecode(''),'/134112.html','true',[],'',''],
	['PAGE','176534',jdecode('Cr%C3%A9dito+Emprendedor'),jdecode(''),'/176534.html','true',[],'',''],
	['PAGE','9103',jdecode('COMPRA+CASA+1%25'),jdecode(''),'/9103.html','true',[],'',''],
	['PAGE','115612',jdecode('CREDITO+S%2FGARANTIA'),jdecode(''),'/115612.html','true',[],'',''],
	['PAGE','72650',jdecode('BURO+DE+CREDITO'),jdecode(''),'/72650.html','true',[],'',''],
	['PAGE','58334',jdecode('CREDITO+PERSONAL'),jdecode(''),'/58334.html','true',[],'',''],
	['PAGE','140412',jdecode('CREDITO+EXPRESS'),jdecode(''),'/140412.html','true',[],'',''],
	['PAGE','12938',jdecode('Hipoteca+tu+Casa'),jdecode(''),'/12938.html','true',[],'',''],
	['PAGE','67034',jdecode('Palapa+para+Bancos'),jdecode(''),'/67034.html','true',[],'',''],
	['PAGE','56618',jdecode('Cobertura'),jdecode(''),'/56618.html','true',[],'',''],
	['PAGE','9157',jdecode('Cont%C3%A1ctanos'),jdecode(''),'/9157.html','true',[],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='766455';
theSitetree.keyvisualId='1241';
theSitetree.keyvisualName='team.jpg';
theSitetree.fontsetId='192';
theSitetree.graphicsetId='234';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Profile',
				paletteFamily: 	'766455',
				keyvisualId: 	'1241',
				keyvisualName: 	'team.jpg',
				fontsetId: 		'192',
				graphicsetId: 	'234',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'766455',
				b_color: 		'52443C',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-130230']={
webappId:    '1501',
documentId:  '4555',
internalId:  '130230',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4555',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4555',
internalId:  '',
customField: '20100803-232703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9022',
internalId:  '',
customField: '20100521-130718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9103',
internalId:  '',
customField: '20100730-105228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115612',
internalId:  '',
customField: '20100605-114419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115633',
internalId:  '',
customField: '20100730-103927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72650',
internalId:  '',
customField: '20100605-115315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176534',
internalId:  '',
customField: '20100605-113810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58334',
internalId:  '',
customField: '20100521-132117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12938',
internalId:  '',
customField: '20100521-132225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67034',
internalId:  '',
customField: '20100730-105637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56618',
internalId:  '',
customField: '20100605-122423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9157',
internalId:  '',
customField: '20100715-204928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140412',
internalId:  '',
customField: '20100605-120003'
};
webappMappings['7008']=webappMappings['7008-2374']={
webappId:    '7008',
documentId:  '134112',
internalId:  '2374',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134112',
internalId:  '',
customField: '20100730-104956'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INX2Y2';
var companyName   = 'Consultores+Financieros+Asociados';
var htmlTitle	  = '';
var metaKeywords  = 'Credito%2C+Creditos%2C+Financiamiento%2C+Colaborar%2C+Hipotecario%2C+Vivienda%2C+Liquidez%2C+Capital%2C+Negocios%2C+Credito+Pyme%2C+Pymes%2C+Mipymes%2C+Bancos%2C+Credito+Personal%2C+Credito+sin+garantias%2C+Buro+de+credito%2C+Palapa%2C+Prestamos%2C+consultores%2C+exportar%2C';
var metaContents  = 'confia.+consultores+financieros.negocios.+capital+de+trabajo.+pyme.';
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();
};
