/* [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','1801',jdecode('Home'),jdecode(''),'/1801.html','true',[],''],
	['PAGE','1894',jdecode('View+the+cottage'),jdecode(''),'/1894.html','true',[],''],
	['PAGE','37401',jdecode('Additional+Apartment'),jdecode(''),'/37401.html','true',[],''],
	['PAGE','1873',jdecode('+Fishermen'),jdecode(''),'/1873.html','true',[],''],
	['PAGE','33901',jdecode('Having+fun%21'),jdecode(''),'/33901.html','true',[],''],
	['PAGE','25401',jdecode('Weather-Tides-Links'),jdecode(''),'/25401.html','true',[],''],
	['PAGE','24001',jdecode('Price+and+service'),jdecode(''),'/24001.html','true',[],''],
	['PAGE','33401',jdecode('About+us'),jdecode(''),'/33401.html','true',[],''],
	['PAGE','1936',jdecode('Contact'),jdecode(''),'/1936.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Easylife';
theSitetree.paletteFamily='AD1D1D';
theSitetree.keyvisualId='5812';
theSitetree.keyvisualName='kv_5812.jpg';
theSitetree.fontsetId='11095';
theSitetree.graphicsetId='11868';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Easylife',
				paletteFamily: 	'AD1D1D',
				keyvisualId: 	'5812',
				keyvisualName: 	'kv_5812.jpg',
				fontsetId: 		'11095',
				graphicsetId: 	'11868',
				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:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20100215-172325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33401',
internalId:  '',
customField: '20090629-115824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20090629-120347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20100110-183636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24001',
internalId:  '',
customField: '20100215-171846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1936',
internalId:  '',
customField: '20100215-172427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20100308-085317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20100120-190147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37401',
internalId:  '',
customField: '20100215-171732'
};
var canonHostname = 'cm4all.aplus.net';
var accountId     = 'APL330INZ53B';
var companyName   = 'Jo%E2%80%99s++Delta+Cottage++++++Catering+to+those+who+love+the+water%2C+water+sports+and+fishing%21%21%21';
var htmlTitle	  = 'Where+to+stay+on+your+weekend+getaway%2C+cabin+lodging+on+CA+Delta+near+Bethel+Island%2CVacation%2C+fishing%2CLodging+on+CA+Delta+near+Bethel+Island%2C+fishing+tournaments%2C+bass%2C+stripers%2C+fishing+tournaments%2C+bass%2C+stripers';
var metaKeywords  = 'where+to+stay%2Cweekend+getaway%2CCabin%2CLodging%2Caccomodations%2Chotel%2Cmotel%2CCalifornia+delta%2Cfish%2CSandmound+Slough%2Cbass+tournament%2CBethel+Island%2COakley%2CBrentwood%2CAntioch%2CAnglers+Choice%2CWestern+Bass%2CRussos+marina%2CHook+line+and+Sinker%2CStriper%2CSturgeon%2Cwater+sports%2Cwater+vacation%2CCuccia%2CBoby+Barrack';
var metaContents  = 'Where+to+stay+for+a+weekend++getaway+on+the+California+Delta.+cabin+lodging%2Cqueen+bed+or+two+twins%2Fqueen+combo%2C+bath%2C+kitchenette%2C+Covered+patio+and+berth+provide+a+relaxing+space.+Sandmound+Slough%2C+monster+bass%2C+Franks+Tract%2Cstripers%2Csturgeon%2Clargemouth+bass%2C+tournament+fisherman%2C+We+have+parking+with+electrical%2C++Fish%2C+swim%2C+vacation+rental%2CFranks+Tract%2C+Bethel+Island%2C+Oakley';
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();
};
