/* [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','2401',jdecode('Home'),jdecode(''),'/2401.html','true',[],'',''],
	['PAGE','10801',jdecode('Hours'),jdecode(''),'/10801.html','true',[],'',''],
	['PAGE','2473',jdecode('How+to+find+us'),jdecode(''),'/2473.html','true',[],'',''],
	['PAGE','2494',jdecode('Reservations'),jdecode(''),'/2494.html','true',[],'',''],
	['PAGE','19801',jdecode('Upcoming+Events'),jdecode(''),'/19801/index.html','true',[ 
		['PAGE','6901',jdecode('Wine+%26+Beer+Tastings'),jdecode(''),'/19801/6901.html','true',[],'','']
	],'',''],
	['PAGE','21001',jdecode('Coffee'),jdecode(''),'/21001.html','true',[],'',''],
	['PAGE','4701',jdecode('Menus'),jdecode(''),'/4701/index.html','true',[ 
		['PAGE','4722',jdecode('Drinks+menu'),jdecode(''),'/4701/4722.html','true',[],'',''],
		['PAGE','7543',jdecode('Dinner+Menu'),jdecode(''),'/4701/7543.html','true',[],'',''],
		['PAGE','7564',jdecode('Lunch+Menu'),jdecode(''),'/4701/7564.html','true',[],'',''],
		['PAGE','7585',jdecode('Desserts'),jdecode(''),'/4701/7585.html','true',[],'','']
	],'',''],
	['PAGE','7501',jdecode('Upstairs+Private+Room'),jdecode(''),'/7501/index.html','true',[ 
		['PAGE','7522',jdecode('Special+Events+Menu'),jdecode(''),'/7501/7522.html','true',[],'','']
	],'',''],
	['PAGE','4743',jdecode('About+us'),jdecode(''),'/4743.html','true',[],'',''],
	['PAGE','2515',jdecode('Contact'),jdecode(''),'/2515.html','true',[],'',''],
	['PAGE','28001',jdecode('Press'),jdecode(''),'/28001.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='A4681A';
theSitetree.keyvisualId='7152';
theSitetree.keyvisualName='kv_7152.jpg';
theSitetree.fontsetId='16396';
theSitetree.graphicsetId='12131';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blossom',
				paletteFamily: 	'A4681A',
				keyvisualId: 	'7152',
				keyvisualName: 	'kv_7152.jpg',
				fontsetId: 		'16396',
				graphicsetId: 	'12131',
				contentColor: 	'000000',
				contentBGColor: 'E5E2E2',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2401',
internalId:  '',
customField: '20100323-164455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20091113-193852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2473',
internalId:  '',
customField: '20100122-133150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2494',
internalId:  '',
customField: '20090407-101713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2515',
internalId:  '',
customField: '20090403-150928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4722',
internalId:  '',
customField: '20100125-201856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4743',
internalId:  '',
customField: '20100323-165147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21001',
internalId:  '',
customField: '20100122-145109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20100511-211255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20100429-210258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20100323-164805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7522',
internalId:  '',
customField: '20091113-202222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7585',
internalId:  '',
customField: '20100602-084529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7543',
internalId:  '',
customField: '20100602-084145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7564',
internalId:  '',
customField: '20100602-084428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10801',
internalId:  '',
customField: '20100511-211351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28001',
internalId:  '',
customField: '20100323-172739'
};
webappMappings['1501']=webappMappings['1501-5956558']={
webappId:    '1501',
documentId:  '2401',
internalId:  '5956558',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2401',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INLAS0';
var companyName   = 'Tre+Bicchieri+Italian+Restaurant';
var htmlTitle	  = 'Tre+Bicchieri+Italian+Restaurant';
var metaKeywords  = 'Italian+restaurant%2C+downtown+Columbus%2C+Columbus%2C+Indiana%2C+locally-owned%2C+restaurant%2C+italian%2C+wine%2C+beer%2C+wine+tastings%2C+beer+tastings%2C+pasta%2C+';
var metaContents  = 'Locally-owned+Italian+Restaurant+located+in+beautiful+downtown+Columbus.';
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();
};

