/* [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','2201',jdecode('Home'),jdecode(''),'/2201.html','true',[],'',''],
	['PAGE','2252',jdecode('Hours+of+Operation'),jdecode(''),'/2252.html','true',[],'',''],
	['PAGE','2294',jdecode('Menu'),jdecode(''),'/2294/index.html','true',[ 
		['PAGE','122318',jdecode('Appetizers'),jdecode(''),'/2294/122318.html','true',[],'',''],
		['PAGE','122339',jdecode('Soup+and+Salad'),jdecode(''),'/2294/122339.html','true',[],'',''],
		['PAGE','122718',jdecode('Entrees'),jdecode(''),'/2294/122718.html','true',[],'',''],
		['PAGE','123718',jdecode('Sides'),jdecode(''),'/2294/123718.html','true',[],'',''],
		['PAGE','122739',jdecode('Dessert'),jdecode(''),'/2294/122739.html','true',[],'',''],
		['PAGE','131385',jdecode('Lunch+Menu'),jdecode(''),'/2294/131385.html','true',[],'','']
	],'',''],
	['PAGE','25501',jdecode('Drink+Menu'),jdecode(''),'/25501/index.html','true',[ 
		['PAGE','128285',jdecode('Wines'),jdecode(''),'/25501/128285.html','true',[],'',''],
		['PAGE','128306',jdecode('Beer'),jdecode(''),'/25501/128306.html','true',[],'',''],
		['PAGE','128327',jdecode('Available+Liquors'),jdecode(''),'/25501/128327.html','true',[],'',''],
		['PAGE','128348',jdecode('Coffee+Drinks'),jdecode(''),'/25501/128348.html','true',[],'','']
	],'',''],
	['PAGE','2315',jdecode('Our+Service'),jdecode(''),'/2315/index.html','true',[ 
		['PAGE','123739',jdecode('Dinner+Banquet+Menu'),jdecode(''),'/2315/123739.html','true',[],'',''],
		['PAGE','124218',jdecode('Lunch+Banquet+Menu'),jdecode(''),'/2315/124218.html','true',[],'','']
	],'',''],
	['PAGE','2273',jdecode('How+to+Find+Us'),jdecode(''),'/2273.html','true',[],'',''],
	['PAGE','2399',jdecode('Contact+Us'),jdecode(''),'/2399.html','true',[],'',''],
	['PAGE','2420',jdecode('About+us'),jdecode(''),'/2420.html','true',[],'',''],
	['PAGE','127174',jdecode('Email+List'),jdecode(''),'/127174.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Tendril';
theSitetree.paletteFamily='D9F4D5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33095';
theSitetree.graphicsetId='14058';
theSitetree.contentColor='3B8030';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Tendril',
				paletteFamily: 	'D9F4D5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33095',
				graphicsetId: 	'14058',
				contentColor: 	'3B8030',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20100619-124354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2252',
internalId:  '',
customField: '20100507-081341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2273',
internalId:  '',
customField: '20091121-183541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2315',
internalId:  '',
customField: '20091121-185255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2294',
internalId:  '',
customField: '20091121-225017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25501',
internalId:  '',
customField: '20091126-010207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2399',
internalId:  '',
customField: '20091121-183602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2420',
internalId:  '',
customField: '20091121-183631'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123739',
internalId:  '',
customField: '20091121-182121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123718',
internalId:  '',
customField: '20091223-161221'
};
webappMappings['1501']=webappMappings['1501-15294852']={
webappId:    '1501',
documentId:  '2201',
internalId:  '15294852',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122339',
internalId:  '',
customField: '20100417-132501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122318',
internalId:  '',
customField: '20100417-132129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122718',
internalId:  '',
customField: '20100823-192218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122739',
internalId:  '',
customField: '20100417-134823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124218',
internalId:  '',
customField: '20091121-182138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128306',
internalId:  '',
customField: '20091223-161332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128285',
internalId:  '',
customField: '20100612-094707'
};
webappMappings['7008']=webappMappings['7008-13188']={
webappId:    '7008',
documentId:  '127174',
internalId:  '13188',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127174',
internalId:  '',
customField: '20091121-233046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128327',
internalId:  '',
customField: '20100124-174507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128348',
internalId:  '',
customField: '20091125-152311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131385',
internalId:  '',
customField: '20100823-192248'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30I7C11J';
var companyName   = 'Steak.+Seafood.+Pasta';
var htmlTitle	  = 'Savannah%27s+Restaurant';
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();
};
