/* [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','54',jdecode('Home'),jdecode(''),'/54.html','true',[],''],
	['PAGE','75',jdecode('About+us'),jdecode(''),'/75/index.html','true',[ 
		['PAGE','84',jdecode('Our+team'),jdecode(''),'/75/84.html','true',[],'']
	],''],
	['PAGE','4948',jdecode('Online+Store'),jdecode(''),'/4948.html','true',[],''],
	['PAGE','4066',jdecode('After+Hours'),jdecode(''),'/4066.html','true',[],''],
	['PAGE','3513',jdecode('Spa+Folder'),jdecode(''),'/3513.html','true',[],''],
	['PAGE','6507',jdecode('NO+Chemical+Spa+System'),jdecode(''),'/6507.html','true',[],''],
	['PAGE','6601',jdecode('Extended+Warranty'),jdecode(''),'/6601.html','true',[],''],
	['PAGE','93',jdecode('Services'),jdecode(''),'/93/index.html','true',[ 
		['PAGE','4057',jdecode('General+Repair+Service'),jdecode(''),'/93/4057.html','true',[],''],
		['PAGE','120',jdecode('Maintenance+Program'),jdecode(''),'/93/120.html','true',[],''],
		['PAGE','6317',jdecode('Drain%2C+Clean+%26+Refill+Service'),jdecode(''),'/93/6317.html','true',[],''],
		['PAGE','111',jdecode('Winterizing+Program'),jdecode(''),'/93/111.html','true',[],''],
		['PAGE','102',jdecode('Signature+Spa+Service'),jdecode(''),'/93/102.html','true',[],'']
	],''],
	['PAGE','6138',jdecode('Forms'),jdecode(''),'/6138.html','true',[],''],
	['PAGE','2712',jdecode('Owner%26%23x27%3Bs+Manuals+'),jdecode(''),'/2712/index.html','true',[ 
		['PAGE','2721',jdecode('Jacuzzi+Manuals'),jdecode(''),'/2712/2721.html','true',[],''],
		['PAGE','2757',jdecode('Viking+Manual'),jdecode(''),'/2712/2757.html','true',[],''],
		['PAGE','2739',jdecode('Resort+Spa+Manual'),jdecode(''),'/2712/2739.html','true',[],''],
		['PAGE','2730',jdecode('Vita%2FReflections+Manuals'),jdecode(''),'/2712/2730.html','true',[],''],
		['PAGE','2748',jdecode('DreamMaker+Manual'),jdecode(''),'/2712/2748.html','true',[],'']
	],''],
	['PAGE','129',jdecode('Tips+%26+Tricks'),jdecode(''),'/129/index.html','true',[ 
		['PAGE','3132',jdecode('How+to+Fill+a+Spa'),jdecode(''),'/129/3132.html','true',[],''],
		['PAGE','2592',jdecode('Error+Codes'),jdecode(''),'/129/2592.html','true',[],''],
		['PAGE','3921',jdecode('Heating+Issues'),jdecode(''),'/129/3921.html','true',[],''],
		['PAGE','2601',jdecode('Water+Chemistry+'),jdecode(''),'/129/2601.html','true',[],''],
		['PAGE','3360',jdecode('Diverter+Cleaning'),jdecode(''),'/129/3360.html','true',[],''],
		['PAGE','3369',jdecode('Air+Control+Repair'),jdecode(''),'/129/3369.html','true',[],''],
		['PAGE','3843',jdecode('Stereo+Issues'),jdecode(''),'/129/3843.html','true',[],'']
	],''],
	['PAGE','138',jdecode('Prices'),jdecode(''),'/138.html','true',[],''],
	['PAGE','14401',jdecode('Policies'),jdecode(''),'/14401.html','true',[],''],
	['PAGE','147',jdecode('Contact'),jdecode(''),'/147.html','true',[],''],
	['PAGE','183',jdecode('Jobs'),jdecode(''),'/183.html','true',[],''],
	['PAGE','174',jdecode('News'),jdecode(''),'/174.html','true',[],''],
	['PAGE','1212',jdecode('Guestbook'),jdecode(''),'/1212/index.html','true',[ 
		['PAGE','1211',jdecode('Read+Guestbook'),jdecode(''),'/1212/1211.html','false',[],'']
	],'']];
var siteelementCount=36;
theSitetree.topTemplateName='Weekend';
theSitetree.paletteFamily='DCC764';
theSitetree.keyvisualId='4056';
theSitetree.keyvisualName='kv_4056.jpg';
theSitetree.fontsetId='10532';
theSitetree.graphicsetId='11149';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='B6B6B5';
var theTemplate={
				name: 			'Weekend',
				paletteFamily: 	'DCC764',
				keyvisualId: 	'4056',
				keyvisualName: 	'kv_4056.jpg',
				fontsetId: 		'10532',
				graphicsetId: 	'11149',
				contentColor: 	'000000',
				contentBGColor: 'B6B6B5',
				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: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '54',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1521912']={
webappId:    '1501',
documentId:  '54',
internalId:  '1521912',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93',
internalId:  '',
customField: '20080126-195054'
};
webappMappings['1002']=webappMappings['1002-1212AHW050IN350T']={
webappId:    '1002',
documentId:  '1212',
internalId:  '1212AHW050IN350T',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54',
internalId:  '',
customField: '20080916-161440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138',
internalId:  '',
customField: '20071024-032219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147',
internalId:  '',
customField: '20080910-161201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183',
internalId:  '',
customField: '20080910-161612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '174',
internalId:  '',
customField: '20080406-203416'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050IN350T';
var companyName   = 'Signature+Spa+Service+Inc.';
var htmlTitle	  = 'Signature+Spa+Service+Inc.';
var metaKeywords  = 'spa%2C+service%2C++repair%2C++spa%2C+winterizing%2C++spa%2C+Maintenance%2C+spa+parts';
var metaContents  = 'Spa+Service+Department+Located+in+Farmingville%2C+NY.+Serving+all+Long+Island%2C+and+NYC+5+Bororughs.+Specializing+in+Electronic+and+Plumbing+repairs+on+most+makes%2Fmodels+of+Hot+Tubs.+We+also+offer+Winterizing+and+Maintenance+Services.';
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();
};
