/* [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','5101',jdecode('Home'),jdecode(''),'/5101.html','true',[],''],
	['PAGE','40634',jdecode('SPECIALS%21%21%21'),jdecode(''),'/40634.html','true',[],''],
	['PAGE','7229',jdecode('News+%26+Events'),jdecode(''),'/7229.html','true',[],''],
	['PAGE','7250',jdecode('The+Lodge'),jdecode(''),'/7250/index.html','true',[ 
		['PAGE','7271',jdecode('Living+%26+Dining'),jdecode(''),'/7250/7271.html','true',[],''],
		['PAGE','16021',jdecode('Kitchen+%26+Dining'),jdecode(''),'/7250/16021.html','true',[],''],
		['PAGE','18477',jdecode('Meal+Package'),jdecode(''),'/7250/18477.html','true',[],''],
		['PAGE','16042',jdecode('Bedrooms'),jdecode(''),'/7250/16042.html','true',[],''],
		['PAGE','21947',jdecode('Bathrooms'),jdecode(''),'/7250/21947.html','true',[],''],
		['PAGE','7292',jdecode('Fun+Activities'),jdecode(''),'/7250/7292.html','true',[],''],
		['PAGE','7313',jdecode('Make+Reservations'),jdecode(''),'/7250/7313.html','true',[],'']
	],''],
	['PAGE','16121',jdecode('Hunting+Lands'),jdecode(''),'/16121/index.html','true',[ 
		['PAGE','23147',jdecode('Fields+%26+Prairie'),jdecode(''),'/16121/23147.html','true',[],''],
		['PAGE','23168',jdecode('Woodlands'),jdecode(''),'/16121/23168.html','true',[],''],
		['PAGE','23189',jdecode('Cliffs+%26+Rocks'),jdecode(''),'/16121/23189.html','true',[],''],
		['PAGE','23210',jdecode('Ponds+%26+Wetlands'),jdecode(''),'/16121/23210.html','true',[],''],
		['PAGE','23231',jdecode('Stands+%26+Blinds'),jdecode(''),'/16121/23231.html','true',[],''],
		['PAGE','7439',jdecode('Book+an+Adventure'),jdecode(''),'/16121/7439.html','true',[],'']
	],''],
	['PAGE','7334',jdecode('Bird+Hunting'),jdecode(''),'/7334/index.html','true',[ 
		['PAGE','7355',jdecode('Dove+%26+Quail'),jdecode(''),'/7334/7355.html','true',[],''],
		['PAGE','12823',jdecode('Ducks+%26+Geese'),jdecode(''),'/7334/12823.html','true',[],''],
		['PAGE','12844',jdecode('Turkey'),jdecode(''),'/7334/12844.html','true',[],''],
		['PAGE','7418',jdecode('Bird+Hunt+Pricing'),jdecode(''),'/7334/7418.html','true',[],'']
	],''],
	['PAGE','23252',jdecode('Wildlife+Hunting'),jdecode(''),'/23252/index.html','true',[ 
		['PAGE','7376',jdecode('White-tailed+Deer'),jdecode(''),'/23252/7376.html','true',[],''],
		['PAGE','7397',jdecode('Feral+Hog'),jdecode(''),'/23252/7397.html','true',[],''],
		['PAGE','23273',jdecode('Predators'),jdecode(''),'/23252/23273.html','true',[],''],
		['PAGE','23294',jdecode('Varmints'),jdecode(''),'/23252/23294.html','true',[],''],
		['PAGE','34434',jdecode('Exotics'),jdecode(''),'/23252/34434.html','true',[],''],
		['PAGE','11023',jdecode('Native%26%23x27%3Bs+Pricing'),jdecode(''),'/23252/11023.html','true',[],''],
		['PAGE','34455',jdecode('Exotics%26%23x27%3B+Pricing'),jdecode(''),'/23252/34455.html','true',[],'']
	],''],
	['PAGE','37934',jdecode('Testimonials'),jdecode(''),'/37934.html','true',[],''],
	['PAGE','42034',jdecode('More+Testimonials'),jdecode(''),'/42034.html','true',[],''],
	['PAGE','41834',jdecode('Guest+Book'),jdecode(''),'/41834.html','true',[],''],
	['PAGE','7481',jdecode('Contact+Us'),jdecode(''),'/7481.html','true',[],''],
	['PAGE','7460',jdecode('Map+%2F+Directions'),jdecode(''),'/7460.html','true',[],''],
	['PAGE','8250',jdecode('FAQs'),jdecode(''),'/8250.html','true',[],'']];
var siteelementCount=37;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='BB9C60';
theSitetree.keyvisualId='2224';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='364';
theSitetree.graphicsetId='417';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='BB9C60';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Enjoy',
				paletteFamily: 	'BB9C60',
				keyvisualId: 	'2224',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'364',
				graphicsetId: 	'417',
				contentColor: 	'000000',
				contentBGColor: 'BB9C60',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'BB9C60',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20091211-114529'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5101',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-20241']={
webappId:    '7008',
documentId:  '7313',
internalId:  '20241',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-20242']={
webappId:    '7008',
documentId:  '7439',
internalId:  '20242',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-20243']={
webappId:    '7008',
documentId:  '7481',
internalId:  '20243',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7460',
internalId:  '',
customField: '20090913-142921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7229',
internalId:  '',
customField: '20091211-114909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7334',
internalId:  '',
customField: '20090915-163636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7355',
internalId:  '',
customField: '20090901-160450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8250',
internalId:  '',
customField: '20091007-102533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7250',
internalId:  '',
customField: '20090908-112015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7271',
internalId:  '',
customField: '20090904-150750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7292',
internalId:  '',
customField: '20090911-142440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7313',
internalId:  '',
customField: '20090902-154505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12823',
internalId:  '',
customField: '20091204-164117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7376',
internalId:  '',
customField: '20090913-162349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7397',
internalId:  '',
customField: '20090901-170445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7418',
internalId:  '',
customField: '20090917-144539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7439',
internalId:  '',
customField: '20090902-154013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7481',
internalId:  '',
customField: '20090902-154120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11023',
internalId:  '',
customField: '20091211-115225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12844',
internalId:  '',
customField: '20090913-151537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16021',
internalId:  '',
customField: '20090904-155232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16042',
internalId:  '',
customField: '20090908-111557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18477',
internalId:  '',
customField: '20091007-101701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16121',
internalId:  '',
customField: '20090928-091040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21947',
internalId:  '',
customField: '20090928-093440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23252',
internalId:  '',
customField: '20091030-110630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23147',
internalId:  '',
customField: '20090921-091851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23168',
internalId:  '',
customField: '20090917-150934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23189',
internalId:  '',
customField: '20090916-171227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23210',
internalId:  '',
customField: '20090916-163315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23231',
internalId:  '',
customField: '20090916-175724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23273',
internalId:  '',
customField: '20090913-155305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23294',
internalId:  '',
customField: '20090913-154926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34434',
internalId:  '',
customField: '20091007-100820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34455',
internalId:  '',
customField: '20091007-095319'
};
webappMappings['1002']=webappMappings['1002-41834aendu0in3lrc']={
webappId:    '1002',
documentId:  '41834',
internalId:  '41834aendu0in3lrc',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37934',
internalId:  '',
customField: '20100122-124238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40634',
internalId:  '',
customField: '20100107-110141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41834',
internalId:  '',
customField: '20100122-124506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42034',
internalId:  '',
customField: '20100122-125359'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN3LRC';
var companyName   = 'Bucks+%26+Ducks+Hunting+Lodge';
var htmlTitle	  = 'Ronnie+and+Gloria+Ogle%27s+Bucks+%26+Ducks+Hunting+Lodge+near+Bellevue%2C+Texas';
var metaKeywords  = 'hunting%2C+Texas+hunting%2C+deer+hunting%2C+turkey+hunting%2C+quail+hunting%2C+duck+hunting%2C+dove+hunting%2C+exotic+hunting%2C+Horton+and+Horton+Ranch%2C+Bellevue%2C+Texas+hunting+lodge%2C+Bucks+and+Ducks+Lodge%2C+Bucks+and+Ducks+Wildlife+Lodge%2C+Bucks+and+Ducks+Hunting+Lodge%2C+Henrietta%2C+Texas%2C+North+Texas+hunting%2C+Ronnie+Ogle%2C+Ronnie+and+Gloria+Ogle%2C+DFW+getaway%2C+Texas+bed+and+breakfast+inn';
var metaContents  = 'Bucks+and+Ducks+Hunting+Lodge+located+an+hour+northwest+of+the+Dallas-Fort+Worth+Metroplex%2C+has+over+14%2C000+private+acres+of+some+of+the+best+hunting+land+in+Texas.++Come+for+the+day+-+or+stay+for+the+week+-+in+our+beautiful+lodge+between+Bellevue+and+Henrietta%2C+Texas.';
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();
};
