/* [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','512',jdecode('Home'),jdecode(''), jdecode('%2F512.html'), 'true',[],'',''],
	['PAGE','11912',jdecode('Creative+Burlap+Designs'),jdecode(''), jdecode('%2F11912%2Findex.html'), 'true',[ 
		['PAGE','18112',jdecode('Ivy'),jdecode(''), jdecode('%2F11912%2F18112.html'), 'true',[],'',''],
		['PAGE','18133',jdecode('Flowers'),jdecode(''), jdecode('%2F11912%2F18133.html'), 'true',[],'',''],
		['PAGE','18154',jdecode('Yellow+Bow'),jdecode(''), jdecode('%2F11912%2F18154.html'), 'true',[],'',''],
		['PAGE','18175',jdecode('Cherubs'),jdecode(''), jdecode('%2F11912%2F18175.html'), 'true',[],'',''],
		['PAGE','18196',jdecode('Horses'),jdecode(''), jdecode('%2F11912%2F18196.html'), 'true',[],'',''],
		['PAGE','18217',jdecode('Nature'),jdecode(''), jdecode('%2F11912%2F18217.html'), 'true',[],'','']
	],'',''],
	['PAGE','7612',jdecode('Creative+Burlap+Uses'),jdecode(''), jdecode('%2F7612%2Findex.html'), 'true',[ 
		['PAGE','38603',jdecode('Winter+%2F+Frost+Protection'),jdecode(''), jdecode('%2F7612%2F38603.html'), 'true',[],'',''],
		['PAGE','24012',jdecode('Autumn+Leaf+Barrier'),jdecode(''), jdecode('%2F7612%2F24012.html'), 'true',[],'',''],
		['PAGE','24033',jdecode('Store+Displays'),jdecode(''), jdecode('%2F7612%2F24033.html'), 'true',[],'',''],
		['PAGE','24054',jdecode('Bulletin+Boards+++'),jdecode(''), jdecode('%2F7612%2F24054.html'), 'true',[],'',''],
		['PAGE','24075',jdecode('Sack+Races'),jdecode(''), jdecode('%2F7612%2F24075.html'), 'true',[],'','']
	],'',''],
	['PAGE','38430',jdecode('Veggie+Visors'),jdecode(''), jdecode('%2F38430.html'), 'true',[],'',''],
	['PAGE','15512',jdecode('Contact'),jdecode(''), jdecode('%2F15512%2Findex.html'), 'true',[ 
		['PAGE','21612',jdecode('Contact+%28follow+up+page%29'),jdecode(''), jdecode('%2F15512%2F21612.html'), 'false',[],'','']
	],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Anniversary';
theSitetree.paletteFamily='DDAD51';
theSitetree.keyvisualId='3740';
theSitetree.keyvisualName='kv_3740.jpg';
theSitetree.fontsetId='10472';
theSitetree.graphicsetId='10944';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F3EFDB';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7P'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Anniversary',
				paletteFamily: 	'DDAD51',
				keyvisualId: 	'3740',
				keyvisualName: 	'kv_3740.jpg',
				fontsetId: 		'10472',
				graphicsetId: 	'10944',
				contentColor: 	'000000',
				contentBGColor: 'F3EFDB',
				a_color: 		'F7EFDE',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'828181',
				e_color: 		'828181',
				f_color: 		'828181',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '512',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7612',
internalId:  '',
customField: '20120109-124956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38430',
internalId:  '',
customField: '20120110-101814'
};
webappMappings['7008']=webappMappings['7008-12968']={
webappId:    '7008',
documentId:  '15512',
internalId:  '12968',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '512',
internalId:  '',
customField: '20120109-123403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24012',
internalId:  '',
customField: '20060923-173707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24033',
internalId:  '',
customField: '20060917-222743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24054',
internalId:  '',
customField: '20060917-220158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24075',
internalId:  '',
customField: '20060917-221200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11912',
internalId:  '',
customField: '20120109-124627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18112',
internalId:  '',
customField: '20060824-135148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18133',
internalId:  '',
customField: '20120110-100053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18154',
internalId:  '',
customField: '20060720-115417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18175',
internalId:  '',
customField: '20060720-111547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18196',
internalId:  '',
customField: '20060824-135957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18217',
internalId:  '',
customField: '20060824-140026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15512',
internalId:  '',
customField: '20060720-120654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21612',
internalId:  '',
customField: '20060720-120557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38603',
internalId:  '',
customField: '20120110-164142'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050IN23X2';
var companyName   = 'Creative+Burlap+...and+more%21';
var htmlTitle	  = 'Creative+Burlap';
var metaKeywords  = 'Burlap%2C+Rose+Bush+Coverings%2CFrost+Protection%2CGardening+Supplies%2CConnecticut+Garden+Supplies%2CGarden+Burlap%2CSilk+Screened+Burlap%2CCustom+Burlap%2CCustom+Gardens%2CUses+for+Burlap%2CUses+of+Burlap%2CBuy+Burlap%2CCheap+Burlap%2CBurlap+Online%2CCreative+Burlap%2CDecorative+Burlap%2CAll+Natural+Fiber%2CDesigns+Hand+Silk+Screened%2CEco-Friendly%2CWeather-Proof+Inks%2CAssembled+in+the+USA%2CLandscape%2C+Decorative+Landscaping%2C+Veggie+Visors%2C+garlic+head+visor%2C+pumpkin+head+visor';
var metaContents  = 'Creative+Burlap+is+silk-screened+decorative+burlap+and+more.+Family-owned+and+operated%2C+we++design%2Fmanufacture+and+supply+decorative+burlap+for+homes%2C+schools%2C+businesses%2C+gardens%2C+outdoor+festivals%2C+events+and+more.+Based+in+Northeastern+Connecticut+and+made+in+the+U.S.A.+Burlap%2C+Rose+Bush+Coverings%2CFrost+Protection%2CGardening+Supplies%2CConnecticut+Garden+Supplies%2CGarden+Burlap%2CSilk+Screened+Burlap%2CCustom+Burlap%2CCustom+Gardens%2CUses+for+Burlap%2CUses+of+Burlap%2CBuy+Burlap%2CCheap+Burlap%2CBurlap+Online%2CCreative+Burlap%2Cveggie+visors%2Cgarlic+head%2Cpumpkin+head';
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();
};

