/* [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','17401',jdecode('Home'),jdecode(''),'/17401.html','true',[],''],
	['PAGE','17452',jdecode('2009+Conference'),jdecode(''),'/17452/index.html','true',[ 
		['PAGE','17515',jdecode('Faculty'),jdecode(''),'/17452/17515.html','true',[],''],
		['PAGE','32401',jdecode('Conference+Handouts'),jdecode(''),'/17452/32401.html','false',[],''],
		['PAGE','17473',jdecode('Agenda'),jdecode(''),'/17452/17473.html','false',[],''],
		['PAGE','17494',jdecode('Registration'),jdecode(''),'/17452/17494.html','false',[],''],
		['PAGE','32001',jdecode('Payment+via+CC'),jdecode(''),'/17452/32001.html','false',[],''],
		['PAGE','17536',jdecode('Committee'),jdecode(''),'/17452/17536.html','false',[],''],
		['PAGE','17557',jdecode('Awards'),jdecode(''),'/17452/17557.html','false',[],''],
		['PAGE','17599',jdecode('Objectives'),jdecode(''),'/17452/17599.html','false',[],''],
		['PAGE','17578',jdecode('Hotel+Info'),jdecode(''),'/17452/17578.html','false',[],''],
		['PAGE','17620',jdecode('Directions'),jdecode(''),'/17452/17620.html','false',[],''],
		['PAGE','25801',jdecode('Contact+Hours'),jdecode(''),'/17452/25801.html','false',[],'']
	],''],
	['PAGE','32422',jdecode('2010+Conference+Info'),jdecode(''),'/32422.html','true',[],''],
	['PAGE','17641',jdecode('Exhibitor%2FSponsor+Info'),jdecode(''),'/17641/index.html','false',[ 
		['PAGE','17662',jdecode('Exhibitor+Location+Map'),jdecode(''),'/17641/17662.html','false',[],'']
	],''],
	['PAGE','17704',jdecode('Picture+Gallery'),jdecode(''),'/17704.html','false',[],''],
	['PAGE','17725',jdecode('Contact+Us'),jdecode(''),'/17725.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1754';
theSitetree.keyvisualName='krankenhaus.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1754',
				keyvisualName: 	'krankenhaus.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-21716']={
webappId:    '7008',
documentId:  '32001',
internalId:  '21716',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32001',
internalId:  '',
customField: '20091007-092709'
};
webappMappings['7008']=webappMappings['7008-16873']={
webappId:    '7008',
documentId:  '17725',
internalId:  '16873',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17401',
internalId:  '',
customField: '20091019-215532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17452',
internalId:  '',
customField: '20091019-215416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17473',
internalId:  '',
customField: '20090910-171046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17494',
internalId:  '',
customField: '20091007-092719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17515',
internalId:  '',
customField: '20090922-190222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17536',
internalId:  '',
customField: '20090520-215300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17557',
internalId:  '',
customField: '20090520-231420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17578',
internalId:  '',
customField: '20090817-123623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17620',
internalId:  '',
customField: '20090520-221950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17641',
internalId:  '',
customField: '20090730-101819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17662',
internalId:  '',
customField: '20091007-091330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25801',
internalId:  '',
customField: '20090803-091455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17704',
internalId:  '',
customField: '20090520-215017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17725',
internalId:  '',
customField: '20090520-215004'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '17401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17599',
internalId:  '',
customField: '20090520-221023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20091020-144544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32422',
internalId:  '',
customField: '20091019-220050'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2NE9';
var companyName   = '2009+Bi-State+ID+Conference';
var htmlTitle	  = '2009+Bi-State+Infectious+Disease+Conference+';
var metaKeywords  = 'Bi-State%2C+ID%2C+Infectious+Disease%2C+Conference%2C+St.+Louis%2C+APIC%2C+public+health%2C+Hilton%2C+Airport%2C+hotel%2C+2009';
var metaContents  = '2009+Bi-State+Infectious+Disease+Conference';
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();
};
