/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('About+us'),jdecode(''),'/552/index.html','true',[ 
		['PAGE','573',jdecode('Our+management+team'),jdecode(''),'/552/573.html','true',[],'']
	],''],
	['PAGE','594',jdecode('Our+products'),jdecode(''),'/594/index.html','true',[ 
		['PAGE','11701',jdecode('Products+%28follow+up+page%29'),jdecode(''),'/594/11701.html','false',[],''],
		['PAGE','10301',jdecode('Chiropractic'),jdecode(''),'/594/10301.html','true',[],''],
		['PAGE','10322',jdecode('Yoga+%26+Pilates+mats'),jdecode(''),'/594/10322.html','true',[],''],
		['PAGE','10343',jdecode('Tubular+PVC%2FStand-Up+desk'),jdecode(''),'/594/10343.html','true',[],''],
		['PAGE','10364',jdecode('Golf+towels'),jdecode(''),'/594/10364.html','true',[],''],
		['PAGE','10385',jdecode('Fleece+blankets+and...'),jdecode(''),'/594/10385.html','true',[],''],
		['PAGE','20001',jdecode('Fender+covers'),jdecode(''),'/594/20001.html','true',[],''],
		['PAGE','27101',jdecode('Lumbar+support+systems'),jdecode(''),'/594/27101.html','true',[],''],
		['PAGE','43201',jdecode('New+distressed+appliques'),jdecode(''),'/594/43201.html','true',[],'']
	],''],
	['PAGE','47301',jdecode('Just+Vintage'),jdecode(''),'/47301.html','true',[],''],
	['PAGE','615',jdecode('Apparel+decorating+services'),jdecode(''),'/615/index.html','true',[ 
		['PAGE','5701',jdecode('Embroidery'),jdecode(''),'/615/5701.html','true',[],''],
		['PAGE','41401',jdecode('New+distressed+appliques'),jdecode(''),'/615/41401.html','true',[],''],
		['PAGE','8801',jdecode('Digitizing+'),jdecode(''),'/615/8801.html','true',[],''],
		['PAGE','5722',jdecode('Screen+printing'),jdecode(''),'/615/5722.html','true',[],''],
		['PAGE','15601',jdecode('WOW%21+4+color+process'),jdecode(''),'/615/15601/index.html','true',[ 
			['PAGE','16601',jdecode('+++++WOW%21+%28follow+up+page%29'),jdecode(''),'/615/15601/16601.html','false',[],'']
		],''],
		['PAGE','5743',jdecode('Heat+transfers'),jdecode(''),'/615/5743.html','true',[],''],
		['PAGE','8822',jdecode('Graphic+design'),jdecode(''),'/615/8822.html','true',[],'']
	],''],
	['PAGE','7901',jdecode('Automotive+embroidery'),jdecode(''),'/7901.html','true',[],''],
	['PAGE','7501',jdecode('Contract+manufacturing'),jdecode(''),'/7501/index.html','true',[ 
		['PAGE','36901',jdecode('Contract+manufacturing+%28follow+up+page%29'),jdecode(''),'/7501/36901.html','false',[],'']
	],''],
	['PAGE','8201',jdecode('Order+status'),jdecode(''),'/8201/index.html','true',[ 
		['PAGE','26401',jdecode('Order+status+%28follow+up+page%29'),jdecode(''),'/8201/26401.html','false',[],'']
	],''],
	['PAGE','636',jdecode('Contact+Us'),jdecode(''),'/636/index.html','true',[ 
		['PAGE','9701',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/636/9701.html','false',[],''],
		['PAGE','657',jdecode('How+to+find+us'),jdecode(''),'/636/657.html','true',[],'']
	],''],
	['PAGE','38301',jdecode('We%26%23x27%3Bd+like+to+hear+from+you'),jdecode(''),'/38301/index.html','true',[ 
		['PAGE','38701',jdecode('We%26%23x27%3Bd+like+to+hear+from+you+%28follow+up+page%29'),jdecode(''),'/38301/38701.html','false',[],'']
	],'']];
var siteelementCount=33;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='291';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'291',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1001']=webappMappings['1001-ahc010inxsg1e6dedd93d46ea565']={
webappId:    '1001',
documentId:  '26401',
internalId:  'ahc010inxsg1e6dedd93d46ea565',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahc010inxsg1e6dedd93d46ea565']={
webappId:    '1001',
documentId:  '8201',
internalId:  'ahc010inxsg1e6dedd93d46ea565',
customField: ''
};
webappMappings['1501']=webappMappings['1501-1111']={
webappId:    '1501',
documentId:  '501',
internalId:  '1111',
customField: '1501'
};
webappMappings['1001']=webappMappings['1001-ahc010inxsg1ded8adb9998def28']={
webappId:    '1001',
documentId:  '636',
internalId:  'ahc010inxsg1ded8adb9998def28',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahc010inxsg1ded8adb9998def28']={
webappId:    '1001',
documentId:  '9701',
internalId:  'ahc010inxsg1ded8adb9998def28',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahc010inxsg1ebb1427e531e4a2e']={
webappId:    '1001',
documentId:  '594',
internalId:  'ahc010inxsg1ebb1427e531e4a2e',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahc010inxsg1ebb1427e531e4a2e']={
webappId:    '1001',
documentId:  '11701',
internalId:  'ahc010inxsg1ebb1427e531e4a2e',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahc010inxsg1f38b3f0122b76162']={
webappId:    '1001',
documentId:  '15601',
internalId:  'ahc010inxsg1f38b3f0122b76162',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahc010inxsg1f38b3f0122b76162']={
webappId:    '1001',
documentId:  '16601',
internalId:  'ahc010inxsg1f38b3f0122b76162',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahc010inxsg177721e7434de22e9']={
webappId:    '1001',
documentId:  '7501',
internalId:  'ahc010inxsg177721e7434de22e9',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahc010inxsg177721e7434de22e9']={
webappId:    '1001',
documentId:  '36901',
internalId:  'ahc010inxsg177721e7434de22e9',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahc010inxsg1876fd9654953f9a8']={
webappId:    '1001',
documentId:  '38301',
internalId:  'ahc010inxsg1876fd9654953f9a8',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahc010inxsg1876fd9654953f9a8']={
webappId:    '1001',
documentId:  '38701',
internalId:  'ahc010inxsg1876fd9654953f9a8',
customField: 'followUp'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20090316-072810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20071105-201114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20071105-201154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20071105-201328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20071011-214622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20071105-203755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10322',
internalId:  '',
customField: '20071105-203905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10343',
internalId:  '',
customField: '20071105-204042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10364',
internalId:  '',
customField: '20071105-204139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10385',
internalId:  '',
customField: '20071105-204322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20001',
internalId:  '',
customField: '20071105-204438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27101',
internalId:  '',
customField: '20071105-204508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43201',
internalId:  '',
customField: '20071230-184429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47301',
internalId:  '',
customField: '20080218-155725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20080218-091417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20071105-204641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41401',
internalId:  '',
customField: '20080218-155634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20071105-204759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5722',
internalId:  '',
customField: '20071105-195114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20071108-074315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20071013-143429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5743',
internalId:  '',
customField: '20071105-204924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8822',
internalId:  '',
customField: '20071105-205128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20071031-074450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20071105-205214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36901',
internalId:  '',
customField: '20071031-091627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20080617-064516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20071024-113353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20090113-125354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20071010-214454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20071030-073536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38301',
internalId:  '',
customField: '20071105-205338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38701',
internalId:  '',
customField: '20071102-201113'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHC010INXSG1';
var companyName   = 'Preferred+Products';
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();
};
