/* [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','97',jdecode('Home'),jdecode(''),'/97.html','true',[],''],
	['PAGE','3706',jdecode('ADA+Signage'),jdecode(''),'/3706.html','true',[],''],
	['PAGE','3715',jdecode('Slip-in+Signage'),jdecode(''),'/3715.html','true',[],''],
	['PAGE','3724',jdecode('History+Wall'),jdecode(''),'/3724.html','true',[],''],
	['PAGE','3733',jdecode('Wayfinding'),jdecode(''),'/3733.html','true',[],''],
	['PAGE','3742',jdecode('Specialty+Signage'),jdecode(''),'/3742.html','true',[],''],
	['PAGE','3751',jdecode('Fire+Evacuation'),jdecode(''),'/3751.html','true',[],''],
	['PAGE','19601',jdecode('PRODUCTS'),jdecode(''),'/19601/index.html','true',[ 
		['PAGE','20101',jdecode('EXPLORE'),jdecode(''),'/19601/20101.html','true',[],''],
		['PAGE','20122',jdecode('FORMULATE'),jdecode(''),'/19601/20122.html','true',[],''],
		['PAGE','33701',jdecode('-+FM+Patient+Room'),jdecode(''),'/19601/33701.html','true',[],''],
		['PAGE','29001',jdecode('-+FM++Room+ID'),jdecode(''),'/19601/29001.html','true',[],''],
		['PAGE','29022',jdecode('-+FM+General'),jdecode(''),'/19601/29022.html','true',[],''],
		['PAGE','35801',jdecode('-+FM+Directory'),jdecode(''),'/19601/35801.html','true',[],''],
		['PAGE','29043',jdecode('-+FM+Regulatory'),jdecode(''),'/19601/29043.html','true',[],''],
		['PAGE','29064',jdecode('-+FM+Informational'),jdecode(''),'/19601/29064.html','true',[],''],
		['PAGE','20143',jdecode('INVENT'),jdecode(''),'/19601/20143.html','true',[],''],
		['PAGE','38501',jdecode('-+IN+Room+ID'),jdecode(''),'/19601/38501.html','true',[],''],
		['PAGE','38522',jdecode('-+IN+General'),jdecode(''),'/19601/38522.html','true',[],''],
		['PAGE','38543',jdecode('-+IN+Directory'),jdecode(''),'/19601/38543.html','true',[],''],
		['PAGE','38564',jdecode('-+IN+Regulatory'),jdecode(''),'/19601/38564.html','true',[],''],
		['PAGE','38585',jdecode('-+IN+Informational'),jdecode(''),'/19601/38585.html','true',[],'']
	],''],
	['PAGE','2450',jdecode('Portfolio'),jdecode(''),'/2450/index.html','true',[ 
		['PAGE','2459',jdecode('Lawton%2C+OK'),jdecode(''),'/2450/2459.html','true',[],''],
		['PAGE','2468',jdecode('Denver%2C+CO'),jdecode(''),'/2450/2468.html','true',[],''],
		['PAGE','2477',jdecode('Denville%2C+NJ'),jdecode(''),'/2450/2477.html','true',[],''],
		['PAGE','17701',jdecode('Pomona%2C+NJ'),jdecode(''),'/2450/17701.html','true',[],'']
	],''],
	['PAGE','3760',jdecode('About+Us'),jdecode(''),'/3760.html','true',[],''],
	['PAGE','3769',jdecode('Our+History'),jdecode(''),'/3769.html','true',[],''],
	['PAGE','118',jdecode('Contact'),jdecode(''),'/118.html','true',[],'']];
var siteelementCount=30;
theSitetree.topTemplateName='Time';
theSitetree.paletteFamily='272740';
theSitetree.keyvisualId='2303';
theSitetree.keyvisualName='medizin.jpg';
theSitetree.fontsetId='268';
theSitetree.graphicsetId='336';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Time',
				paletteFamily: 	'272740',
				keyvisualId: 	'2303',
				keyvisualName: 	'medizin.jpg',
				fontsetId: 		'268',
				graphicsetId: 	'336',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'272740',
				b_color: 		'6D6DA7',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '97',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38501',
internalId:  '',
customField: '20090323-133008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97',
internalId:  '',
customField: '20090318-164049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19601',
internalId:  '',
customField: '20090323-131546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20090319-154826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20122',
internalId:  '',
customField: '20090318-155959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20143',
internalId:  '',
customField: '20090323-144126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3706',
internalId:  '',
customField: '20080625-200616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3715',
internalId:  '',
customField: '20080625-200714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2450',
internalId:  '',
customField: '20080625-191701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3724',
internalId:  '',
customField: '20080625-200802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3769',
internalId:  '',
customField: '20080625-201103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3733',
internalId:  '',
customField: '20080625-200901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3742',
internalId:  '',
customField: '20080625-200918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3751',
internalId:  '',
customField: '20080129-152505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2459',
internalId:  '',
customField: '20080625-195943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2468',
internalId:  '',
customField: '20080625-200215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2477',
internalId:  '',
customField: '20080625-200405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17701',
internalId:  '',
customField: '20080625-200454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3760',
internalId:  '',
customField: '20080625-201005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118',
internalId:  '',
customField: '20080625-201131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29001',
internalId:  '',
customField: '20090318-150814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35801',
internalId:  '',
customField: '20090318-153849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29022',
internalId:  '',
customField: '20090318-153324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29043',
internalId:  '',
customField: '20090318-154809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29064',
internalId:  '',
customField: '20090318-160512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33701',
internalId:  '',
customField: '20090317-194329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38522',
internalId:  '',
customField: '20090323-133517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38543',
internalId:  '',
customField: '20090323-140120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38564',
internalId:  '',
customField: '20090323-141530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38585',
internalId:  '',
customField: '20090323-143234'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3CH';
var companyName   = 'DMR+Sign+Systems';
var htmlTitle	  = 'DMR+Sign+Systems';
var metaKeywords  = 'ADA+signs%2C+hospital+signs%2C+interior+signs%2C+hospital%2C+interior%2C+ADA%2C+signs%2C+signage%2C+wayfinding%2C+directories%2C+custom+signs%2C+sign+manufacturer%2C+sign+builder%2C';
var metaContents  = 'Specializing+in+custom+manufactured+signs+for+the+health+care+industry';
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();
};
