/* [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','1401',jdecode('Home'),jdecode(''),'/1401.html','true',[],'',''],
	['PAGE','16901',jdecode('Products'),jdecode(''),'/16901/index.html','true',[ 
		['PAGE','36567',jdecode('Slab+Countertops'),jdecode(''),'/16901/36567.html','true',[],'',''],
		['PAGE','22601',jdecode('Travertine'),jdecode(''),'/16901/22601.html','true',[],'',''],
		['PAGE','22622',jdecode('Granite'),jdecode(''),'/16901/22622.html','true',[],'',''],
		['PAGE','22643',jdecode('Marble'),jdecode(''),'/16901/22643.html','true',[],'',''],
		['PAGE','22664',jdecode('Ceramic'),jdecode(''),'/16901/22664.html','true',[],'',''],
		['PAGE','22685',jdecode('Porcelain'),jdecode(''),'/16901/22685.html','true',[],'',''],
		['PAGE','22706',jdecode('Glass'),jdecode(''),'/16901/22706.html','true',[],'',''],
		['PAGE','27440',jdecode('Murals'),jdecode(''),'/16901/27440.html','true',[],'',''],
		['PAGE','22727',jdecode('Metal'),jdecode(''),'/16901/22727.html','true',[],'',''],
		['PAGE','43167',jdecode('Tile+Lights'),jdecode(''),'/16901/43167.html','true',[],'',''],
		['PAGE','22748',jdecode('Installation+Products'),jdecode(''),'/16901/22748.html','true',[],'',''],
		['PAGE','33267',jdecode('Sealers+and+Cleaners'),jdecode(''),'/16901/33267.html','true',[],'',''],
		['PAGE','6601',jdecode('Read+Guestbook'),jdecode(''),'/16901/6601.html','false',[],'','']
	],'',''],
	['PAGE','8401',jdecode('Design+Ideas'),jdecode(''),'/8401.html','true',[],'',''],
	['PAGE','27357',jdecode('Do-It-Yourselfers'),jdecode(''),'/27357.html','true',[],'',''],
	['PAGE','7748',jdecode('About+Us'),jdecode(''),'/7748/index.html','true',[ 
		['PAGE','43067',jdecode('Our+Team'),jdecode(''),'/7748/43067.html','true',[],'','']
	],'',''],
	['PAGE','7685',jdecode('Clearance'),jdecode(''),'/7685.html','true',[],'',''],
	['PAGE','6606',jdecode('Guestbook'),jdecode(''),'/6606.html','true',[],'',''],
	['PAGE','7769',jdecode('Tile+Links'),jdecode(''),'/7769.html','true',[],'',''],
	['PAGE','10501',jdecode('Contact+%2F+map'),jdecode(''),'/10501/index.html','true',[ 
		['PAGE','10522',jdecode('+++Addresses'),jdecode(''),'/10501/10522.html','true',[],'',''],
		['PAGE','12401',jdecode('+++Map'),jdecode(''),'/10501/12401.html','true',[],'','']
	],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='5E5E5E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10448';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='5e5e5e';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Akropolis',
				paletteFamily: 	'5E5E5E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10448',
				contentColor: 	'FFFFFF',
				contentBGColor: '5e5e5e',
				a_color: 		'5E5E5E',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-130146']={
webappId:    '1501',
documentId:  '1401',
internalId:  '130146',
customField: '1501'
};
webappMappings['7005']=webappMappings['7005-102']={
webappId:    '7005',
documentId:  '1401',
internalId:  '102',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-6606AHW050INX2XP']={
webappId:    '1002',
documentId:  '6606',
internalId:  '6606AHW050INX2XP',
customField: 'icq=false'
};
webappMappings['7005']=webappMappings['7005-101']={
webappId:    '7005',
documentId:  '1401',
internalId:  '101',
customField: 'language:en;country:US;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '12401',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['7060']=webappMappings['7060-41cb5498c8431cb302fa507df711fc12']={
webappId:    '7060',
documentId:  '8401',
internalId:  '41cb5498c8431cb302fa507df711fc12',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20100719-195021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6606',
internalId:  '',
customField: '20080413-144717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16901',
internalId:  '',
customField: '20100106-183158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20080727-162208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22622',
internalId:  '',
customField: '20091208-232555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22643',
internalId:  '',
customField: '20080622-000148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22664',
internalId:  '',
customField: '20080601-030453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22685',
internalId:  '',
customField: '20080601-030453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22706',
internalId:  '',
customField: '20080601-034801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22727',
internalId:  '',
customField: '20080601-030453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22748',
internalId:  '',
customField: '20091118-235428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20081222-194235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7748',
internalId:  '',
customField: '20081222-110428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7685',
internalId:  '',
customField: '20100719-201352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20080310-041405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7769',
internalId:  '',
customField: '20091117-210616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20081129-083644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10522',
internalId:  '',
customField: '20081129-083401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12401',
internalId:  '',
customField: '20081129-083457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27357',
internalId:  '',
customField: '20091209-115735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27440',
internalId:  '',
customField: '20081226-194326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33267',
internalId:  '',
customField: '20091118-232502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36567',
internalId:  '',
customField: '20091119-220443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43067',
internalId:  '',
customField: '20100131-215233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43167',
internalId:  '',
customField: '20100131-211247'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INX2XP';
var companyName   = 'Tile+and+Stone+from+around+the+World+to+your+Home';
var htmlTitle	  = 'Tile+Lines%3A+tile+and+stone+from+around+the+world+%26+expert+help+for+Do-It-Yourselfer%27s';
var metaKeywords  = 'tile%3B+tile+dealers%3B+granite%3B+marble%3B+travertine%3B+glass%3B+flooring%3B+backsplash%3B+shower%3B+countertop%3B+ceramic%3B+seattle%3B+tacoma%3B+puget+sound%3B+kent%3B+renton%3B+federal+way%3B+auburn%3Bgranite+tile%3Bgranite+countertops%3Btraverstine%3Btravertine+tile%3Btile+flooring%3Btile+floors%3Btile+backsplash%3Btile+shower%3Bceramic+tile%3Bwashington%3Bhome+depot%3Btile+for+less%3Bglass+tiles%3Bgranite+slabs%3Bheated+flooring%3Bheated+tiles%3Bdeco+tiles%3Btile+murals%3Bmurals%3Bporcelain%3Bporcelain+tile%3Btile+design%3Btile+installation%3Bgrout%3Bthinset%3Btile+repair';
var metaContents  = 'Value+priced+tile++stone+dealer+serving+Kent%2C+Renton+Seattle%2C+Tacoma+and+surrounding+area';
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();
};
