/* [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','501',jdecode('Intro'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','552',jdecode('Grupo+DAR'),jdecode(''), jdecode('%2F552.html'), 'true',[],'',''],
	['PAGE','6601',jdecode('Mesa+directiva'),jdecode(''), jdecode('%2F6601%2Findex.html'), 'true',[ 
		['PAGE','9401',jdecode('Dra.+Celina+Kishi+Sutto'),jdecode(''), jdecode('%2F6601%2F9401.html'), 'true',[],'',''],
		['PAGE','9801',jdecode('Dr.+Ernesto++Real+Marquez'),jdecode(''), jdecode('%2F6601%2F9801.html'), 'false',[],'','']
	],'',''],
	['PAGE','573',jdecode('%C2%BFC%C3%B3mo+funciona%3F'),jdecode(''), jdecode('%2F573.html'), 'true',[],'',''],
	['PAGE','594',jdecode('Reconstrucci%C3%B3n+Mamaria'),jdecode(''), jdecode('%2F594.html'), 'true',[],'',''],
	['PAGE','4801',jdecode('T%C3%A9cnicas+de+Reconstrucci%C3%B3n'),jdecode(''), jdecode('%2F4801.html'), 'true',[],'',''],
	['PAGE','4822',jdecode('Auto+expl%C3%B3rate'),jdecode(''), jdecode('%2F4822.html'), 'true',[],'',''],
	['PAGE','4843',jdecode('Contacto'),jdecode(''), jdecode('%2F4843.html'), 'true',[],'',''],
	['PAGE','11601',jdecode('Enlaces'),jdecode(''), jdecode('%2F11601.html'), 'true',[],'',''],
	['PAGE','11622',jdecode('Calendario'),jdecode(''), jdecode('%2F11622.html'), 'true',[],'',''],
	['ITEM','19901',jdecode('Bolet%C3%ADn+de+la+asociaci%C3%B3n'),jdecode(''), jdecode(''), 'true',[],'','_blank'],
	['PAGE','25401',jdecode('Reglamento'),jdecode(''), jdecode('%2F25401.html'), 'true',[],'',''],
	['PAGE','25422',jdecode('Hacerse+miembro'),jdecode(''), jdecode('%2F25422.html'), 'true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='DB7A7A';
theSitetree.keyvisualId='1962';
theSitetree.keyvisualName='beauty.jpg';
theSitetree.fontsetId='328';
theSitetree.graphicsetId='386';
theSitetree.contentColor='A00000';
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: 			'Stylus',
				paletteFamily: 	'DB7A7A',
				keyvisualId: 	'1962',
				keyvisualName: 	'beauty.jpg',
				fontsetId: 		'328',
				graphicsetId: 	'386',
				contentColor: 	'A00000',
				contentBGColor: 'FFFFFF',
				a_color: 		'DB7A7A',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-10006']={
webappId:    '7008',
documentId:  '4843',
internalId:  '10006',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20111012-133600'
};
webappMappings['1501']=webappMappings['1501-5796187']={
webappId:    '1501',
documentId:  '501',
internalId:  '5796187',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-10005']={
webappId:    '7008',
documentId:  '573',
internalId:  '10005',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20111012-125958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4843',
internalId:  '',
customField: '20120103-093441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20120125-153907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20111012-130248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20111012-125149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20070724-092814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20070801-102845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20111012-131115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4822',
internalId:  '',
customField: '20111012-131820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11601',
internalId:  '',
customField: '20120103-092707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11622',
internalId:  '',
customField: '20120103-092124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20111208-101901'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1003']=webappMappings['1003-avec10inlmxx13065c16ccc']={
webappId:    '1003',
documentId:  '11622',
internalId:  'avec10inlmxx13065c16ccc',
customField: 'es:ES'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25422',
internalId:  '',
customField: '20111208-101901'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLMXX';
var companyName   = 'Grupo+DAR+A.C.';
var htmlTitle	  = 'fundacion-dar.com.mx';
var metaKeywords  = 'Cancer+de+mama%2C+grupo+de++apoyo+a+mujeres+que+han+padecido+de+C%C3%A1ncer+de+mama%2C+';
var metaContents  = 'Cancer+de+mama%2C+grupo+de++apoyo+a+mujeres+que+han+padecido+de+C%C3%A1ncer+de+mama%2C+';
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();
};

