/* [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','4901',jdecode('Home'),jdecode(''),'/4901.html','true',[],''],
	['PAGE','5801',jdecode('Dealers'),jdecode(''),'/5801.html','true',[],''],
	['PAGE','5701',jdecode('Catalog'),jdecode(''),'/5701/index.html','true',[ 
		['PAGE','8201',jdecode('BONSAI+TOOL+KITS'),jdecode(''),'/5701/8201.html','true',[],''],
		['PAGE','9301',jdecode('BONSAI+TOOL+ROLLS'),jdecode(''),'/5701/9301.html','true',[],''],
		['PAGE','9401',jdecode('BOOKS'),jdecode(''),'/5701/9401.html','true',[],''],
		['PAGE','9422',jdecode('BRANCH+BENDERS'),jdecode(''),'/5701/9422.html','true',[],''],
		['PAGE','13001',jdecode('CUTTERS%2C+CONCAVE'),jdecode(''),'/5701/13001.html','true',[],''],
		['PAGE','9622',jdecode('CUTTERS%2C+KNOB+'),jdecode(''),'/5701/9622.html','true',[],''],
		['PAGE','16101',jdecode('CUTTERS%2C+ROOT'),jdecode(''),'/5701/16101.html','true',[],''],
		['PAGE','9916',jdecode('CUTTERS%2C+WIRE'),jdecode(''),'/5701/9916.html','true',[],''],
		['PAGE','9601',jdecode('CUT+DRESSINGS'),jdecode(''),'/5701/9601.html','true',[],''],
		['PAGE','9643',jdecode('JIN+%26+GRAFTING'),jdecode(''),'/5701/9643.html','true',[],''],
		['PAGE','26801',jdecode('GARDENING'),jdecode(''),'/5701/26801.html','true',[],''],
		['PAGE','25501',jdecode('LANDSCAPING+TOOLS'),jdecode(''),'/5701/25501.html','true',[],''],
		['PAGE','28301',jdecode('HORI-HORI'),jdecode(''),'/5701/28301.html','true',[],''],
		['PAGE','9664',jdecode('KNIVES+NHS'),jdecode(''),'/5701/9664.html','true',[],''],
		['PAGE','9685',jdecode('MISCELLANEOUS'),jdecode(''),'/5701/9685.html','true',[],''],
		['PAGE','29001',jdecode('LEAF+TRIMMERS'),jdecode(''),'/5701/29001.html','true',[],''],
		['PAGE','9706',jdecode('POTTING+SUPPLIES'),jdecode(''),'/5701/9706.html','true',[],''],
		['PAGE','9727',jdecode('POTTING+TOOLS'),jdecode(''),'/5701/9727.html','true',[],''],
		['PAGE','9748',jdecode('RAKES%2C+BONSAI'),jdecode(''),'/5701/9748.html','true',[],''],
		['PAGE','9769',jdecode('ROOT+TOOLS'),jdecode(''),'/5701/9769.html','true',[],''],
		['PAGE','9790',jdecode('SAWS'),jdecode(''),'/5701/9790.html','true',[],''],
		['PAGE','26101',jdecode('SHARPENERS'),jdecode(''),'/5701/26101.html','true',[],''],
		['PAGE','9832',jdecode('SHEARS+ASHINAGA'),jdecode(''),'/5701/9832.html','true',[],''],
		['PAGE','29022',jdecode('SHEARS+BUD+TRIMMING'),jdecode(''),'/5701/29022.html','true',[],''],
		['PAGE','9811',jdecode('SHEARS+GARDENCUTS'),jdecode(''),'/5701/9811.html','true',[],''],
		['PAGE','29043',jdecode('SHEARS+FLORAL'),jdecode(''),'/5701/29043.html','true',[],''],
		['PAGE','29064',jdecode('SHEARS+HASAMI'),jdecode(''),'/5701/29064.html','true',[],''],
		['PAGE','29085',jdecode('SHEARS+IKEBANA'),jdecode(''),'/5701/29085.html','true',[],''],
		['PAGE','29106',jdecode('SHEARS+KORYU'),jdecode(''),'/5701/29106.html','true',[],''],
		['PAGE','9853',jdecode('SHEARS+NURSERY'),jdecode(''),'/5701/9853.html','true',[],''],
		['PAGE','29127',jdecode('SHEARS+PRUNING'),jdecode(''),'/5701/29127.html','true',[],''],
		['PAGE','9874',jdecode('TWEEZERS%2C+BONSAI'),jdecode(''),'/5701/9874.html','true',[],''],
		['PAGE','9895',jdecode('WIRE'),jdecode(''),'/5701/9895.html','true',[],''],
		['PAGE','9937',jdecode('WIRE++%26+JIN+PLIERS'),jdecode(''),'/5701/9937.html','true',[],'']
	],''],
	['PAGE','5822',jdecode('Warranty'),jdecode(''),'/5822.html','true',[],''],
	['PAGE','5843',jdecode('Guestbook'),jdecode(''),'/5843.html','true',[],''],
	['PAGE','5864',jdecode('Resources'),jdecode(''),'/5864.html','true',[],''],
	['PAGE','30501',jdecode('Tool+Care'),jdecode(''),'/30501.html','true',[],''],
	['PAGE','4973',jdecode('Contact'),jdecode(''),'/4973.html','true',[],'']];
var siteelementCount=42;
theSitetree.topTemplateName='Metal';
theSitetree.paletteFamily='64896D';
theSitetree.keyvisualId='809';
theSitetree.keyvisualName='gartenbau.jpg';
theSitetree.fontsetId='142';
theSitetree.graphicsetId='157';
theSitetree.contentColor='F00000';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Metal',
				paletteFamily: 	'64896D',
				keyvisualId: 	'809',
				keyvisualName: 	'gartenbau.jpg',
				fontsetId: 		'142',
				graphicsetId: 	'157',
				contentColor: 	'F00000',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'64896D',
				b_color: 		'A7E4B6',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20091211-220057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5822',
internalId:  '',
customField: '20091123-183518'
};
webappMappings['1002']=webappMappings['1002-5843aendu0invthi']={
webappId:    '1002',
documentId:  '5843',
internalId:  '5843aendu0invthi',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20100428-212249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20091218-161031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5864',
internalId:  '',
customField: '20091123-170320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5843',
internalId:  '',
customField: '20091210-165521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4973',
internalId:  '',
customField: '20091123-183416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20091211-162932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20091211-163015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20091211-163132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9422',
internalId:  '',
customField: '20091211-162223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20091211-164029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9622',
internalId:  '',
customField: '20091214-212219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20091211-165500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9937',
internalId:  '',
customField: '20091211-221843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9916',
internalId:  '',
customField: '20091214-210920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20091211-163339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9643',
internalId:  '',
customField: '20091214-221919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9664',
internalId:  '',
customField: '20100721-122631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9895',
internalId:  '',
customField: '20091214-222511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9811',
internalId:  '',
customField: '20100428-213334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9790',
internalId:  '',
customField: '20091223-152959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9706',
internalId:  '',
customField: '20091217-145302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9727',
internalId:  '',
customField: '20091217-190705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9748',
internalId:  '',
customField: '20091223-141533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9874',
internalId:  '',
customField: '20100103-170442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25501',
internalId:  '',
customField: '20100428-213009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9769',
internalId:  '',
customField: '20091223-150118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20091223-154212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9685',
internalId:  '',
customField: '20091216-150654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9853',
internalId:  '',
customField: '20100107-144106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26801',
internalId:  '',
customField: '20091216-132409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28301',
internalId:  '',
customField: '20091216-142103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9832',
internalId:  '',
customField: '20091223-171423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29001',
internalId:  '',
customField: '20091216-152624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29022',
internalId:  '',
customField: '20091223-174159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29043',
internalId:  '',
customField: '20091223-181616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29064',
internalId:  '',
customField: '20100102-225121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29085',
internalId:  '',
customField: '20100103-002556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29106',
internalId:  '',
customField: '20100103-003029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29127',
internalId:  '',
customField: '20100103-172920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30501',
internalId:  '',
customField: '20091211-221144'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INVTHI';
var companyName   = 'JOSHUA+ROTH+LIMITED';
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();
};
