/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','4901',jdecode('Products'),jdecode(''),'/4901/index.html','true',[ 
		['PAGE','7801',jdecode('Natural+Stone'),jdecode(''),'/4901/7801.html','true',[],'',''],
		['PAGE','4922',jdecode('Precast+Stone'),jdecode(''),'/4901/4922.html','true',[],'',''],
		['PAGE','4943',jdecode('BuildBlock%C2%AE+ICFs'),jdecode(''),'/4901/4943.html','true',[],'',''],
		['PAGE','4964',jdecode('FireRock'),jdecode(''),'/4901/4964.html','true',[],'',''],
		['PAGE','9501',jdecode('eco+stucco%E2%84%A2'),jdecode(''),'/4901/9501.html','true',[],'',''],
		['PAGE','17301',jdecode('Floating+Islands'),jdecode(''),'/4901/17301.html','true',[],'',''],
		['PAGE','32412',jdecode('Stone+Gallery'),jdecode(''),'/4901/32412.html','true',[],'','']
	],'',''],
	['PAGE','5801',jdecode('Contact'),jdecode(''),'/5801.html','true',[],'',''],
	['PAGE','10401',jdecode('Natural+Stone'),jdecode(''),'/10401.html','true',[],'',''],
	['PAGE','26512',jdecode('L%26%23x27%3Babri+360+Tours'),jdecode(''),'/26512.html','true',[],'',''],
	['PAGE','45412',jdecode('Request+Quote'),jdecode(''),'/45412.html','true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='378927';
theSitetree.keyvisualId='2252';
theSitetree.keyvisualName='reise2.jpg';
theSitetree.fontsetId='366';
theSitetree.graphicsetId='416';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='378927';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'378927',
				keyvisualId: 	'2252',
				keyvisualName: 	'reise2.jpg',
				fontsetId: 		'366',
				graphicsetId: 	'416',
				contentColor: 	'FFFFFF',
				contentBGColor: '378927',
				a_color: 		'378927',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-8473fa58bc38c8989b798bfb71201ae6']={
webappId:    '7060',
documentId:  '10401',
internalId:  '8473fa58bc38c8989b798bfb71201ae6',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20081124-154611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20090518-110635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7801',
internalId:  '',
customField: '20090521-135420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4922',
internalId:  '',
customField: '20090521-135446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4943',
internalId:  '',
customField: '20090508-182250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4964',
internalId:  '',
customField: '20081031-124206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20081212-160859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20081218-104421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10401',
internalId:  '',
customField: '20090521-183909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20081212-173846'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26512',
internalId:  '',
customField: '20090521-135725'
};
webappMappings['7060']=webappMappings['7060-7f5caf2196e5db2c312b26ed33665cc3']={
webappId:    '7060',
documentId:  '32412',
internalId:  '7f5caf2196e5db2c312b26ed33665cc3',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32412',
internalId:  '',
customField: '20090309-192606'
};
webappMappings['7008']=webappMappings['7008-7303']={
webappId:    '7008',
documentId:  '45412',
internalId:  '7303',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45412',
internalId:  '',
customField: '20100328-163016'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INVY36';
var companyName   = 'L%27abri+Architectural+Products';
var htmlTitle	  = 'Labri+Architectural+Products+';
var metaKeywords  = 'labri+architectural+products%2C+labri+architectural+products%2C+labri%2C+labri%2C+floating+island%2C+floating+islands%2C+carbon+sequestration%2C+habitat+restoration%2C+bio+haven%2C+bio+havens%2C+biohaven%2C+biohavens%2C+water+restoration%2C+storm+water%2C+phosphate%2C+phosphates%2C+nitrogen%2C+nutrient%2C+heavy+metals%2C+green%2C++environmentally+friendly%2C++natural%2C+sustainable%2C++stone+veneer%2C++precast%2C++carved+stone%2C++columns%2C++fireplace%2C++fireplaces%2C++fireplace+surround%2C++full+dimension+stone%2C++quarried+stone%2C++natural+stone%2C++granite%2C++slate%2C++soapstone%2C++quartzite%2C++basalt%2C++limestone%2C++onyx%2C++marble%2C++sandstone%2C++flagstone%2C++ledgestone%2C++squares+and+recs%2C++stone%2C++usgbc%2C++stucco%2C++mineral+wall+finish%2C++mineral%2C++icf%2C++insulating+concrete+form%2C++preengineered+masonry%2C+360+photo%2C+360+photos%2C+real+estate%2C+real+estate+photos';
var metaContents  = 'Labri+Architectural+Products+has+developed+a+robust%2C+environmentally+friendly+collection+of+products+with+clean%2C+natural%2C+renewable+and+efficient+design.++Our+products+are+both+beautiful+and+cost+effective.Floating+island%2C+floating+islands%2C+carbon+sequestration%2C+habitat+restoration%2C+bio+haven%2C+bio+havens%2C+water+restoration%2C+green%2C++environmentally+friendly%2C++natural%2C++sustainable%2C++stone+veneer%2C++precast%2C++carved+stone%2C++columns%2C++fireplace%2C++fireplaces%2C++fireplace+surround%2C++full+dimension+stone%2C++quarried+stone%2C++natural+stone%2C++granite%2C++slate%2C++soapstone%2C++quartzite%2C++basalt%2C++limestone%2C++onyx%2C++marble%2C++sandstone%2C++flagstone%2C++ledgestone%2C++squares+and+recs%2C++stone%2C++usgbc%2C++stucco%2C++mineral+wall+finish%2C++mineral%2C++icf%2C++insulating+concrete+form%2C++preengineered+masonry+%2C+360+photo%2C+360+photos%2C+real+estate%2C+real+estate+photos+++';
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();
};

