/* [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','2601',jdecode('Home'),jdecode(''),'/2601.html','true',[],''],
	['PAGE','9701',jdecode('Survey'),jdecode(''),'/9701.html','true',[],''],
	['PAGE','9722',jdecode('Discount+Coupon'),jdecode(''),'/9722.html','true',[],''],
	['PAGE','6301',jdecode('2009+Exhibitors'),jdecode(''),'/6301.html','false',[],''],
	['PAGE','15501',jdecode('2010+Exhibitors'),jdecode(''),'/15501.html','false',[],''],
	['PAGE','6601',jdecode('Special+Events'),jdecode(''),'/6601.html','true',[],''],
	['PAGE','4701',jdecode('About+us'),jdecode(''),'/4701.html','true',[],''],
	['PAGE','32401',jdecode('Guest+Bag+Advertising'),jdecode(''),'/32401.html','false',[],''],
	['PAGE','4785',jdecode('Silent+Auction'),jdecode(''),'/4785.html','true',[],''],
	['PAGE','4806',jdecode('MarketPlace'),jdecode(''),'/4806.html','true',[],''],
	['PAGE','4743',jdecode('Exhibitor+Information'),jdecode(''),'/4743.html','true',[],''],
	['PAGE','9743',jdecode('Exhibitor+Wait+List'),jdecode(''),'/9743.html','false',[],''],
	['PAGE','4764',jdecode('Exhibitor+Rules'),jdecode(''),'/4764.html','false',[],''],
	['PAGE','4827',jdecode('Exhibitor+Tips'),jdecode(''),'/4827.html','false',[],''],
	['PAGE','4848',jdecode('Exhibitor+FAQs'),jdecode(''),'/4848.html','false',[],''],
	['PAGE','11001',jdecode('Why+Exhibit'),jdecode(''),'/11001.html','false',[],''],
	['PAGE','5201',jdecode('Our+Sponsors'),jdecode(''),'/5201.html','true',[],''],
	['PAGE','5222',jdecode('Become+a+Sponsor'),jdecode(''),'/5222.html','true',[],''],
	['PAGE','5243',jdecode('Advertising'),jdecode(''),'/5243.html','true',[],''],
	['PAGE','8901',jdecode('Press+Release'),jdecode(''),'/8901.html','true',[],''],
	['PAGE','5264',jdecode('Testimonials'),jdecode(''),'/5264.html','true',[],''],
	['PAGE','5401',jdecode('Contact'),jdecode(''),'/5401.html','true',[],''],
	['PAGE','39901',jdecode('2011+Exhibitors'),jdecode(''),'/39901.html','false',[],''],
	['PAGE','45001',jdecode('Test'),jdecode(''),'/45001.html','false',[],''],
	['PAGE','46001',jdecode('Purchase+Booth+Space'),jdecode(''),'/46001.html','false',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Dynamic';
theSitetree.paletteFamily='7E5292';
theSitetree.keyvisualId='7583';
theSitetree.keyvisualName='kv_7583.jpg';
theSitetree.fontsetId='16687';
theSitetree.graphicsetId='12236';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Dynamic',
				paletteFamily: 	'7E5292',
				keyvisualId: 	'7583',
				keyvisualName: 	'kv_7583.jpg',
				fontsetId: 		'16687',
				graphicsetId: 	'12236',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2601',
internalId:  '',
customField: '20100620-130310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4806',
internalId:  '',
customField: '20100207-111604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4785',
internalId:  '',
customField: '20100425-132800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20090326-124314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20100425-161235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20100425-160225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4827',
internalId:  '',
customField: '20090321-233431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4848',
internalId:  '',
customField: '20090412-200559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20100425-125421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5264',
internalId:  '',
customField: '20090321-234009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5243',
internalId:  '',
customField: '20100305-212557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20100425-164245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5222',
internalId:  '',
customField: '20100621-113959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20100621-122034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4764',
internalId:  '',
customField: '20090322-000014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4743',
internalId:  '',
customField: '20100425-210835'
};
webappMappings['7005']=webappMappings['7005-1775']={
webappId:    '7005',
documentId:  '9701',
internalId:  '1775',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-14912']={
webappId:    '7008',
documentId:  '9743',
internalId:  '14912',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20090322-001201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9743',
internalId:  '',
customField: '20090322-001252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9722',
internalId:  '',
customField: '20100425-122047'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20090322-005340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20100620-144749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20100212-100618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39901',
internalId:  '',
customField: '20100712-033634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45001',
internalId:  '',
customField: '20100425-204907'
};
webappMappings['4001']=webappMappings['4001-29381636']={
webappId:    '4001',
documentId:  '46001',
internalId:  '29381636',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46001',
internalId:  '',
customField: '20100425-205932'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN35OR';
var companyName   = 'The+Dearborn+Women%27s+Expo';
var htmlTitle	  = 'The+Dearborn+Women%27s+Expo';
var metaKeywords  = 'dearborn%3Bexpo%3Bwomen%3Bshow%3Bcharity%3Bfund+raising%3Bchildrens+leukemia+foundation%3Bevent%3Btradeshow%3B';
var metaContents  = 'The+Dearborn+Womens+Expo';
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();
};
