/* [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','20034',jdecode('Home'),jdecode(''),'/20034.html','true',[],''],
	['PAGE','20106',jdecode('Fudge'),jdecode(''),'/20106/index.html','true',[ 
		['PAGE','20127',jdecode('Fudge+Flavors'),jdecode(''),'/20106/20127.html','true',[],''],
		['PAGE','20148',jdecode('Sucrose+Free+Fudge'),jdecode(''),'/20106/20148.html','true',[],''],
		['PAGE','20169',jdecode('Wholesale+Fudge'),jdecode(''),'/20106/20169.html','true',[],''],
		['PAGE','20190',jdecode('Fundraising+with+fudge'),jdecode(''),'/20106/20190.html','true',[],'']
	],''],
	['PAGE','190234',jdecode('Candy+Bouquet'),jdecode(''),'/190234.html','false',[],''],
	['PAGE','20085',jdecode('Our+Retail+Store'),jdecode(''),'/20085/index.html','true',[ 
		['PAGE','167334',jdecode('Geloto'),jdecode(''),'/20085/167334.html','true',[],'']
	],''],
	['PAGE','167355',jdecode('Store+Menu'),jdecode(''),'/167355/index.html','false',[ 
		['PAGE','167376',jdecode('Hot+Beverages+Menu'),jdecode(''),'/167355/167376.html','true',[],''],
		['PAGE','167397',jdecode('Saskatoon+pie+%26+Crepes'),jdecode(''),'/167355/167397.html','true',[],''],
		['PAGE','167418',jdecode('Cinnamon+Buns'),jdecode(''),'/167355/167418.html','true',[],''],
		['PAGE','167439',jdecode('Soft+Ice+Cream'),jdecode(''),'/167355/167439.html','true',[],''],
		['PAGE','167460',jdecode('Frozen+in+paradise'),jdecode(''),'/167355/167460.html','true',[],'']
	],''],
	['PAGE','20211',jdecode('Craft+%26+Trade+Shows'),jdecode(''),'/20211.html','true',[],''],
	['PAGE','176534',jdecode('Photo+Gallery'),jdecode(''),'/176534/index.html','true',[ 
		['PAGE','176034',jdecode('Central+Butte+School+visits+'),jdecode(''),'/176534/176034.html','true',[],''],
		['PAGE','176234',jdecode('Sent+in+Photos+'),jdecode(''),'/176534/176234.html','true',[],''],
		['PAGE','180834',jdecode('Edmonton+giftshow'),jdecode(''),'/176534/180834.html','true',[],'']
	],''],
	['PAGE','117239',jdecode('Guestbook'),jdecode(''),'/117239/index.html','true',[ 
		['PAGE','117234',jdecode('Read+Guestbook'),jdecode(''),'/117239/117234.html','true',[],'']
	],''],
	['PAGE','20232',jdecode('Contact+Us'),jdecode(''),'/20232.html','true',[],''],
	['PAGE','166534',jdecode('Driving+directions'),jdecode(''),'/166534.html','true',[],''],
	['PAGE','178234',jdecode('Find++A+Retailer+Near+You'),jdecode(''),'/178234.html','false',[],''],
	['PAGE','176834',jdecode('whole+sale+login'),jdecode(''),'/176834.html','false',[],'']];
var siteelementCount=26;
theSitetree.topTemplateName='Kingston';
theSitetree.paletteFamily='7F0B0B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11146';
theSitetree.graphicsetId='11952';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='EFD066';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Kingston',
				paletteFamily: 	'7F0B0B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11146',
				graphicsetId: 	'11952',
				contentColor: 	'000000',
				contentBGColor: 'EFD066',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-117239abri10inen1m']={
webappId:    '1002',
documentId:  '117239',
internalId:  '117239abri10inen1m',
customField: 'icq=false'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '166534',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['7060']=webappMappings['7060-7256d65a2696880cfb215ec94e7585d2']={
webappId:    '7060',
documentId:  '176034',
internalId:  '7256d65a2696880cfb215ec94e7585d2',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-956a100815ebde79fba66a15f6d1ca88']={
webappId:    '7060',
documentId:  '176234',
internalId:  '956a100815ebde79fba66a15f6d1ca88',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-b867d3c06f0ee23fabd68501e457493e']={
webappId:    '7060',
documentId:  '180834',
internalId:  'b867d3c06f0ee23fabd68501e457493e',
customField: 'language:en;country:US;'
};
webappMappings['4001']=webappMappings['4001-18032773']={
webappId:    '4001',
documentId:  '190234',
internalId:  '18032773',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20034',
internalId:  '',
customField: '20100113-113453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20106',
internalId:  '',
customField: '20090204-152744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20127',
internalId:  '',
customField: '20070208-043429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20148',
internalId:  '',
customField: '20080227-224401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20169',
internalId:  '',
customField: '20090204-204459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20190',
internalId:  '',
customField: '20080227-231300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190234',
internalId:  '',
customField: '20090204-153137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20085',
internalId:  '',
customField: '20090122-001413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167334',
internalId:  '',
customField: '20090122-001555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167355',
internalId:  '',
customField: '20070215-014433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167376',
internalId:  '',
customField: '20070215-013328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167397',
internalId:  '',
customField: '20070215-004742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167418',
internalId:  '',
customField: '20070215-005013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167439',
internalId:  '',
customField: '20070215-005214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167460',
internalId:  '',
customField: '20070215-005434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20211',
internalId:  '',
customField: '20100113-113945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176534',
internalId:  '',
customField: '20070225-231703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176034',
internalId:  '',
customField: '20070215-024708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176234',
internalId:  '',
customField: '20070215-024814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '180834',
internalId:  '',
customField: '20070225-232425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117239',
internalId:  '',
customField: '20100113-105350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117234',
internalId:  '',
customField: '20070208-132125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20232',
internalId:  '',
customField: '20070311-234405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166534',
internalId:  '',
customField: '20070208-084554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '178234',
internalId:  '',
customField: '20100113-105617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176834',
internalId:  '',
customField: '20090122-001254'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '20034',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABRI10INEN1M';
var companyName   = 'Chocolate+Moose+Fudge+Factory';
var htmlTitle	  = 'Chocolate+Moose+Fudge+Factory';
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();
};
