/* [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','6201',jdecode('Home'),jdecode(''),'/6201.html','true',[],''],
	['PAGE','14801',jdecode('Products'),jdecode(''),'/14801/index.html','true',[ 
		['PAGE','15001',jdecode('FoamStep+Premium'),jdecode(''),'/14801/15001.html','true',[],''],
		['PAGE','28943',jdecode('FoamStep+Economy+'),jdecode(''),'/14801/28943.html','true',[],''],
		['PAGE','30001',jdecode('FoamStep+Carpet'),jdecode(''),'/14801/30001.html','true',[],''],
		['PAGE','28922',jdecode('FoamStep+Wood'),jdecode(''),'/14801/28922.html','true',[],''],
		['PAGE','69801',jdecode('FoamStep+Rollout+Mat'),jdecode(''),'/14801/69801.html','true',[],''],
		['PAGE','15022',jdecode('DanceStep'),jdecode(''),'/14801/15022.html','false',[],''],
		['PAGE','15043',jdecode('GarageStep'),jdecode(''),'/14801/15043.html','false',[],''],
		['PAGE','15064',jdecode('TuffStep'),jdecode(''),'/14801/15064.html','true',[],''],
		['PAGE','28901',jdecode('RubberStep'),jdecode(''),'/14801/28901.html','true',[],''],
		['PAGE','66301',jdecode('LearnStep+ABC'),jdecode(''),'/14801/66301.html','true',[],''],
		['PAGE','29501',jdecode('LearnStep+ABC123'),jdecode(''),'/14801/29501.html','true',[],'']
	],''],
	['PAGE','60201',jdecode('Request+a+QUOTE'),jdecode(''),'/60201.html','true',[],''],
	['PAGE','6648',jdecode('Purchase+online'),jdecode(''),'/6648.html','true',[],''],
	['PAGE','6315',jdecode('Contact'),jdecode(''),'/6315.html','true',[],''],
	['PAGE','14822',jdecode('FAQs'),jdecode(''),'/14822.html','true',[],''],
	['PAGE','52001',jdecode('FS+Prem%2FEco+Images'),jdecode(''),'/52001.html','false',[],''],
	['PAGE','52222',jdecode('FS+Carpet+Images'),jdecode(''),'/52222.html','false',[],''],
	['PAGE','52243',jdecode('FS+Wood+Images'),jdecode(''),'/52243.html','false',[],''],
	['PAGE','52264',jdecode('TuffStep+Images'),jdecode(''),'/52264.html','false',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Common';
theSitetree.paletteFamily='4455BE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='26634';
theSitetree.graphicsetId='13448';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Common',
				paletteFamily: 	'4455BE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'26634',
				graphicsetId: 	'13448',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14822',
internalId:  '',
customField: '20100601-161037'
};
webappMappings['4001']=webappMappings['4001-27986227']={
webappId:    '4001',
documentId:  '6648',
internalId:  '27986227',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20100601-155544'
};
webappMappings['7008']=webappMappings['7008-28358']={
webappId:    '7008',
documentId:  '60201',
internalId:  '28358',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28922',
internalId:  '',
customField: '20100621-173656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15064',
internalId:  '',
customField: '20100621-172313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6315',
internalId:  '',
customField: '20100622-141654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28901',
internalId:  '',
customField: '20100622-112529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15043',
internalId:  '',
customField: '20100504-153708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15022',
internalId:  '',
customField: '20100504-153644'
};
webappMappings['7008']=webappMappings['7008-26475']={
webappId:    '7008',
documentId:  '6315',
internalId:  '26475',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20100621-165657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20100622-142024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6648',
internalId:  '',
customField: '20100509-143633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60201',
internalId:  '',
customField: '20100524-161311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28943',
internalId:  '',
customField: '20100621-165858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29501',
internalId:  '',
customField: '20100621-174042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20100621-172347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52264',
internalId:  '',
customField: '20100318-190846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52222',
internalId:  '',
customField: '20100318-190845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52243',
internalId:  '',
customField: '20100318-190846'
};
webappMappings['7060']=webappMappings['7060-d54958c16c409cd633e2311cbcc69786']={
webappId:    '7060',
documentId:  '52001',
internalId:  'd54958c16c409cd633e2311cbcc69786',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52001',
internalId:  '',
customField: '20100318-185234'
};
webappMappings['7060']=webappMappings['7060-67bf864f5b63aa21fb088db7f5d052d0']={
webappId:    '7060',
documentId:  '52222',
internalId:  '67bf864f5b63aa21fb088db7f5d052d0',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-42981afae8bc0e670460720e03d19cc6']={
webappId:    '7060',
documentId:  '52243',
internalId:  '42981afae8bc0e670460720e03d19cc6',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-051cc4204164db8cad2db0011761b143']={
webappId:    '7060',
documentId:  '52264',
internalId:  '051cc4204164db8cad2db0011761b143',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66301',
internalId:  '',
customField: '20100622-123119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69801',
internalId:  '',
customField: '20100623-121826'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INLMMN';
var companyName   = 'www.MATSTEP.com++++Call+or+Text+%40+%28715%29+417-1756+';
var htmlTitle	  = 'Interlocking+EVA+foam+puzzle+mats+for+any+installation%21';
var metaKeywords  = 'Foam+Floor+Tiles+%7C+Foam+Mats+%7C+Foam+Tiles+%7C+Interlocking+Floor+Mats+%7C+Interlocking+Floor+Tiles+%7C+Interlocking+Foam+Floor+%7C+Interlocking+Foam+Flooring+%7C+Interlocking+Foam+Mat+%7C+Interlocking+Foam+Squares+%7C+Interlocking+Mats+%7C+Interlocking+Rubber+Floor+Tiles+%7C+Tradeshow+Booth+Flooring+%7C+Trade+Show+Flooring+%7C+Tradeshow+Flooring+%7C+Foam+Play+Mat+%7C+Foam+Play+Mats+%7C+Kids+Play+Mats+%7C+Play+Room+Floor+%7C+Play+Room+Flooring+%7C+Puzzle+Mats+%7C+Playroom+Floor+%7C+Playroom+Flooring+%7C+Basement+Carpet+%7C+Basement+Floor++%7C+Basement+Flooring+%7C+Alphabet+Mats+%7C+Exercise+Mat+%7C+Gym+Flooring+%7C+Workout+Room+Flooring+%7C+Sports+Flooring+';
var metaContents  = 'MATSTEP+carries+great+quality+Foam+Rubber+Flooring%2C+Soft+Mat%2C+Exercise+Mat%2C+Martial+Arts+Mats%2C+Foam+Mat%2C+Play+Mat%2C+Rubber+Floor+Mat%2C+Child+Mat%2C+Daycare+Mats%2C+Anti-fatigue+Mat%2C+Garage+Flooring%2C+Kids+Mats+and+Puzzle+Mats+for+Home%2C+Residential+and+Commercial+applications.Our+Interlocking+Foam+Mat%2C+Play+Mat%2C+Exercise+Mats+and+Play+Mats+are+made+from+a+high+quality+EVA+foam+product+with+many+colors%2C+also+known+as+Puzzle+Mat+or+Kids+Mats.+We+also+offer+Kids+Play+Mats+and+Child+Mats.';
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();
};
