/* [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','5001',jdecode('Home'),jdecode(''), jdecode('%2F5001.html'), 'true',[],'',''],
	['PAGE','5052',jdecode('Camping'),jdecode(''), jdecode('%2F5052.html'), 'true',[],'',''],
	['PAGE','34201',jdecode('Cabins'),jdecode(''), jdecode('%2F34201.html'), 'true',[],'',''],
	['PAGE','27501',jdecode('Park+and+Lake+Maps'),jdecode(''), jdecode('%2F27501.html'), 'true',[],'',''],
	['PAGE','5073',jdecode('Activities+and+Events'),jdecode(''), jdecode('%2F5073.html'), 'true',[],'',''],
	['PAGE','38101',jdecode('Tournaments'),jdecode(''), jdecode('%2F38101.html'), 'true',[],'',''],
	['PAGE','5178',jdecode('Rates'),jdecode(''), jdecode('%2F5178.html'), 'true',[],'',''],
	['PAGE','25501',jdecode('Rules'),jdecode(''), jdecode('%2F25501.html'), 'true',[],'',''],
	['PAGE','28501',jdecode('The+Park+Today'),jdecode(''), jdecode('%2F28501.html'), 'true',[],'',''],
	['PAGE','25522',jdecode('Guest+Book'),jdecode(''), jdecode('%2F25522.html'), 'true',[],'',''],
	['PAGE','25543',jdecode('Park+Pictures'),jdecode(''), jdecode('%2F25543.html'), 'true',[],'',''],
	['PAGE','30801',jdecode('July+4th+Celebration+2012'),jdecode(''), jdecode('%2F30801.html'), 'true',[],'',''],
	['PAGE','5199',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F5199.html'), 'true',[],'',''],
	['PAGE','30301',jdecode('Parke+County+Events'),jdecode(''), jdecode('%2F30301.html'), 'true',[],'',''],
	['PAGE','5220',jdecode('Links'),jdecode(''), jdecode('%2F5220.html'), 'true',[],'',''],
	['PAGE','5241',jdecode('Contact'),jdecode(''), jdecode('%2F5241.html'), 'true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Undulate';
theSitetree.paletteFamily='EED2B6';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33116';
theSitetree.graphicsetId='14065';
theSitetree.contentColor='312A24';
theSitetree.contentBGColor='EED2B6';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Undulate',
				paletteFamily: 	'EED2B6',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33116',
				graphicsetId: 	'14065',
				contentColor: 	'312A24',
				contentBGColor: 'EED2B6',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20110513-133406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5052',
internalId:  '',
customField: '20091228-154039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25543',
internalId:  '',
customField: '20090509-130220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5073',
internalId:  '',
customField: '20110513-133034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5178',
internalId:  '',
customField: '20110119-103553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5241',
internalId:  '',
customField: '20090514-123006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5199',
internalId:  '',
customField: '20090619-155855'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-4f2c1995bb0649d9fd8361bff8394b65']={
webappId:    '7060',
documentId:  '25543',
internalId:  '4f2c1995bb0649d9fd8361bff8394b65',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-25522avfl30inhjg9']={
webappId:    '1002',
documentId:  '25522',
internalId:  '25522avfl30inhjg9',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5220',
internalId:  '',
customField: '20100507-092248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25501',
internalId:  '',
customField: '20090509-130407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25522',
internalId:  '',
customField: '20090512-080557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27501',
internalId:  '',
customField: '20100409-080033'
};
webappMappings['7050']=webappMappings['7050-1878']={
webappId:    '7050',
documentId:  '28501',
internalId:  '1878',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28501',
internalId:  '',
customField: '20090528-130254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30301',
internalId:  '',
customField: '20110119-103038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30801',
internalId:  '',
customField: '20110119-104837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20110513-133314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38101',
internalId:  '',
customField: '20110208-093655'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHJG9';
var companyName   = 'ROCKVILLE+LAKE+PARK';
var htmlTitle	  = 'Rockville+Lake+Park+Campground';
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();
};

