/* [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','6301',jdecode('Home'),jdecode(''), jdecode('%2F6301.html'), 'true',[],'',''],
	['PAGE','113879',jdecode('Current+Newsletter'),jdecode(''), jdecode('%2F113879.html'), 'true',[],'',''],
	['PAGE','110279',jdecode('Archived+Newsletter'),jdecode(''), jdecode('%2F110279.html'), 'true',[],'',''],
	['PAGE','6352',jdecode('Lodging%2FAbout+Us'),jdecode(''), jdecode('%2F6352.html'), 'true',[],'',''],
	['PAGE','102779',jdecode('Self-Guided%2FSemi-Guided'),jdecode(''), jdecode('%2F102779.html'), 'true',[],'',''],
	['PAGE','6373',jdecode('Archery+Antelope'),jdecode(''), jdecode('%2F6373.html'), 'true',[],'',''],
	['PAGE','6394',jdecode('Archery+Elk%2FDeer+Combo'),jdecode(''), jdecode('%2F6394.html'), 'true',[],'',''],
	['PAGE','6415',jdecode('Archery+Deer'),jdecode(''), jdecode('%2F6415.html'), 'true',[],'',''],
	['PAGE','6436',jdecode('Rifle+Deer'),jdecode(''), jdecode('%2F6436.html'), 'true',[],'',''],
	['PAGE','6457',jdecode('Rifle+Antelope'),jdecode(''), jdecode('%2F6457.html'), 'true',[],'',''],
	['PAGE','6478',jdecode('Merriam%26%23x27%3Bs+Turkey'),jdecode(''), jdecode('%2F6478.html'), 'true',[],'',''],
	['PAGE','6499',jdecode('Prairie+Dog%2FVarmint'),jdecode(''), jdecode('%2F6499.html'), 'true',[],'',''],
	['PAGE','6520',jdecode('Lion'),jdecode(''), jdecode('%2F6520.html'), 'true',[],'',''],
	['PAGE','6541',jdecode('Bird+hunting+year-round'),jdecode(''), jdecode('%2F6541.html'), 'true',[],'',''],
	['PAGE','103679',jdecode('Family+Trips'),jdecode(''), jdecode('%2F103679.html'), 'true',[],'',''],
	['PAGE','6562',jdecode('Summer+Trips'),jdecode(''), jdecode('%2F6562.html'), 'true',[],'',''],
	['PAGE','18099',jdecode('Photo+Gallery'),jdecode(''), jdecode('%2F18099%2Findex.html'), 'true',[ 
		['PAGE','18120',jdecode('Deer+%26+Elk'),jdecode(''), jdecode('%2F18099%2F18120.html'), 'true',[],'',''],
		['PAGE','18141',jdecode('Antelope+%26+Turkey'),jdecode(''), jdecode('%2F18099%2F18141.html'), 'true',[],'',''],
		['PAGE','18162',jdecode('Lion+%26+Prairie+Dog'),jdecode(''), jdecode('%2F18099%2F18162.html'), 'true',[],'','']
	],'',''],
	['PAGE','39879',jdecode('Testimonials'),jdecode(''), jdecode('%2F39879.html'), 'true',[],'',''],
	['PAGE','6604',jdecode('Contact+Us'),jdecode(''), jdecode('%2F6604.html'), 'true',[],'',''],
	['PAGE','6625',jdecode('Book+a+hunt'),jdecode(''), jdecode('%2F6625.html'), 'true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Deepcolor';
theSitetree.paletteFamily='5583CB';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10349';
theSitetree.graphicsetId='10469';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='154186';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Deepcolor',
				paletteFamily: 	'5583CB',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10349',
				graphicsetId: 	'10469',
				contentColor: 	'000000',
				contentBGColor: '154186',
				a_color: 		'5583CB',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39879',
internalId:  '',
customField: '20110107-205218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20111209-003040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6352',
internalId:  '',
customField: '20110213-153007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6394',
internalId:  '',
customField: '20111209-001152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6373',
internalId:  '',
customField: '20111209-002405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6541',
internalId:  '',
customField: '20110213-153622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6415',
internalId:  '',
customField: '20111209-001433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6436',
internalId:  '',
customField: '20111202-113508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6457',
internalId:  '',
customField: '20111202-112859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6478',
internalId:  '',
customField: '20111202-111117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6499',
internalId:  '',
customField: '20111202-111517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6520',
internalId:  '',
customField: '20111202-111629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6604',
internalId:  '',
customField: '20090410-164639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6625',
internalId:  '',
customField: '20090731-233237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6562',
internalId:  '',
customField: '20110213-153930'
};
webappMappings['7060']=webappMappings['7060-0e3df2e76e19a10e297082c876c0b3b2']={
webappId:    '7060',
documentId:  '18120',
internalId:  '0e3df2e76e19a10e297082c876c0b3b2',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-37249e6a27fea9063dc9b1a69a34d4c2']={
webappId:    '7060',
documentId:  '18141',
internalId:  '37249e6a27fea9063dc9b1a69a34d4c2',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-1471a5c7634d8fe8b20a69ea4e234452']={
webappId:    '7060',
documentId:  '18162',
internalId:  '1471a5c7634d8fe8b20a69ea4e234452',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18099',
internalId:  '',
customField: '20091021-230904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18162',
internalId:  '',
customField: '20091021-231645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18120',
internalId:  '',
customField: '20091021-232219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18141',
internalId:  '',
customField: '20091021-231340'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110279',
internalId:  '',
customField: '20110824-141113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113879',
internalId:  '',
customField: '20111208-234655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102779',
internalId:  '',
customField: '20111209-002138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103679',
internalId:  '',
customField: '20110306-194350'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INL4TF';
var companyName   = 'MUSSELSHELL+OUTFITTERS%2C+LLC';
var htmlTitle	  = 'Musselshell+Outfitters%2C+LLC+';
var metaKeywords  = 'Montana+Private+Land+Hunting%2C+Montana+Archery+Elk+Hunting%2C+Montana+Mule+deer+Hunts%2C+Montana+Merriams+Turkey+Hunt%2C+Montana+Prairie+Dog+Hunting%2C+Montana+Antelope+Hunting%2C+Montana+Archery+Hunting%2C+Montana+Rifle+Hunting%2C+Bull+Mountains%2C+Montana%2C+Roundup%2C+Montana%2C+Montana+Pheasant+Hunting';
var metaContents  = 'Quality+Montana+Private+Land+Hunting+for+Big+Game%2C+Turkey%2C+and+Varmints.';
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();
};

