/* [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('Bienvenidos'),jdecode(''),'/4555.html','true',[],'',''],
	['PAGE','106301',jdecode('El+Sol+de+M%C3%A9xico+'),jdecode(''),'/106301.html','true',[],'',''],
	['PAGE','4666',jdecode('Siminforma'),jdecode(''),'/4666.html','true',[],'',''],
	['PAGE','9506',jdecode('Rumbo+de+M%C3%A9xico'),jdecode(''),'/9506.html','true',[],'',''],
	['PAGE','129701',jdecode('The+News'),jdecode(''),'/129701.html','true',[],'',''],
	['PAGE','18701',jdecode('Libertas'),jdecode(''),'/18701.html','true',[],'',''],
	['PAGE','74601',jdecode('Orbe'),jdecode(''),'/74601.html','true',[],'',''],
	['PAGE','4612',jdecode('La+Cr%C3%B3nica+Rimada'),jdecode(''),'/4612.html','true',[],'',''],
	['PAGE','74622',jdecode('Voces+del+Periodista'),jdecode(''),'/74622.html','true',[],'',''],
	['PAGE','74643',jdecode('La+Columna'),jdecode(''),'/74643.html','true',[],'',''],
	['PAGE','74664',jdecode('Radio+Formula'),jdecode(''),'/74664.html','true',[],'',''],
	['PAGE','74685',jdecode('ABC+Radio'),jdecode(''),'/74685.html','true',[],'',''],
	['PAGE','4639',jdecode('Siempre'),jdecode(''),'/4639.html','true',[],'',''],
	['PAGE','9533',jdecode('Exc%C3%A9lsior'),jdecode(''),'/9533.html','true',[],'',''],
	['PAGE','32901',jdecode('Gente+en+Acci%C3%B3n'),jdecode(''),'/32901.html','true',[],'',''],
	['PAGE','39501',jdecode('Petr%C3%B3leum'),jdecode(''),'/39501.html','true',[],'',''],
	['PAGE','14001',jdecode('Entrevistas'),jdecode(''),'/14001.html','true',[],'',''],
	['PAGE','24101',jdecode('Plumas+invitadas'),jdecode(''),'/24101.html','true',[],'',''],
	['PAGE','9560',jdecode('Contacto'),jdecode(''),'/9560.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='FFCC33';
theSitetree.keyvisualId='978';
theSitetree.keyvisualName='adresskartei.jpg';
theSitetree.fontsetId='166';
theSitetree.graphicsetId='199';
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: 			'NewYork',
				paletteFamily: 	'FFCC33',
				keyvisualId: 	'978',
				keyvisualName: 	'adresskartei.jpg',
				fontsetId: 		'166',
				graphicsetId: 	'199',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000066',
				b_color: 		'FFCC33',
				c_color: 		'000000',
				d_color: 		'406BC0',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4555',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4555',
internalId:  '',
customField: '20100515-201906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4666',
internalId:  '',
customField: '20100825-134222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9506',
internalId:  '',
customField: '20100902-225117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20100823-201130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74601',
internalId:  '',
customField: '20100820-234700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74622',
internalId:  '',
customField: '20080614-221123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74643',
internalId:  '',
customField: '20080804-005021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74664',
internalId:  '',
customField: '20100602-205717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74685',
internalId:  '',
customField: '20100602-205243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4612',
internalId:  '',
customField: '20100825-135823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4639',
internalId:  '',
customField: '20080409-221601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9533',
internalId:  '',
customField: '20061029-235127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32901',
internalId:  '',
customField: '20070719-231051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39501',
internalId:  '',
customField: '20080104-014951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20070823-215938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24101',
internalId:  '',
customField: '20080501-142428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9560',
internalId:  '',
customField: '20070608-213512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106301',
internalId:  '',
customField: '20100829-052628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129701',
internalId:  '',
customField: '20100829-054419'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXS3P';
var companyName   = 'Miguel+Angel+Ferrer-mentor';
var htmlTitle	  = 'Miguel+%C3%81ngel+Ferrer-mentor';
var metaKeywords  = 'MIGUEL+ANGEL+FERRER-MENTOR';
var metaContents  = 'MIGUEL+ANGEL+FERRER-MENTOR';
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();
};
