/* [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','301',jdecode('Home'),jdecode(''), jdecode('%2F301.html'), 'true',[],'',''],
	['PAGE','152904',jdecode('Close+on+Superbowl+Sunday'),jdecode(''), jdecode('%2F152904.html'), 'true',[],'',''],
	['PAGE','152400',jdecode('Urgent+Message'),jdecode(''), jdecode('%2F152400.html'), 'true',[],'',''],
	['PAGE','352',jdecode('Opening+hours'),jdecode(''), jdecode('%2F352.html'), 'true',[],'',''],
	['PAGE','149627',jdecode('Gluten+Free+Menu'),jdecode(''), jdecode('%2F149627.html'), 'true',[],'',''],
	['PAGE','152380',jdecode('Award+Winning+Ribs'),jdecode(''), jdecode('%2F152380.html'), 'true',[],'',''],
	['PAGE','394',jdecode('Menu'),jdecode(''), jdecode('%2F394%2Findex.html'), 'true',[ 
		['PAGE','14301',jdecode('Lunch'),jdecode(''), jdecode('%2F394%2F14301.html'), 'true',[],'',''],
		['PAGE','14322',jdecode('Dinner+Entree'),jdecode(''), jdecode('%2F394%2F14322.html'), 'true',[],'',''],
		['PAGE','14343',jdecode('Desserts'),jdecode(''), jdecode('%2F394%2F14343.html'), 'true',[],'','']
	],'',''],
	['PAGE','151736',jdecode('Special+Drinks+and+Martinis'),jdecode(''), jdecode('%2F151736.html'), 'true',[],'',''],
	['PAGE','147188',jdecode('About+us'),jdecode(''), jdecode('%2F147188.html'), 'true',[],'',''],
	['PAGE','373',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F373.html'), 'true',[],'',''],
	['PAGE','13501',jdecode('Entertainment'),jdecode(''), jdecode('%2F13501.html'), 'true',[],'',''],
	['PAGE','541',jdecode('Reservations'),jdecode(''), jdecode('%2F541.html'), 'true',[],'',''],
	['PAGE','150311',jdecode('The+Best+of+The+Berkshires'),jdecode(''), jdecode('%2F150311.html'), 'true',[],'',''],
	['PAGE','150372',jdecode('Local+media'),jdecode(''), jdecode('%2F150372.html'), 'true',[],'',''],
	['PAGE','51501',jdecode('Our+e-mail+list'),jdecode(''), jdecode('%2F51501.html'), 'true',[],'',''],
	['PAGE','79312',jdecode('Testimonials'),jdecode(''), jdecode('%2F79312.html'), 'true',[],'',''],
	['PAGE','150543',jdecode('Links'),jdecode(''), jdecode('%2F150543.html'), 'true',[],'',''],
	['PAGE','148045',jdecode('Bands+pix'),jdecode(''), jdecode('%2F148045.html'), 'true',[],'',''],
	['PAGE','6906',jdecode('Guestbook'),jdecode(''), jdecode('%2F6906%2Findex.html'), 'true',[ 
		['PAGE','6901',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F6906%2F6901.html'), 'false',[],'','']
	],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Layers';
theSitetree.paletteFamily='C89C55';
theSitetree.keyvisualId='612';
theSitetree.keyvisualName='prost.jpg';
theSitetree.fontsetId='130';
theSitetree.graphicsetId='144';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='EBF0F0';
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: 			'Layers',
				paletteFamily: 	'C89C55',
				keyvisualId: 	'612',
				keyvisualName: 	'prost.jpg',
				fontsetId: 		'130',
				graphicsetId: 	'144',
				contentColor: 	'000000',
				contentBGColor: 'EBF0F0',
				a_color: 		'CE4747',
				b_color: 		'C1E0DA',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20120112-152447'
};
webappMappings['1002']=webappMappings['1002-6906AHW050IN2PZD']={
webappId:    '1002',
documentId:  '6906',
internalId:  '6906AHW050IN2PZD',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20110623-000427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20111031-123035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '541',
internalId:  '',
customField: '20111031-123115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51501',
internalId:  '',
customField: '20100504-155050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '373',
internalId:  '',
customField: '20101012-214322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '152380',
internalId:  '',
customField: '20110705-095033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79312',
internalId:  '',
customField: '20091018-223509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150372',
internalId:  '',
customField: '20100720-165545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '394',
internalId:  '',
customField: '20100608-140730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20111220-160227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14322',
internalId:  '',
customField: '20120126-150437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14343',
internalId:  '',
customField: '20110114-114355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150311',
internalId:  '',
customField: '20100630-121417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148045',
internalId:  '',
customField: '20100907-191015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150543',
internalId:  '',
customField: '20100806-141632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '152904',
internalId:  '',
customField: '20120131-223327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '152400',
internalId:  '',
customField: '20110714-130442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6906',
internalId:  '',
customField: '20070320-192710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20070320-192710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '151736',
internalId:  '',
customField: '20110114-115055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147188',
internalId:  '',
customField: '20100907-193549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149627',
internalId:  '',
customField: '20110516-151054'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN2PZD';
var companyName   = 'Flavours';
var htmlTitle	  = 'Flavours+Restaurant%2C+Dining+In+The+Berkshires%2C+Malaysian%2C+Asian%2C+American+Restaurant+Lenox%2C+MA';
var metaKeywords  = 'dining+in+the+Berkshires%2Crestaurants+in+the+Berkshires%2Cdining+in+Berkshire+County%2Crestaurants+in+Berkshire+County%2CLenox%2C+MA+restaurants%2Centertainment+in+the+berkshires%2CMalaysian+food%2CAsian+food%2CAmerican+food%2Cberkshire+restaurant%2Clenox%2C+ma+restaurant%2Centertainment%2Clive+bands%2Ckaraoke%2Cdj%2Cflavours+restaurant%2Cberkshire+dining%2Cthe+berkshires%2Cberkshire+county';
var metaContents  = 'Flavours+Restaurant+Malaysian+dining%2C+Asian+dining+and+American+dining+in+the+Berkshires.++Flavours+Restaurant+located+in+Lenox%2C+MA+dining+in+Berkshire+County%2C+serving+Asian%2C+Malaysian+and+American+food.++Plus+entertainment+in+the+Berkshires+including+live+bands%2C+karaoke+and+DJs.';
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();
};

