/* [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','30801',jdecode('IMPORTANTE'),jdecode(''),'/30801.html','true',[],'',''],
	['PAGE','21001',jdecode('Curso+de+Verano'),jdecode(''),'/21001.html','false',[],'',''],
	['PAGE','23801',jdecode('Evento+Especial'),jdecode(''),'/23801.html','true',[],'',''],
	['PAGE','29701',jdecode('Ganadores+Dibujo'),jdecode(''),'/29701.html','false',[],'',''],
	['PAGE','301',jdecode('Inicio'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','20601',jdecode('Nuevos+Beb%C3%A9s'),jdecode(''),'/20601.html','false',[],'',''],
	['PAGE','352',jdecode('Actividades'),jdecode(''),'/352/index.html','true',[ 
		['PAGE','373',jdecode('Corrales'),jdecode(''),'/352/373.html','true',[],'',''],
		['PAGE','394',jdecode('Lago'),jdecode(''),'/352/394.html','true',[],'',''],
		['PAGE','415',jdecode('Guarder%C3%ADa'),jdecode(''),'/352/415.html','true',[],'',''],
		['PAGE','436',jdecode('Gallinero'),jdecode(''),'/352/436.html','true',[],'',''],
		['PAGE','457',jdecode('Palapa'),jdecode(''),'/352/457.html','true',[],'','']
	],'',''],
	['PAGE','478',jdecode('Fotos'),jdecode(''),'/478/index.html','true',[ 
		['PAGE','26801',jdecode('Visitantes'),jdecode(''),'/478/26801.html','true',[],'',''],
		['PAGE','6101',jdecode('Fotos+Visitantes'),jdecode(''),'/478/6101.html','true',[],'',''],
		['PAGE','6201',jdecode('Conoce+Xenpal'),jdecode(''),'/478/6201.html','true',[],'',''],
		['PAGE','6301',jdecode('Visitas+en+Grupo'),jdecode(''),'/478/6301.html','true',[],'','']
	],'',''],
	['PAGE','499',jdecode('Servicios'),jdecode(''),'/499.html','true',[],'',''],
	['PAGE','520',jdecode('Visitas+Escolares'),jdecode(''),'/520.html','true',[],'',''],
	['PAGE','541',jdecode('Fiestas+Infantiles'),jdecode(''),'/541.html','true',[],'',''],
	['PAGE','562',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/562/index.html','true',[ 
		['PAGE','22201',jdecode('Promociones'),jdecode(''),'/562/22201.html','false',[],'','']
	],'',''],
	['PAGE','583',jdecode('Horario+y+Costos'),jdecode(''),'/583.html','true',[],'',''],
	['PAGE','17401',jdecode('Mapa'),jdecode(''),'/17401.html','true',[],'',''],
	['PAGE','15901',jdecode('Oferta+de+Trabajo'),jdecode(''),'/15901.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Seasons_summer';
theSitetree.paletteFamily='AAD165';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='21094';
theSitetree.graphicsetId='13191';
theSitetree.contentColor='2E2E2E';
theSitetree.contentBGColor='AAD165';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Seasons_summer',
				paletteFamily: 	'AAD165',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'21094',
				graphicsetId: 	'13191',
				contentColor: 	'2E2E2E',
				contentBGColor: 'AAD165',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-c5b3ec16f0d2844b51ad655882cfba85']={
webappId:    '7060',
documentId:  '6101',
internalId:  'c5b3ec16f0d2844b51ad655882cfba85',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-207977c64e9dc688067595d5a22f4ae1']={
webappId:    '7060',
documentId:  '6201',
internalId:  '207977c64e9dc688067595d5a22f4ae1',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-2b5cf639e46d93c9d4a09bd955060b45']={
webappId:    '7060',
documentId:  '6301',
internalId:  '2b5cf639e46d93c9d4a09bd955060b45',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-4877']={
webappId:    '7008',
documentId:  '562',
internalId:  '4877',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17401',
internalId:  '',
customField: '20090316-134546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20080803-121454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20090625-214711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '373',
internalId:  '',
customField: '20080220-175112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '394',
internalId:  '',
customField: '20080220-151452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '415',
internalId:  '',
customField: '20080220-152512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '436',
internalId:  '',
customField: '20080220-152754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '457',
internalId:  '',
customField: '20080220-152909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '478',
internalId:  '',
customField: '20080220-154009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20080220-154119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20080220-154206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20080220-154258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20090306-224321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '499',
internalId:  '',
customField: '20080220-154406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '520',
internalId:  '',
customField: '20080827-171407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '541',
internalId:  '',
customField: '20080608-182408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '562',
internalId:  '',
customField: '20090625-151255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '583',
internalId:  '',
customField: '20090730-111900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21001',
internalId:  '',
customField: '20090704-233904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20090703-180400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22201',
internalId:  '',
customField: '20090630-135337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20090731-123229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26801',
internalId:  '',
customField: '20090704-235137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29701',
internalId:  '',
customField: '20090804-090921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30801',
internalId:  '',
customField: '20100716-195050'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INF1E8';
var companyName   = '%C2%A1Todos+los+D%C3%ADas+son+de+Diversi%C3%B3n%21';
var htmlTitle	  = '%3A%3A+XENPAL+Centro+Recreativo%3A%3A';
var metaKeywords  = 'xenpal.com%2Cxenpal%2Cxenpal.com.mx';
var metaContents  = '';
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();
};
