/* [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','2901',jdecode('Home'),jdecode(''),'/2901.html','true',[],''],
	['PAGE','2952',jdecode('Catalog+and+Email+Form'),jdecode(''),'/2952.html','true',[],''],
	['PAGE','21232',jdecode('Order+Here'),jdecode(''),'/21232.html','true',[],''],
	['PAGE','2973',jdecode('Frequently+Asked+Questions'),jdecode(''),'/2973.html','true',[],''],
	['PAGE','2994',jdecode('Links'),jdecode(''),'/2994.html','true',[],''],
	['PAGE','13290',jdecode('Customer+Creations'),jdecode(''),'/13290.html','true',[],''],
	['PAGE','21332',jdecode('Other+Fun+Things'),jdecode(''),'/21332.html','true',[],''],
	['PAGE','23832',jdecode('store+directory'),jdecode(''),'/23832.html','false',[],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='61926E';
theSitetree.keyvisualId='6906';
theSitetree.keyvisualName='kv_6906.jpg';
theSitetree.fontsetId='11215';
theSitetree.graphicsetId='12037';
theSitetree.contentColor='304B5C';
theSitetree.contentBGColor='80AF8C';
var theTemplate={
				name: 			'Antigua',
				paletteFamily: 	'61926E',
				keyvisualId: 	'6906',
				keyvisualName: 	'kv_6906.jpg',
				fontsetId: 		'11215',
				graphicsetId: 	'12037',
				contentColor: 	'304B5C',
				contentBGColor: '80AF8C',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20100402-104655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2973',
internalId:  '',
customField: '20100118-141516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2994',
internalId:  '',
customField: '20100204-155817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2952',
internalId:  '',
customField: '20100322-101933'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '2901',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-6329']={
webappId:    '7008',
documentId:  '2952',
internalId:  '6329',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-5ef00d480c29507d00039e762985072f']={
webappId:    '7060',
documentId:  '13290',
internalId:  '5ef00d480c29507d00039e762985072f',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13290',
internalId:  '',
customField: '20100121-144410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21232',
internalId:  '',
customField: '20100402-112127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21332',
internalId:  '',
customField: '20100203-163316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23832',
internalId:  '',
customField: '20100302-122448'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2901',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INZ0ST';
var companyName   = 'MUDART+LANDSCAPE+MOLDS';
var htmlTitle	  = 'MudArt+-+Reusable+Landscape+Molds';
var metaKeywords  = 'Stepping+stone+molds%2C+concrete+molds%2C+cement+molds%2C+concrete+forms%2C+edger+molds%2C+reusable+molds%2C+table+molds%2C+bench+molds.+mosaic+molds%2C+art+pottery%2C+advent+calendars%2C+MudArt%2C+Jacobson+Plastics%2C+landscape+molds%2C+stepping+stones%2C+pavers%2C+colorant%2C+baskets%2C+pottery%2C+advent+calendars%2C+bear%2C+hummingbird%2C+rabbit%2C+squirrel%2C+coyote%2C+burros%2C+roadrunner%2C+elk%2C+water+lily%2C+dragonfly%2C+fish%2C+flowers%2C+goldfish%2C+rose%2C+turtle%2C+sun%2C+moon%2C+butterfly%2C+horse%2C+moose%2C+fleur+de+lis%2C+whale%2C+kokopeli%2C+slate%2C+rat%2C+mice%2C+rooster%2C+pillow%2C+fairy%2C+ogre%2C+door%2C+shamrock%2C+sorrel%2C+birds';
var metaContents  = 'The+largest+selection+of+affordable+concrete+molds+for+stepping+stones%2C+borders%2C+edgers%2C+pavers%2C+craft+molds%2C+and+other+molds.+All+molds+are+reusable+and+made+in+the+USA.+MudArt+also+makes+and+sells+heirloom+baskets%2C+art+pottery+and+advent+calendars.';
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();
};
