/* [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','5601',jdecode('Home'),jdecode(''), jdecode('%2F5601.html'), 'true',[],'',''],
	['PAGE','5778',jdecode('Fishing%2FHunting'),jdecode(''), jdecode('%2F5778.html'), 'true',[],'',''],
	['PAGE','5652',jdecode('Location%2FRegion'),jdecode(''), jdecode('%2F5652.html'), 'true',[],'',''],
	['PAGE','5715',jdecode('Dine+In%2FTake+Out'),jdecode(''), jdecode('%2F5715.html'), 'true',[],'',''],
	['PAGE','5673',jdecode('Celebrating+Family'),jdecode(''), jdecode('%2F5673.html'), 'true',[],'',''],
	['PAGE','5736',jdecode('Good+Times'),jdecode(''), jdecode('%2F5736.html'), 'true',[],'',''],
	['PAGE','5757',jdecode('Convenience+Store'),jdecode(''), jdecode('%2F5757.html'), 'true',[],'',''],
	['PAGE','5694',jdecode('About+Us'),jdecode(''), jdecode('%2F5694.html'), 'true',[],'',''],
	['PAGE','5799',jdecode('Contact+Us%2FLinks'),jdecode(''), jdecode('%2F5799.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Applicant';
theSitetree.paletteFamily='EEBE79';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='26574';
theSitetree.graphicsetId='13381';
theSitetree.contentColor='835e29';
theSitetree.contentBGColor='fce7ca';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRNC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Applicant',
				paletteFamily: 	'EEBE79',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'26574',
				graphicsetId: 	'13381',
				contentColor: 	'835e29',
				contentBGColor: 'fce7ca',
				a_color: 		'EEBE79',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5778',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5601',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20110315-132824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5652',
internalId:  '',
customField: '20101017-191854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5673',
internalId:  '',
customField: '20101017-192425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5694',
internalId:  '',
customField: '20100302-173037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5715',
internalId:  '',
customField: '20100302-173341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5736',
internalId:  '',
customField: '20090309-163621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5757',
internalId:  '',
customField: '20090126-164608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5778',
internalId:  '',
customField: '20100302-170623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5799',
internalId:  '',
customField: '20101017-201840'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5652',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5715',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5673',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5736',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5757',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5694',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5799',
internalId:  '',
customField: 'language:en;country:US;'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INEV45';
var companyName   = 'LAKEVIEW+Resort+at+Lake+Poinsett';
var htmlTitle	  = 'Your+place+at+the+lake+for+fun%2C+food%2C+spirits%2C+and+supplies+for+making+good+times+memories.';
var metaKeywords  = 'lakeview%2C+lakeview+resort%2C+lake+poinsett%2C+south+dakota%2C+restaurant%2C+lake%2C+lakeside%2C+arlington%2C+fish%2C+campfires%2C+boating%2C+hunting%2C+family+fun%2C+refuge%2C+fishing%2C+ice+fishing%2C+bait+and+tackle%2C+fishing+gear%2C+cold+beer%2C+gas%2C+steaks%2C+broasted+chicken%2C+onion+rings%2C+breakfast%2C+lunch%2C+supper';
var metaContents  = 'LAKEVIEW+Resort+on+Lake+Poinsett%2C+Eastern+South+Dakota%2C+Your+place+at+the+Lake+for+fun%2C+good+food%2C+bait+%26+tackle%2C+lakeside+convenience.+Open+year-round+with+breakfast%2C+lunch+%26+dinner+menus-+7+days%2Fweek.';
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();
};

