/* [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','401',jdecode('Inicio'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','1701',jdecode('%C2%BFQu%C3%A9+es+Miastenia%3F'),jdecode(''), jdecode('%2F1701%2Findex.html'), 'true',[ 
		['PAGE','2501',jdecode('Manifestaci%C3%B3n'),jdecode(''), jdecode('%2F1701%2F2501.html'), 'true',[],'','']
	],'',''],
	['PAGE','1785',jdecode('Informaci%C3%B3n'),jdecode(''), jdecode('%2F1785%2Findex.html'), 'true',[ 
		['PAGE','2522',jdecode('Diagn%C3%B3stico'),jdecode(''), jdecode('%2F1785%2F2522.html'), 'true',[],'',''],
		['PAGE','8164',jdecode('Debilidad'),jdecode(''), jdecode('%2F1785%2F8164.html'), 'true',[],'',''],
		['PAGE','8143',jdecode('Causas'),jdecode(''), jdecode('%2F1785%2F8143.html'), 'true',[],'',''],
		['PAGE','8643',jdecode('Crisis'),jdecode(''), jdecode('%2F1785%2F8643.html'), 'true',[],'','']
	],'',''],
	['PAGE','1743',jdecode('Eventos'),jdecode(''), jdecode('%2F1743%2Findex.html'), 'true',[ 
		['PAGE','4401',jdecode('Pr%C3%B2ximos+eventos'),jdecode(''), jdecode('%2F1743%2F4401.html'), 'true',[],'',''],
		['PAGE','25701',jdecode('Loteria+4+de+Junio+2011'),jdecode(''), jdecode('%2F1743%2F25701.html'), 'true',[],'',''],
		['PAGE','22401',jdecode('Loteria+31+Julio+2010'),jdecode(''), jdecode('%2F1743%2F22401.html'), 'true',[],'',''],
		['PAGE','8122',jdecode('Reuni%C3%B3n+30%2FMay%2F2008'),jdecode(''), jdecode('%2F1743%2F8122.html'), 'true',[],'',''],
		['PAGE','20801',jdecode('Conferencia+28%2FMay%2F2010'),jdecode(''), jdecode('%2F1743%2F20801.html'), 'true',[],'','']
	],'',''],
	['PAGE','12206',jdecode('Libro+de+visitas'),jdecode(''), jdecode('%2F12206%2Findex.html'), 'true',[ 
		['PAGE','12201',jdecode('Leer+el+libro+de+Visitas'),jdecode(''), jdecode('%2F12206%2F12201.html'), 'false',[],'','']
	],'',''],
	['PAGE','1764',jdecode('M%C3%A9dicos'),jdecode(''), jdecode('%2F1764.html'), 'true',[],'',''],
	['PAGE','19801',jdecode('Fundadora+AMAIM'),jdecode(''), jdecode('%2F19801.html'), 'true',[],'',''],
	['PAGE','8101',jdecode('Miembros+AMAIM'),jdecode(''), jdecode('%2F8101.html'), 'true',[],'',''],
	['PAGE','8601',jdecode('Testimonios'),jdecode(''), jdecode('%2F8601%2Findex.html'), 'true',[ 
		['PAGE','8622',jdecode('Irene+Cant%C3%BA'),jdecode(''), jdecode('%2F8601%2F8622.html'), 'true',[],'','']
	],'',''],
	['PAGE','1806',jdecode('Contacto'),jdecode(''), jdecode('%2F1806.html'), 'true',[],'',''],
	['PAGE','12101',jdecode('Blog'),jdecode(''), jdecode('%2F12101.html'), 'false',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Seifenblase';
theSitetree.paletteFamily='FF9B5E';
theSitetree.keyvisualId='2343';
theSitetree.keyvisualName='aerzte1.jpg';
theSitetree.fontsetId='379';
theSitetree.graphicsetId='430';
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: 			'Seifenblase',
				paletteFamily: 	'FF9B5E',
				keyvisualId: 	'2343',
				keyvisualName: 	'aerzte1.jpg',
				fontsetId: 		'379',
				graphicsetId: 	'430',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'CC3300',
				e_color: 		'FF3300',
				f_color: 		'FF9966',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20110521-232006'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7050']=webappMappings['7050-4769']={
webappId:    '7050',
documentId:  '12101',
internalId:  '4769',
customField: 'language:es;country:ES;'
};
webappMappings['1002']=webappMappings['1002-12206avec10inl99f']={
webappId:    '1002',
documentId:  '12206',
internalId:  '12206avec10inl99f',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-17499']={
webappId:    '7008',
documentId:  '1806',
internalId:  '17499',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1701',
internalId:  '',
customField: '20070731-200402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20070731-201728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20101103-114917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2522',
internalId:  '',
customField: '20070801-000923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1785',
internalId:  '',
customField: '20071010-115338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8164',
internalId:  '',
customField: '20080516-174008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8143',
internalId:  '',
customField: '20080516-174731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8643',
internalId:  '',
customField: '20080516-175122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20110521-225408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1743',
internalId:  '',
customField: '20110521-232502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8122',
internalId:  '',
customField: '20080724-175326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4401',
internalId:  '',
customField: '20110521-224907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1764',
internalId:  '',
customField: '20080116-172900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20080516-171908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8622',
internalId:  '',
customField: '20080516-170917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1806',
internalId:  '',
customField: '20080725-170213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12206',
internalId:  '',
customField: '20080724-162457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12201',
internalId:  '',
customField: '20080724-162457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20100601-151922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20100601-170252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20801',
internalId:  '',
customField: '20100601-173234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25701',
internalId:  '',
customField: '20110612-151524'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INL99F';
var companyName   = 'AMAIM+-+Miastenia+Gravis';
var htmlTitle	  = '%3A.+Miastenia+Gravis+.%3A+MEXICO';
var metaKeywords  = 'miastenia++contracci%C3%B3n+de+cualquier+m%C3%BAsculo';
var metaContents  = 'La+ASOCIACION+MEXICANA+DE+AYUDA+INTEGRAL+AL+MIASTENICO+%28AMAIM%29+desea+proporcionar+apoyo+emocional+a+los+afectados+y+pretende+mejorar+su+actividad+social%2C+profesional+y+familiar+a+trav%C3%A9s+de+programas+de+servicio+al+paciente%2C+informaci%C3%B3n+p%C3%BAblica%2C+investigaci%C3%B3n+m%C3%A9dica+y+educaci%C3%B3n+profesional.+As%C3%AD+pues%2C+LA+ASOCIACION+MEXICANA+DE+AYUDA+INTEGRAL+AL+MIASTENICO+%28AMAIM%29+no+garantiza+la+informaci%C3%B3n+contenida+en+esta+publicaci%C3%B3n%2C+y+no+asume+ninguna+responsabilidad+por+cualquier+perjuicio+que+resulte+del+uso+de+la+misma.';
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();
};

