/* [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 theSitetree=[ 
	['PAGE','801',jdecode('Home'),jdecode(''),'/801.html','true',[],''],
	['PAGE','9212',jdecode('AD%2FHD+Global+Network'),jdecode(''),'/9212/index.html','true',[ 
		['PAGE','5201',jdecode('Mission+and+Goals'),jdecode(''),'/9212/5201.html','true',[],''],
		['PAGE','6712',jdecode('Projects'),jdecode(''),'/9212/6712.html','true',[],''],
		['PAGE','11912',jdecode('Board+Members'),jdecode(''),'/9212/11912.html','true',[],'']
	],''],
	['PAGE','873',jdecode('What+is+AD%2FHD%3F'),jdecode(''),'/873/index.html','true',[ 
		['PAGE','11933',jdecode('Who+has+AD%2FHD%3F'),jdecode(''),'/873/11933.html','true',[],''],
		['PAGE','11954',jdecode('Symptoms'),jdecode(''),'/873/11954.html','true',[],''],
		['PAGE','11975',jdecode('Causes'),jdecode(''),'/873/11975.html','true',[],''],
		['PAGE','11996',jdecode('Diagnosis+and+treatment'),jdecode(''),'/873/11996.html','true',[],''],
		['PAGE','12017',jdecode('Potential+long-term+effects'),jdecode(''),'/873/12017.html','true',[],''],
		['PAGE','7912',jdecode('Literature'),jdecode(''),'/873/7912.html','true',[],'']
	],''],
	['PAGE','6796',jdecode('Contact+Us'),jdecode(''),'/6796.html','true',[],''],
	['PAGE','894',jdecode('Newsletters+'),jdecode(''),'/894.html','true',[],''],
	['PAGE','915',jdecode('Articles'),jdecode(''),'/915/index.html','true',[ 
		['PAGE','35312',jdecode('In+Spanish%2FEspa%C3%B1ol'),jdecode(''),'/915/35312.html','true',[],'']
	],''],
	['PAGE','34612',jdecode('Useful+Information'),jdecode(''),'/34612.html','true',[],''],
	['PAGE','32412',jdecode('Justice'),jdecode(''),'/32412.html','true',[],''],
	['PAGE','6838',jdecode('Upcoming+events'),jdecode(''),'/6838/index.html','true',[ 
		['PAGE','7933',jdecode('Past+Events'),jdecode(''),'/6838/7933.html','true',[],'']
	],''],
	['PAGE','6817',jdecode('News'),jdecode(''),'/6817.html','true',[],''],
	['PAGE','16212',jdecode('AD%2FHD+Organizations'),jdecode(''),'/16212/index.html','true',[ 
		['PAGE','17712',jdecode('Interesting+Links'),jdecode(''),'/16212/17712.html','true',[],'']
	],''],
	['PAGE','978',jdecode('Disclaimer'),jdecode(''),'/978.html','true',[],''],
	['PAGE','25112',jdecode('Speakers+and+Presentations'),jdecode(''),'/25112.html','false',[],''],
	['PAGE','26412',jdecode('Informe+Foro+2008'),jdecode(''),'/26412.html','false',[],'']];
var siteelementCount=26;
theSitetree.topTemplateName='Global';
theSitetree.paletteFamily='333399';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='88';
theSitetree.graphicsetId='105';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Global',
				paletteFamily: 	'333399',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'88',
				graphicsetId: 	'105',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'242E8A',
				b_color: 		'FF9900',
				c_color: 		'000000',
				d_color: 		'EAEAEA',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20090513-162658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6838',
internalId:  '',
customField: '20090731-193101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7933',
internalId:  '',
customField: '20090731-193146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6817',
internalId:  '',
customField: '20090731-194549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9212',
internalId:  '',
customField: '20090429-180635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20090429-180713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6712',
internalId:  '',
customField: '20080825-155329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11912',
internalId:  '',
customField: '20080901-171545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34612',
internalId:  '',
customField: '20090524-204551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '873',
internalId:  '',
customField: '20080901-191256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11933',
internalId:  '',
customField: '20080901-191607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11954',
internalId:  '',
customField: '20080901-191754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11975',
internalId:  '',
customField: '20080901-191841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11996',
internalId:  '',
customField: '20080901-191944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12017',
internalId:  '',
customField: '20080901-162030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7912',
internalId:  '',
customField: '20080901-163426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6796',
internalId:  '',
customField: '20081216-100314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '894',
internalId:  '',
customField: '20081013-085037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '915',
internalId:  '',
customField: '20090801-142553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16212',
internalId:  '',
customField: '20090427-212137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17712',
internalId:  '',
customField: '20090205-133513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '978',
internalId:  '',
customField: '20080824-135747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26412',
internalId:  '',
customField: '20090120-170025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25112',
internalId:  '',
customField: '20090220-110457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32412',
internalId:  '',
customField: '20090425-192417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35312',
internalId:  '',
customField: '20090801-142459'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPJ1X';
var companyName   = 'AD%2FHD+Global+Network';
var htmlTitle	  = '';
var metaKeywords  = '';
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();
};
