/* [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','80323',jdecode('Introduction+to+Seattle'),jdecode(''),'/80323.html','true',[],''],
	['PAGE','4654',jdecode('Places+to+visit+'),jdecode(''),'/4654.html','true',[],''],
	['PAGE','2443',jdecode('About+Us'),jdecode(''),'/2443.html','true',[],''],
	['PAGE','56312',jdecode('_________WATERFRONT+%231_________'),jdecode(''),'/56312/index.html','true',[ 
		['PAGE','56712',jdecode('Photo+Gallery+%28%231%29'),jdecode(''),'/56312/56712.html','true',[],''],
		['PAGE','56912',jdecode('Amenities+%28%231%29'),jdecode(''),'/56312/56912.html','true',[],''],
		['PAGE','56933',jdecode('Rates+%26+Reservation+%28%231%29'),jdecode(''),'/56312/56933.html','true',[],'']
	],''],
	['PAGE','83623',jdecode('_________WATERFRONT+%232_________'),jdecode(''),'/83623/index.html','true',[ 
		['PAGE','17412',jdecode('Photo+Gallery+%28%232%29'),jdecode(''),'/83623/17412.html','true',[],''],
		['PAGE','10012',jdecode('Amenities+%28%232%29'),jdecode(''),'/83623/10012.html','true',[],''],
		['PAGE','4633',jdecode('Rates+%26+Reservation+%28%232%29'),jdecode(''),'/83623/4633.html','true',[],'']
	],''],
	['PAGE','105123',jdecode('____________HOME+%233______________+'),jdecode(''),'/105123/index.html','true',[ 
		['PAGE','105323',jdecode('Photo+Gallery+%28%233%29'),jdecode(''),'/105123/105323.html','true',[],''],
		['PAGE','105344',jdecode('Amenities+%28%233%29'),jdecode(''),'/105123/105344.html','true',[],''],
		['PAGE','105386',jdecode('+Rates+%26+Reservation+%28%233%29'),jdecode(''),'/105123/105386.html','true',[],'']
	],''],
	['PAGE','105428',jdecode('____________HOME+%234______________'),jdecode(''),'/105428/index.html','true',[ 
		['PAGE','105449',jdecode('Photo+Gallery+%28%234%29'),jdecode(''),'/105428/105449.html','true',[],''],
		['PAGE','105470',jdecode('Amenities+%28%234%29'),jdecode(''),'/105428/105470.html','true',[],''],
		['PAGE','105512',jdecode('Rates+%26++Reservation+%28%234%29'),jdecode(''),'/105428/105512.html','true',[],'']
	],''],
	['PAGE','113737',jdecode('____________HOME+%235_________________'),jdecode(''),'/113737/index.html','false',[ 
		['PAGE','113758',jdecode('Photo+Gallery+%28%235%29'),jdecode(''),'/113737/113758.html','true',[],''],
		['PAGE','113779',jdecode('Amenities+%28%235%29'),jdecode(''),'/113737/113779.html','true',[],''],
		['PAGE','113800',jdecode('Rates+%26+Reservation+%28%235%29'),jdecode(''),'/113737/113800.html','true',[],'']
	],''],
	['PAGE','16312',jdecode('Yacht+Charter'),jdecode(''),'/16312.html','true',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Case';
theSitetree.paletteFamily='10224E';
theSitetree.keyvisualId='11061';
theSitetree.keyvisualName='kv_11061.jpg';
theSitetree.fontsetId='31939';
theSitetree.graphicsetId='13780';
theSitetree.contentColor='707683';
theSitetree.contentBGColor='F6FBFE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Case',
				paletteFamily: 	'10224E',
				keyvisualId: 	'11061',
				keyvisualName: 	'kv_11061.jpg',
				fontsetId: 		'31939',
				graphicsetId: 	'13780',
				contentColor: 	'707683',
				contentBGColor: 'F6FBFE',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83623',
internalId:  '',
customField: '20100623-005508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113800',
internalId:  '',
customField: '20100312-220030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113737',
internalId:  '',
customField: '20100312-164435'
};
webappMappings['7060']=webappMappings['7060-10bbbd0e86edaceea7d9a92436fd9f34']={
webappId:    '7060',
documentId:  '17412',
internalId:  '10bbbd0e86edaceea7d9a92436fd9f34',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2443',
internalId:  '',
customField: '20100320-114645'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '80323',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17412',
internalId:  '',
customField: '20080723-210353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4633',
internalId:  '',
customField: '20100320-115112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4654',
internalId:  '',
customField: '20081124-023112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10012',
internalId:  '',
customField: '20100327-202614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16312',
internalId:  '',
customField: '20100320-115600'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '80323',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56312',
internalId:  '',
customField: '20100408-230208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56712',
internalId:  '',
customField: '20081024-203919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56912',
internalId:  '',
customField: '20100408-230500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56933',
internalId:  '',
customField: '20100320-114914'
};
webappMappings['7060']=webappMappings['7060-ddf696a7fa9a6d7d8d2b0ad679702a09']={
webappId:    '7060',
documentId:  '56712',
internalId:  'ddf696a7fa9a6d7d8d2b0ad679702a09',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80323',
internalId:  '',
customField: '20100320-114526'
};
webappMappings['1501']=webappMappings['1501-13352887']={
webappId:    '1501',
documentId:  '80323',
internalId:  '13352887',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105323',
internalId:  '',
customField: '20100311-201841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105123',
internalId:  '',
customField: '20100320-114351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105344',
internalId:  '',
customField: '20100320-115206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113779',
internalId:  '',
customField: '20100312-220151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105386',
internalId:  '',
customField: '20100320-115310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105428',
internalId:  '',
customField: '20100418-122620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105449',
internalId:  '',
customField: '20100311-214415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105470',
internalId:  '',
customField: '20100320-115411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113758',
internalId:  '',
customField: '20100312-222948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105512',
internalId:  '',
customField: '20100320-115505'
};
webappMappings['7060']=webappMappings['7060-e9e06846097cf2b8c6461fcaafeb1857']={
webappId:    '7060',
documentId:  '105323',
internalId:  'e9e06846097cf2b8c6461fcaafeb1857',
customField: 'language:en;country:US;'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2PC6';
var companyName   = '';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};
