/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','452',jdecode('Menu'),jdecode(''), jdecode('%2F452%2Findex.html'), 'true',[ 
		['PAGE','10501',jdecode('Breakfast'),jdecode(''), jdecode('%2F452%2F10501.html'), 'true',[],'',''],
		['PAGE','10522',jdecode('Lunch'),jdecode(''), jdecode('%2F452%2F10522.html'), 'true',[],'',''],
		['PAGE','10543',jdecode('Dinner'),jdecode(''), jdecode('%2F452%2F10543.html'), 'true',[],'',''],
		['PAGE','10564',jdecode('Kids+%26+Seniors'),jdecode(''), jdecode('%2F452%2F10564.html'), 'true',[],'',''],
		['PAGE','473',jdecode('Pie+List'),jdecode(''), jdecode('%2F452%2F473.html'), 'true',[],'','']
	],'',''],
	['PAGE','494',jdecode('Our+Services'),jdecode(''), jdecode('%2F494%2Findex.html'), 'true',[ 
		['PAGE','515',jdecode('Pies+To-Go'),jdecode(''), jdecode('%2F494%2F515.html'), 'true',[],'',''],
		['PAGE','536',jdecode('Gifts+%26+Hats'),jdecode(''), jdecode('%2F494%2F536.html'), 'true',[],'',''],
		['PAGE','557',jdecode('Cards+%26+Certificates'),jdecode(''), jdecode('%2F494%2F557.html'), 'true',[],'',''],
		['PAGE','6501',jdecode('Going+Green'),jdecode(''), jdecode('%2F494%2F6501.html'), 'true',[],'','']
	],'',''],
	['PAGE','599',jdecode('Our+Community'),jdecode(''), jdecode('%2F599%2Findex.html'), 'true',[ 
		['PAGE','620',jdecode('Fun+Days+Parade+'),jdecode(''), jdecode('%2F599%2F620.html'), 'true',[],'',''],
		['PAGE','641',jdecode('Pet+Food+Drives'),jdecode(''), jdecode('%2F599%2F641.html'), 'true',[],'',''],
		['PAGE','6564',jdecode('Links'),jdecode(''), jdecode('%2F599%2F6564.html'), 'true',[],'','']
	],'',''],
	['PAGE','662',jdecode('Business+Hours'),jdecode(''), jdecode('%2F662%2Findex.html'), 'true',[ 
		['PAGE','683',jdecode('Reservations'),jdecode(''), jdecode('%2F662%2F683.html'), 'true',[],'','']
	],'',''],
	['PAGE','6585',jdecode('Location'),jdecode(''), jdecode('%2F6585.html'), 'true',[],'',''],
	['PAGE','725',jdecode('Job+Opportunities'),jdecode(''), jdecode('%2F725.html'), 'true',[],'',''],
	['PAGE','746',jdecode('Contact+Us'),jdecode(''), jdecode('%2F746.html'), 'true',[],'',''],
	['PAGE','2306',jdecode('Guestbook'),jdecode(''), jdecode('%2F2306%2Findex.html'), 'true',[ 
		['PAGE','2301',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F2306%2F2301.html'), 'false',[],'','']
	],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Boston';
theSitetree.paletteFamily='832A2A';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11066';
theSitetree.graphicsetId='11840';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='A34242';
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: 			'Boston',
				paletteFamily: 	'832A2A',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11066',
				graphicsetId: 	'11840',
				contentColor: 	'FFFFFF',
				contentBGColor: 'A34242',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-2306ahw050invg86']={
webappId:    '1002',
documentId:  '2306',
internalId:  '2306ahw050invg86',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20120202-103102'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '6585',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090921-221647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100629-190212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20110601-201221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20101111-171542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20090921-225402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20110601-200246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20101111-171132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20110707-205932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20100113-051755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20110707-210129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20100317-001655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '683',
internalId:  '',
customField: '20110707-210239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20100204-203141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '725',
internalId:  '',
customField: '20110620-004546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '746',
internalId:  '',
customField: '20110707-210413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2306',
internalId:  '',
customField: '20081003-132654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20081003-132654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10522',
internalId:  '',
customField: '20101111-171207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6564',
internalId:  '',
customField: '20110620-010230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6585',
internalId:  '',
customField: '20100920-185148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10543',
internalId:  '',
customField: '20100629-190111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10564',
internalId:  '',
customField: '20100629-152231'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INVG86';
var companyName   = 'Hockinson+Cafe+at+Battle+Ground';
var htmlTitle	  = 'Hockinson+Cafe+at+Battle+Ground';
var metaKeywords  = 'Hockinson%2C+Restaurant%2C+Family+Dining%2C+Small+Business%2C+Vancouver%2C+Washington%2C+Homemade+Pies%2C+Brush+Prairie%2C+Food%2C+Battle+Ground%2C+Cafe.';
var metaContents  = 'Restaurant+';
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();
};

