/* [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','2812',jdecode('Home'),jdecode(''),'/2812.html','true',[],''],
	['PAGE','3073',jdecode('Our+Services'),jdecode(''),'/3073/index.html','true',[ 
		['PAGE','19022',jdecode('Shower+Bases'),jdecode(''),'/3073/19022.html','true',[],''],
		['PAGE','32401',jdecode('Safeway+Step'),jdecode(''),'/3073/32401.html','true',[],''],
		['PAGE','19043',jdecode('Wall+Systems'),jdecode(''),'/3073/19043.html','true',[],''],
		['PAGE','19085',jdecode('Shower+Doors'),jdecode(''),'/3073/19085.html','true',[],''],
		['PAGE','19064',jdecode('Accessories'),jdecode(''),'/3073/19064.html','true',[],''],
		['PAGE','35301',jdecode('New+Bath+Tubs'),jdecode(''),'/3073/35301.html','true',[],'']
	],''],
	['PAGE','18601',jdecode('Special+Offers'),jdecode(''),'/18601.html','true',[],''],
	['PAGE','3052',jdecode('Contact+us+'),jdecode(''),'/3052.html','true',[],''],
	['PAGE','3157',jdecode('About+us'),jdecode(''),'/3157/index.html','true',[ 
		['PAGE','3178',jdecode('Our+team'),jdecode(''),'/3157/3178.html','true',[],'']
	],''],
	['PAGE','27601',jdecode('Picture+Gallery+'),jdecode(''),'/27601.html','true',[],''],
	['PAGE','36701',jdecode('New+pics'),jdecode(''),'/36701.html','true',[],'']];
var siteelementCount=14;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='A4A4AC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10451';
theSitetree.contentColor='1d1d20';
theSitetree.contentBGColor='A4A4AC';
var theTemplate={
				name: 			'Akropolis',
				paletteFamily: 	'A4A4AC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10451',
				contentColor: 	'1d1d20',
				contentBGColor: 'A4A4AC',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'A4A4AC',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2812',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3073',
internalId:  '',
customField: '20100319-134843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2812',
internalId:  '',
customField: '20100319-133343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19043',
internalId:  '',
customField: '20100319-162012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35301',
internalId:  '',
customField: '20100319-135208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27601',
internalId:  '',
customField: '20100319-162222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3157',
internalId:  '',
customField: '20080808-113050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3052',
internalId:  '',
customField: '20080808-113022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36701',
internalId:  '',
customField: '20100325-174223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19022',
internalId:  '',
customField: '20080808-112839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20080808-111529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20080808-120210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3178',
internalId:  '',
customField: '20080808-113131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19085',
internalId:  '',
customField: '20080808-122648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19064',
internalId:  '',
customField: '20080723-122506'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INEA16';
var companyName   = 'Mr.+Dino%27s+Baths';
var htmlTitle	  = 'Mr.+Dinos+Baths';
var metaKeywords  = 'acrylic+bathliners%2C+bathtub+liners%2C+showerliners%2C+bathroom+remodeling%2C+shower+doors%2C+bathroom+shower%2C+bathroom+remodel%2C+shower+enclosure%2C+bathroom+renovation%2C+shower+stall%2C+shower+enclosures%2C+bathroom+shower+stalls%2C+shower+repair%2C+bath+tub+liner%2C+shower+walls%2C+corner+showers%2C+acrylic+shower+stalls%2C+bath+tub+liners%2C+acrylic+bathtubs%2C+wall+surround%2C+acrylic+bathtub%2C+tub+liners%2C+curved+shower+curtain+rods%2C+bci+acrylic+bath+systems%2C+shower+liners';
var metaContents  = 'Acrylic+bathliners%2C+showerliners+for+bathroom+remodeling.+Our+acrylic+bathliners+and+showerliners+are+perfect+for+a+bathroom+remodel.+They+are+custom-molded+to+fit+the+existing+bathtub+or+shower.';
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();
};
