/* [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','2901',jdecode('Home'),jdecode(''), jdecode('%2F2901.html'), 'true',[],'',''],
	['PAGE','13401',jdecode('Product+Catalogue'),jdecode(''), jdecode('%2F13401%2Findex.html'), 'true',[ 
		['PAGE','13422',jdecode('Copyholders'),jdecode(''), jdecode('%2F13401%2F13422.html'), 'true',[],'',''],
		['PAGE','17712',jdecode('Desking+%26+Accessories'),jdecode(''), jdecode('%2F13401%2F17712.html'), 'true',[],'',''],
		['PAGE','17733',jdecode('Ergorests'),jdecode(''), jdecode('%2F13401%2F17733.html'), 'true',[],'',''],
		['PAGE','17754',jdecode('Footrests'),jdecode(''), jdecode('%2F13401%2F17754.html'), 'true',[],'',''],
		['PAGE','17775',jdecode('Keyboards+%26+Accessories'),jdecode(''), jdecode('%2F13401%2F17775.html'), 'true',[],'',''],
		['PAGE','17817',jdecode('Mice'),jdecode(''), jdecode('%2F13401%2F17817.html'), 'true',[],'',''],
		['PAGE','31323',jdecode('Mouse+%26+Keyboard+Rests'),jdecode(''), jdecode('%2F13401%2F31323.html'), 'true',[],'',''],
		['PAGE','17796',jdecode('Monitor+%26+Laptop+Raisers'),jdecode(''), jdecode('%2F13401%2F17796.html'), 'true',[],'',''],
		['PAGE','17838',jdecode('Screen+Filters'),jdecode(''), jdecode('%2F13401%2F17838.html'), 'true',[],'',''],
		['PAGE','17859',jdecode('Seating'),jdecode(''), jdecode('%2F13401%2F17859.html'), 'true',[],'',''],
		['PAGE','17880',jdecode('Screen+Display+Mounts'),jdecode(''), jdecode('%2F13401%2F17880.html'), 'true',[],'',''],
		['PAGE','17901',jdecode('Telephone+Accessories'),jdecode(''), jdecode('%2F13401%2F17901.html'), 'true',[],'',''],
		['PAGE','17922',jdecode('General'),jdecode(''), jdecode('%2F13401%2F17922.html'), 'true',[],'','']
	],'',''],
	['PAGE','5327',jdecode('Ergonomic+Information'),jdecode(''), jdecode('%2F5327%2Findex.html'), 'true',[ 
		['PAGE','6353',jdecode('Human+Factors'),jdecode(''), jdecode('%2F5327%2F6353.html'), 'true',[],'',''],
		['PAGE','6374',jdecode('Sitting'),jdecode(''), jdecode('%2F5327%2F6374.html'), 'true',[],'',''],
		['PAGE','6395',jdecode('Office+Chairs'),jdecode(''), jdecode('%2F5327%2F6395.html'), 'true',[],'',''],
		['PAGE','6416',jdecode('Eyes'),jdecode(''), jdecode('%2F5327%2F6416.html'), 'true',[],'',''],
		['PAGE','6437',jdecode('Work+Surfaces%2C+Set+Up'),jdecode(''), jdecode('%2F5327%2F6437.html'), 'true',[],'',''],
		['PAGE','6458',jdecode('Equipment+Placement'),jdecode(''), jdecode('%2F5327%2F6458.html'), 'true',[],'',''],
		['PAGE','6479',jdecode('Mice+%26+Other+Equipment'),jdecode(''), jdecode('%2F5327%2F6479.html'), 'true',[],'','']
	],'',''],
	['PAGE','5243',jdecode('About+us'),jdecode(''), jdecode('%2F5243.html'), 'true',[],'',''],
	['PAGE','12785',jdecode('Contact+Information'),jdecode(''), jdecode('%2F12785.html'), 'true',[],'',''],
	['PAGE','5306',jdecode('Services'),jdecode(''), jdecode('%2F5306.html'), 'true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Chaste';
theSitetree.paletteFamily='FE8484';
theSitetree.keyvisualId='11545';
theSitetree.keyvisualName='kv_11545.jpg';
theSitetree.fontsetId='32877';
theSitetree.graphicsetId='13966';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp32-tnz',
  product: 'WSCSYSSSSLYTC22A'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Chaste',
				paletteFamily: 	'FE8484',
				keyvisualId: 	'11545',
				keyvisualName: 	'kv_11545.jpg',
				fontsetId: 		'32877',
				graphicsetId: 	'13966',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FE8484',
				b_color: 		'C73B3B',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20111117-212742'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5327',
internalId:  '',
customField: '20090910-235435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6353',
internalId:  '',
customField: '20090911-010904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6395',
internalId:  '',
customField: '20090911-012048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6374',
internalId:  '',
customField: '20090911-011034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6416',
internalId:  '',
customField: '20090911-012809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6437',
internalId:  '',
customField: '20090911-013736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6458',
internalId:  '',
customField: '20090911-004928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6479',
internalId:  '',
customField: '20090911-010313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17775',
internalId:  '',
customField: '20111117-220229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17859',
internalId:  '',
customField: '20111207-214247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20110213-204313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13422',
internalId:  '',
customField: '20110713-175021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17817',
internalId:  '',
customField: '20111019-210240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17796',
internalId:  '',
customField: '20120118-221450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17733',
internalId:  '',
customField: '20110901-214807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17712',
internalId:  '',
customField: '20110804-232952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17754',
internalId:  '',
customField: '20111019-222438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17838',
internalId:  '',
customField: '20111129-200216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5306',
internalId:  '',
customField: '20090911-182617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17880',
internalId:  '',
customField: '20120123-223933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20110213-214636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17922',
internalId:  '',
customField: '20110628-211058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31323',
internalId:  '',
customField: '20110213-213244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5243',
internalId:  '',
customField: '20110213-204454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12785',
internalId:  '',
customField: '20111019-222556'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHTSO';
var companyName   = 'OOScare+Ergonomics';
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();
};

