/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','757',jdecode('About+Us'),jdecode(''),'/757.html','true',[],'',''],
	['PAGE','673',jdecode('Log+Furniture'),jdecode(''),'/673/index.html','true',[ 
		['PAGE','715',jdecode('Beds'),jdecode(''),'/673/715.html','true',[],'',''],
		['PAGE','694',jdecode('Tables'),jdecode(''),'/673/694.html','true',[],'',''],
		['PAGE','50501',jdecode('Dressers'),jdecode(''),'/673/50501.html','true',[],'',''],
		['PAGE','14001',jdecode('Seating'),jdecode(''),'/673/14001.html','true',[],'',''],
		['PAGE','14022',jdecode('Desks'),jdecode(''),'/673/14022.html','true',[],'',''],
		['PAGE','14043',jdecode('Lamps'),jdecode(''),'/673/14043.html','true',[],'',''],
		['PAGE','736',jdecode('Accessories'),jdecode(''),'/673/736.html','true',[],'','']
	],'',''],
	['PAGE','46201',jdecode('Woodwork'),jdecode(''),'/46201/index.html','true',[ 
		['PAGE','44101',jdecode('Cremation+Urns'),jdecode(''),'/46201/44101.html','true',[],'',''],
		['PAGE','46601',jdecode('Miscellaneous'),jdecode(''),'/46201/46601.html','true',[],'',''],
		['PAGE','48501',jdecode('Canes+and+Walking+Sticks'),jdecode(''),'/46201/48501.html','true',[],'','']
	],'',''],
	['PAGE','14064',jdecode('AllQi+Showcase'),jdecode(''),'/14064/index.html','true',[ 
		['PAGE','14106',jdecode('Qi+TY'),jdecode(''),'/14064/14106.html','true',[],'',''],
		['PAGE','14127',jdecode('Qi+CANE'),jdecode(''),'/14064/14127.html','true',[],'','']
	],'',''],
	['PAGE','841',jdecode('Price+List'),jdecode(''),'/841.html','true',[],'',''],
	['PAGE','9901',jdecode('Ordering+Info'),jdecode(''),'/9901.html','true',[],'',''],
	['PAGE','15501',jdecode('Contact+Us'),jdecode(''),'/15501.html','true',[],'',''],
	['PAGE','15522',jdecode('Interesting+Links'),jdecode(''),'/15522.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Stone';
theSitetree.paletteFamily='383691';
theSitetree.keyvisualId='4396';
theSitetree.keyvisualName='kv_4396.jpg';
theSitetree.fontsetId='10805';
theSitetree.graphicsetId='11239';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='9C9B9B';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stone',
				paletteFamily: 	'383691',
				keyvisualId: 	'4396',
				keyvisualName: 	'kv_4396.jpg',
				fontsetId: 		'10805',
				graphicsetId: 	'11239',
				contentColor: 	'000000',
				contentBGColor: '9C9B9B',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20090615-205431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20080806-044417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20080806-045508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20080806-051542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20070616-010632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50501',
internalId:  '',
customField: '20070616-010647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20080806-051915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14022',
internalId:  '',
customField: '20080806-051959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14043',
internalId:  '',
customField: '20070208-225711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20080806-052208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46201',
internalId:  '',
customField: '20070208-230248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44101',
internalId:  '',
customField: '20080806-051322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46601',
internalId:  '',
customField: '20080806-052339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48501',
internalId:  '',
customField: '20080806-051154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14064',
internalId:  '',
customField: '20090110-160623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14106',
internalId:  '',
customField: '20080806-054841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14127',
internalId:  '',
customField: '20060816-045405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '841',
internalId:  '',
customField: '20060902-005248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20090110-161328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20090930-002540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15522',
internalId:  '',
customField: '20090110-161413'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN020INERS2';
var companyName   = 'Western+Workshop+';
var htmlTitle	  = 'Western+Workshop+-+Unique+Log+Furniture+and+AllQi+Products';
var metaKeywords  = 'HEAD+stop%2C+snore%2C+snoring%2C+anti-snoring%2C+ring%2C+log%2C+furniture%2C+Edmonton%2C+Alberta%2C+Canada%2C+rustic%2C+qi%2C+Qi%2C+Ki%2C+ki%2C+Chee%2C+inexpensive%2C+acupressure%2C+reflexology%2C+sleep%2C+quiet%2C+cane%2C+desk%2C+bed%2C+chair%2C+table%2C+wood%2C+cabin%2C+serene%2C+marriage%2C+man%2C+woman%2C+men%2C+women%2C+holistic%2C+alternative%2C+medicine%2C+cure%2C+suppress%2C+stop%2C+medical%2C+easy%2C+anti%2C+handmade%2C+hand%2C+made%2C+finger%2C+little%2C+copper%2C+jewellery%2C+quality%2C+western%2C+workshop%2C+table%2C+rocker%2C+rocking%2C+woodwork%2C+marriage%2C+night%2C+restless%2C+toss+%2FHEAD';
var metaContents  = 'High+quality%2C+handmade+log+and+rustic+furniture+and+accessories+from+Edmonton%2C+Alberta%2C+Canada.++Each+piece+is+individually+handcrafted+by+us+to+the+highest+standards+using+the+finest+material+and+hardware.';
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();
};

