/* [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(''), jdecode('%2F4555.html'), 'true',[],'',''],
	['PAGE','106301',jdecode('El+Sol+de+M%C3%A9xico+'),jdecode(''), jdecode('%2F106301.html'), 'true',[],'',''],
	['PAGE','4666',jdecode('Siminforma'),jdecode(''), jdecode('%2F4666.html'), 'true',[],'',''],
	['PAGE','183934',jdecode('Econom%C3%ADa+y+Pol%C3%ADtica+Hoy'),jdecode(''), jdecode('%2F183934.html'), 'true',[],'',''],
	['PAGE','9506',jdecode('Rumbo+de+M%C3%A9xico'),jdecode(''), jdecode('%2F9506.html'), 'true',[],'',''],
	['PAGE','129701',jdecode('The+News'),jdecode(''), jdecode('%2F129701.html'), 'true',[],'',''],
	['PAGE','18701',jdecode('Libertas'),jdecode(''), jdecode('%2F18701.html'), 'true',[],'',''],
	['PAGE','74601',jdecode('Orbe'),jdecode(''), jdecode('%2F74601.html'), 'true',[],'',''],
	['ITEM','177334',jdecode('Affidamento'),jdecode(''), jdecode('http%3A%2F%2Faffidamento.com.mx'), 'true',[],'','_blank'],
	['PAGE','4612',jdecode('La+Cr%C3%B3nica+Rimada'),jdecode(''), jdecode('%2F4612.html'), 'true',[],'',''],
	['PAGE','74622',jdecode('Voces+del+Periodista'),jdecode(''), jdecode('%2F74622.html'), 'true',[],'',''],
	['PAGE','74643',jdecode('La+Columna'),jdecode(''), jdecode('%2F74643.html'), 'true',[],'',''],
	['PAGE','74664',jdecode('Radio+Formula'),jdecode(''), jdecode('%2F74664.html'), 'true',[],'',''],
	['PAGE','74685',jdecode('ABC+Radio'),jdecode(''), jdecode('%2F74685.html'), 'true',[],'',''],
	['PAGE','4639',jdecode('Siempre'),jdecode(''), jdecode('%2F4639.html'), 'true',[],'',''],
	['PAGE','9533',jdecode('Exc%C3%A9lsior'),jdecode(''), jdecode('%2F9533.html'), 'true',[],'',''],
	['PAGE','32901',jdecode('Gente+en+Acci%C3%B3n'),jdecode(''), jdecode('%2F32901.html'), 'true',[],'',''],
	['PAGE','39501',jdecode('Petr%C3%B3leum'),jdecode(''), jdecode('%2F39501.html'), 'true',[],'',''],
	['PAGE','14001',jdecode('Entrevistas'),jdecode(''), jdecode('%2F14001.html'), 'true',[],'',''],
	['PAGE','24101',jdecode('Plumas+invitadas'),jdecode(''), jdecode('%2F24101.html'), 'true',[],'',''],
	['PAGE','9560',jdecode('Contacto'),jdecode(''), jdecode('%2F9560.html'), 'true',[],'','']];
var siteelementCount=21;
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 prodDef={
  wl_name: 'grp13-hostin',
  product: 'WSCSYSSSSLY0XJEZ'
};
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: '20120204-001807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4666',
internalId:  '',
customField: '20120129-083126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9506',
internalId:  '',
customField: '20120131-235522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20111129-223512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74601',
internalId:  '',
customField: '20111210-235957'
};
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: '20110921-020749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74685',
internalId:  '',
customField: '20100602-205243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4612',
internalId:  '',
customField: '20111129-225252'
};
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: '20120115-234722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9560',
internalId:  '',
customField: '20070608-213512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106301',
internalId:  '',
customField: '20120127-161048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129701',
internalId:  '',
customField: '20120203-011343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183934',
internalId:  '',
customField: '20120127-160914'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.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();
};

