/* [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','2001',jdecode('Home'),jdecode(''),'/2001.html','true',[],'',''],
	['PAGE','4201',jdecode('Happenings'),jdecode(''),'/4201/index.html','true',[ 
		['PAGE','4222',jdecode('Fight+Schedules'),jdecode(''),'/4201/4222.html','true',[],'',''],
		['PAGE','4243',jdecode('Special+Events'),jdecode(''),'/4201/4243.html','true',[],'','']
	],'',''],
	['PAGE','4264',jdecode('Food+%26+Drink+Specials'),jdecode(''),'/4264.html','true',[],'',''],
	['PAGE','4285',jdecode('Menu'),jdecode(''),'/4285.html','true',[],'',''],
	['PAGE','4306',jdecode('Private+Parties'),jdecode(''),'/4306/index.html','true',[ 
		['PAGE','4327',jdecode('Buffet+Choices'),jdecode(''),'/4306/4327.html','true',[],'','']
	],'',''],
	['PAGE','4348',jdecode('Wall+of+Shame'),jdecode(''),'/4348.html','true',[],'',''],
	['PAGE','4369',jdecode('Guest+Book'),jdecode(''),'/4369.html','true',[],'',''],
	['PAGE','4390',jdecode('How+to+Find+Us'),jdecode(''),'/4390.html','true',[],'',''],
	['PAGE','4411',jdecode('Contact+Us'),jdecode(''),'/4411.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Cook';
theSitetree.paletteFamily='D66256';
theSitetree.keyvisualId='11579';
theSitetree.keyvisualName='kv_11579.jpg';
theSitetree.fontsetId='32886';
theSitetree.graphicsetId='13968';
theSitetree.contentColor='713b32';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cook',
				paletteFamily: 	'D66256',
				keyvisualId: 	'11579',
				keyvisualName: 	'kv_11579.jpg',
				fontsetId: 		'32886',
				graphicsetId: 	'13968',
				contentColor: 	'713b32',
				contentBGColor: 'FFFFFF',
				a_color: 		'FDF1D6',
				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:  '2001',
internalId:  '',
customField: '20100129-141941'
};
webappMappings['1002']=webappMappings['1002-4369avfl30inhz49']={
webappId:    '1002',
documentId:  '4369',
internalId:  '4369avfl30inhz49',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-12129']={
webappId:    '7008',
documentId:  '4411',
internalId:  '12129',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20100525-132736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4264',
internalId:  '',
customField: '20091208-132204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4285',
internalId:  '',
customField: '20091208-140720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4306',
internalId:  '',
customField: '20091208-140803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4327',
internalId:  '',
customField: '20091208-141414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4390',
internalId:  '',
customField: '20091024-183032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4411',
internalId:  '',
customField: '20091024-183530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4222',
internalId:  '',
customField: '20100525-154743'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2001',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-15172922']={
webappId:    '1501',
documentId:  '2001',
internalId:  '15172922',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4348',
internalId:  '',
customField: '20091024-190000'
};
webappMappings['7060']=webappMappings['7060-823d6f312a303f6b051b1a4a05a07d54']={
webappId:    '7060',
documentId:  '4348',
internalId:  '823d6f312a303f6b051b1a4a05a07d54',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4243',
internalId:  '',
customField: '20100525-162633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4369',
internalId:  '',
customField: '20091024-194126'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHZ49';
var companyName   = 'TABLE+STEAKS+EAST';
var htmlTitle	  = '';
var metaKeywords  = 'beer+pong%2C+ping+pong%2C+table+tennis%2C+shuffleboard%2C+Table+Steaks+East%2C+Light+rail%2C+patio%2C+heated%2C+poker%2C+texas+hold+%27em%2C+TFO%2C+live+trivia%2C+Buzztime%2C+NTN%2C+Karaoke%2C+Trivia+Face-off%2C+Uncle+Dutchie%2C+UFC%2C+Denver%2C+Aurora%2C+sports+bar%2C+pool%2C+snooker%2C+billiards%2C+cues%2C+hot+wings%2C+burgers%2C+happy+hour%2C+';
var metaContents  = 'We+are+a+sports+bar+with+a+huge+covered+patio%21++Come+play+pool%2C+suffleboards%2C+ping+pong%2C+beer+pong%2C+poker%2C+live+trivia%2C+NTN+Buzztime%2C+and+Karaoke%2C+we+have+it+all.++Extensive+menu+priced+under+10.00%2C+and+a+full+bar.++We+show+UFC+and+PPV+boxing+events+almost+every+week.';
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();
};
