/* [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','11',jdecode('Home'),jdecode(''),'/11.html','true',[],'',''],
	['PAGE','32',jdecode('Mission+Statement'),jdecode(''),'/32.html','true',[],'',''],
	['PAGE','1084',jdecode('Membership+Information'),jdecode(''),'/1084.html','true',[],'',''],
	['PAGE','3263',jdecode('Meeting+Information'),jdecode(''),'/3263.html','true',[],'',''],
	['PAGE','24101',jdecode('2010+Raffle'),jdecode(''),'/24101.html','true',[],'',''],
	['PAGE','59',jdecode('Contact+Us'),jdecode(''),'/59.html','true',[],'',''],
	['PAGE','2396',jdecode('Trail+Work'),jdecode(''),'/2396.html','true',[],'',''],
	['PAGE','36301',jdecode('Trail+Information'),jdecode(''),'/36301.html','true',[],'',''],
	['PAGE','2227',jdecode('Club+News+Letters'),jdecode(''),'/2227/index.html','true',[ 
		['PAGE','41',jdecode('News'),jdecode(''),'/2227/41.html','true',[],'','']
	],'',''],
	['PAGE','3021',jdecode('Snowmobiling+Information'),jdecode(''),'/3021.html','true',[],'',''],
	['PAGE','50',jdecode('Events+Calendar'),jdecode(''),'/50.html','true',[],'',''],
	['PAGE','2548',jdecode('Pictures-'),jdecode(''),'/2548/index.html','true',[ 
		['PAGE','2557',jdecode('Old+Groomer+Pictures'),jdecode(''),'/2548/2557.html','true',[],'',''],
		['PAGE','3965',jdecode('End+of+Season+4%2F22%2F06'),jdecode(''),'/2548/3965.html','true',[],'',''],
		['PAGE','3885',jdecode('Kickoff+Party+9%2F23%2F06'),jdecode(''),'/2548/3885.html','true',[],'',''],
		['PAGE','1490',jdecode('Your+Sled+Pictures'),jdecode(''),'/2548/1490.html','true',[],'',''],
		['PAGE','2648',jdecode('Vintage+Show+Pic%26%23x27%3Bs+2%2F19%2F05'),jdecode(''),'/2548/2648.html','true',[],'','']
	],'',''],
	['PAGE','1093',jdecode('Links+to+other+clubs'),jdecode(''),'/1093.html','true',[],'',''],
	['PAGE','1481',jdecode('Other+Usefull+Links'),jdecode(''),'/1481.html','true',[],'',''],
	['PAGE','1603',jdecode('Guestbook'),jdecode(''),'/1603/index.html','true',[ 
		['PAGE','1602',jdecode('Read+Guestbook'),jdecode(''),'/1603/1602.html','false',[],'','']
	],'',''],
	['PAGE','1140',jdecode('Feedback'),jdecode(''),'/1140/index.html','true',[ 
		['PAGE','1188',jdecode('Feedback+%28follow+up+page%29'),jdecode(''),'/1140/1188.html','false',[],'','']
	],'',''],
	['PAGE','3412',jdecode('Directions%2FMaps'),jdecode(''),'/3412.html','true',[],'',''],
	['PAGE','23701',jdecode('Shop'),jdecode(''),'/23701.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='290';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'290',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '3412',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1084',
internalId:  '',
customField: '20100110-130100'
};
webappMappings['1002']=webappMappings['1002-1603AVEC10IN24BF']={
webappId:    '1002',
documentId:  '1603',
internalId:  '1603AVEC10IN24BF',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-659864']={
webappId:    '1501',
documentId:  '11',
internalId:  '659864',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-14123']={
webappId:    '7008',
documentId:  '1140',
internalId:  '14123',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20061207-025311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20100110-112725'
};
webappMappings['4001']=webappMappings['4001-1720848']={
webappId:    '4001',
documentId:  '23701',
internalId:  '1720848',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-avec10in24bf115497988fa']={
webappId:    '1003',
documentId:  '2396',
internalId:  'avec10in24bf115497988fa',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3263',
internalId:  '',
customField: '20100110-120311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24101',
internalId:  '',
customField: '20100110-125224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59',
internalId:  '',
customField: '20100110-130337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2396',
internalId:  '',
customField: '20070927-190259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36301',
internalId:  '',
customField: '20100110-130530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2227',
internalId:  '',
customField: '20071119-223206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41',
internalId:  '',
customField: '20070909-190930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3021',
internalId:  '',
customField: '20071119-222143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50',
internalId:  '',
customField: '20100110-133029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2548',
internalId:  '',
customField: '20060718-215222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2557',
internalId:  '',
customField: '20060413-194921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3965',
internalId:  '',
customField: '20061009-002732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3885',
internalId:  '',
customField: '20061009-001601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1490',
internalId:  '',
customField: '20060907-215609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2648',
internalId:  '',
customField: '20060413-201102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1093',
internalId:  '',
customField: '20071119-214152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1481',
internalId:  '',
customField: '20071119-223153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1603',
internalId:  '',
customField: '20070927-191025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1602',
internalId:  '',
customField: '20060410-134203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1140',
internalId:  '',
customField: '20060410-161958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1188',
internalId:  '',
customField: '20060410-110337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3412',
internalId:  '',
customField: '20100110-134223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23701',
internalId:  '',
customField: '20061207-003225'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN24BF';
var companyName   = 'Marcellus+Snowmobile+Club';
var htmlTitle	  = 'Marcellus+Snowmobile+Club+Marcellus%2C+NY+13108';
var metaKeywords  = 'Marcellus+Snowmobile+Club%2C+Marcellus%2C+New+York%2C+Snowmobile+Membership%2C+Andrew+Reichel%2C+Central+New+York%2C+Syracuse+snowmobile%2C+NYSSA%2C+snowmobile%2C+Newsletter%2C+Snow+Cam%2C+Groomer%2C+Onondaga+County+Snowmobile+Club%2C+Syracuse+Snowmobile+Club%2C+Maps%2C+Photos%2C+Winter%2C+Sled%2C+Marcellus%2C+Snowmobile';
var metaContents  = 'Official+website+of+the+Marcellus+Snow+Blasters+Snowmobile+Club%2C+Marcellus%2C+New+York%2C+13108.+Here+you+will+find+extensive+information+relating+to+the+Marcellus+Snowmobile+Club%2C+including+membership+information.';
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();
};
