/* [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','601',jdecode('Inicio'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','652',jdecode('Nuestra+Organizaci%C3%B3n'),jdecode(''),'/652/index.html','true',[ 
		['PAGE','778',jdecode('Nuestros+Clubes'),jdecode(''),'/652/778.html','true',[],'',''],
		['PAGE','150998',jdecode('Nuestro+equipo'),jdecode(''),'/652/150998.html','true',[],'',''],
		['PAGE','10001',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/652/10001.html','true',[],'','']
	],'',''],
	['PAGE','673',jdecode('Calendario+Deportivo'),jdecode(''),'/673.html','true',[],'',''],
	['PAGE','757',jdecode('Escalaf%C3%B3n+Departamental'),jdecode(''),'/757.html','true',[],'',''],
	['PAGE','694',jdecode('Normatividad'),jdecode(''),'/694/index.html','true',[ 
		['PAGE','151019',jdecode('Estatutos'),jdecode(''),'/694/151019.html','true',[],'',''],
		['PAGE','151040',jdecode('Reglamentos'),jdecode(''),'/694/151040.html','true',[],'','']
	],'',''],
	['PAGE','715',jdecode('Noticias+y+Convocatorias'),jdecode(''),'/715.html','true',[],'',''],
	['PAGE','151061',jdecode('Resultados'),jdecode(''),'/151061/index.html','true',[ 
		['PAGE','736',jdecode('Resultados+de+este+a%C3%B1o'),jdecode(''),'/151061/736.html','true',[],'',''],
		['PAGE','105143',jdecode('Resultados+Hist%C3%B3ricos'),jdecode(''),'/151061/105143.html','true',[],'','']
	],'',''],
	['PAGE','151082',jdecode('Enlaces'),jdecode(''),'/151082/index.html','true',[ 
		['PAGE','151103',jdecode('Fedecobol'),jdecode(''),'/151082/151103.html','true',[],'',''],
		['PAGE','151124',jdecode('PABCON'),jdecode(''),'/151082/151124.html','true',[],'',''],
		['PAGE','151145',jdecode('Conf+Sudamericana'),jdecode(''),'/151082/151145.html','true',[],'',''],
		['PAGE','151166',jdecode('Concecabol'),jdecode(''),'/151082/151166.html','true',[],'','']
	],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='336699';
theSitetree.keyvisualId='1227';
theSitetree.keyvisualName='bowling.jpg';
theSitetree.fontsetId='192';
theSitetree.graphicsetId='230';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Profile',
				paletteFamily: 	'336699',
				keyvisualId: 	'1227',
				keyvisualName: 	'bowling.jpg',
				fontsetId: 		'192',
				graphicsetId: 	'230',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				a_color: 		'336699',
				b_color: 		'336699',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100715-113915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20100621-173557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20100111-114336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20090703-094626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20100106-181543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20100624-163037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20090703-092013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20090702-062321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20090703-093749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105143',
internalId:  '',
customField: '20100217-083512'
};
webappMappings['1501']=webappMappings['1501-14898036']={
webappId:    '1501',
documentId:  '601',
internalId:  '14898036',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150998',
internalId:  '',
customField: '20100111-115028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151019',
internalId:  '',
customField: '20100111-102952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151040',
internalId:  '',
customField: '20100111-102952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151061',
internalId:  '',
customField: '20100429-193533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151082',
internalId:  '',
customField: '20100111-102952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151103',
internalId:  '',
customField: '20100111-102952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151124',
internalId:  '',
customField: '20100111-102952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151145',
internalId:  '',
customField: '20100111-102952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151166',
internalId:  '',
customField: '20100111-102952'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INF3NC';
var companyName   = 'Liga+de+Bolo+de+Cundinamarca';
var htmlTitle	  = 'Liga+de+Bolo+de+Cundinamarca';
var metaKeywords  = 'Deporte%2C+Bowling%2C+Cundinamarca%2C+Bolo%2C+Boliche';
var metaContents  = 'Deporte+del+Bowling+en+el+departamento+de+Cundinamarca.';
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();
};
