/* [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','2001',jdecode('Home'),jdecode(''),'/2001.html','true',[],'',''],
	['PAGE','2052',jdecode('About+us'),jdecode(''),'/2052.html','true',[],'',''],
	['PAGE','2073',jdecode('Services'),jdecode(''),'/2073/index.html','true',[ 
		['PAGE','6901',jdecode('Upholstery'),jdecode(''),'/2073/6901.html','true',[],'',''],
		['PAGE','6922',jdecode('Slipcovers'),jdecode(''),'/2073/6922.html','true',[],'',''],
		['PAGE','6943',jdecode('Cushions+%26+Pillows'),jdecode(''),'/2073/6943.html','true',[],'',''],
		['PAGE','6964',jdecode('Upholstery+Repair'),jdecode(''),'/2073/6964.html','true',[],'',''],
		['PAGE','12416',jdecode('Environmental+Stewardship'),jdecode(''),'/2073/12416.html','true',[],'',''],
		['PAGE','12241',jdecode('Items+for+Sale'),jdecode(''),'/2073/12241.html','true',[],'',''],
		['PAGE','6985',jdecode('Alterations'),jdecode(''),'/2073/6985.html','true',[],'',''],
		['PAGE','7006',jdecode('Custom+Sewing'),jdecode(''),'/2073/7006.html','true',[],'',''],
		['PAGE','10701',jdecode('Private+Instruction'),jdecode(''),'/2073/10701.html','true',[],'',''],
		['PAGE','12821',jdecode('Estate+Services'),jdecode(''),'/2073/12821.html','true',[],'','']
	],'',''],
	['PAGE','7027',jdecode('Gallery'),jdecode(''),'/7027.html','true',[],'',''],
	['PAGE','2115',jdecode('Contact'),jdecode(''),'/2115/index.html','true',[ 
		['PAGE','2136',jdecode('Address'),jdecode(''),'/2115/2136.html','true',[],'',''],
		['PAGE','2157',jdecode('How+to+find+us'),jdecode(''),'/2115/2157.html','true',[],'','']
	],'',''],
	['PAGE','12036',jdecode('Map'),jdecode(''),'/12036.html','true',[],'',''],
	['PAGE','7048',jdecode('Tips+%26+Tricks'),jdecode(''),'/7048/index.html','true',[ 
		['PAGE','12250',jdecode('Fabric+Sources'),jdecode(''),'/7048/12250.html','true',[],'',''],
		['PAGE','12259',jdecode('Fabric+Shrinkage'),jdecode(''),'/7048/12259.html','true',[],'',''],
		['PAGE','12268',jdecode('Cats+and+Furniture'),jdecode(''),'/7048/12268.html','true',[],'',''],
		['PAGE','12672',jdecode('Zippers+Repair%2FReplace'),jdecode(''),'/7048/12672.html','true',[],'','']
	],'',''],
	['PAGE','12048',jdecode('Business+Links'),jdecode(''),'/12048.html','true',[],'',''],
	['PAGE','19278',jdecode('Doozie+For+Dolls'),jdecode(''),'/19278.html','true',[],'',''],
	['PAGE','12869',jdecode('Doozie+Cavaliers'),jdecode(''),'/12869.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='18902D';
theSitetree.keyvisualId='7128';
theSitetree.keyvisualName='kv_7128.jpg';
theSitetree.fontsetId='16394';
theSitetree.graphicsetId='12130';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blossom',
				paletteFamily: 	'18902D',
				keyvisualId: 	'7128',
				keyvisualName: 	'kv_7128.jpg',
				fontsetId: 		'16394',
				graphicsetId: 	'12130',
				contentColor: 	'000000',
				contentBGColor: 'E5E2E2',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2001',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '12036',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20100212-180056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2052',
internalId:  '',
customField: '20080618-203537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2073',
internalId:  '',
customField: '20080618-203601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20080618-203655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2115',
internalId:  '',
customField: '20081208-231012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12048',
internalId:  '',
customField: '20091105-012036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7027',
internalId:  '',
customField: '20080621-235436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20080618-204143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7006',
internalId:  '',
customField: '20080618-204108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12821',
internalId:  '',
customField: '20081208-234002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6922',
internalId:  '',
customField: '20080618-203723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6943',
internalId:  '',
customField: '20080618-203756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6964',
internalId:  '',
customField: '20080618-203834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12416',
internalId:  '',
customField: '20080618-203906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12241',
internalId:  '',
customField: '20080618-204015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6985',
internalId:  '',
customField: '20080618-204049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2136',
internalId:  '',
customField: '20080618-200210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2157',
internalId:  '',
customField: '20080618-200236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12036',
internalId:  '',
customField: '20080618-113917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7048',
internalId:  '',
customField: '20080618-200307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12250',
internalId:  '',
customField: '20080621-234926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12259',
internalId:  '',
customField: '20080618-200419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12268',
internalId:  '',
customField: '20080618-125123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12672',
internalId:  '',
customField: '20080629-204547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12869',
internalId:  '',
customField: '20100311-202522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19278',
internalId:  '',
customField: '20100606-145254'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INXSHG';
var companyName   = 'Doozie+Design+Services+of+Bainbridge+Island';
var htmlTitle	  = 'Doozie+Design+Services+-Upholstery%2C+Slipcovers+and+Sewing.';
var metaKeywords  = 'upholstery%2C+slipcovers%2C+alterations%2C+sewing%2C+mending%2C+Bainbridge+Island%2C+Washington%2C+furniture%2C+repair%2C+cushions%2C+pillows%2C+chair%2C+sofa%2C+couch%2C+settee%2C+loveseat%2C+ottoman%2C+Doozie+Design+Services%2C';
var metaContents  = 'upholstery%2C+slipcovers%2C+alterations%2C+sewing%2C+mending%2C+Bainbridge+Island%2C++Washington%2C+furniture%2C+repair%2C+cushions%2C+pillows%2C+chair%2C+sofa%2C+couch%2C+settee%2C+loveseat%2C+ottoman%2C+Doozie+Design+Services%2C+Doozie+Upholstery+and+Slipcovers%2C';
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();
};
