/* [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','2101',jdecode('Home'),jdecode(''), jdecode('%2F2101.html'), 'true',[],'',''],
	['PAGE','2901',jdecode('Opening+hours'),jdecode(''), jdecode('%2F2901.html'), 'true',[],'',''],
	['PAGE','2922',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F2922.html'), 'true',[],'',''],
	['PAGE','2943',jdecode('Contact'),jdecode(''), jdecode('%2F2943.html'), 'true',[],'',''],
	['PAGE','12701',jdecode('About+us'),jdecode(''), jdecode('%2F12701.html'), 'true',[],'',''],
	['PAGE','3048',jdecode('Menu'),jdecode(''), jdecode('%2F3048%2Findex.html'), 'true',[ 
		['PAGE','3069',jdecode('LUNCH'),jdecode(''), jdecode('%2F3048%2F3069.html'), 'true',[],'',''],
		['PAGE','5001',jdecode('APETIZER'),jdecode(''), jdecode('%2F3048%2F5001.html'), 'true',[],'',''],
		['PAGE','5022',jdecode('SOUPS+%26+SALADS'),jdecode(''), jdecode('%2F3048%2F5022.html'), 'true',[],'',''],
		['PAGE','5043',jdecode('KIDS+PLATES'),jdecode(''), jdecode('%2F3048%2F5043.html'), 'true',[],'',''],
		['PAGE','3090',jdecode('SISE%C3%91OR+SPECIALS'),jdecode(''), jdecode('%2F3048%2F3090.html'), 'true',[],'',''],
		['PAGE','5064',jdecode('VEGETARIANS'),jdecode(''), jdecode('%2F3048%2F5064.html'), 'true',[],'',''],
		['PAGE','5085',jdecode('COMBOS'),jdecode(''), jdecode('%2F3048%2F5085.html'), 'true',[],'',''],
		['PAGE','5106',jdecode('SPECIALTIES+SISE%C3%91OR'),jdecode(''), jdecode('%2F3048%2F5106.html'), 'true',[],'',''],
		['PAGE','5127',jdecode('CHIMICHANGAS'),jdecode(''), jdecode('%2F3048%2F5127.html'), 'true',[],'',''],
		['PAGE','5148',jdecode('FAJITAS'),jdecode(''), jdecode('%2F3048%2F5148.html'), 'true',[],'',''],
		['PAGE','5169',jdecode('OLD+MEXICO'),jdecode(''), jdecode('%2F3048%2F5169.html'), 'true',[],'',''],
		['PAGE','15801',jdecode('TACOS'),jdecode(''), jdecode('%2F3048%2F15801.html'), 'true',[],'',''],
		['PAGE','6501',jdecode('A+LA+CARTA'),jdecode(''), jdecode('%2F3048%2F6501.html'), 'true',[],'',''],
		['PAGE','6522',jdecode('SIDE+ORDERS'),jdecode(''), jdecode('%2F3048%2F6522.html'), 'true',[],'',''],
		['PAGE','6543',jdecode('DESSERTS'),jdecode(''), jdecode('%2F3048%2F6543.html'), 'true',[],'',''],
		['PAGE','6564',jdecode('DESCRIPTIONS+OF++MEXICAN+PLATES'),jdecode(''), jdecode('%2F3048%2F6564.html'), 'true',[],'',''],
		['PAGE','6585',jdecode('DRINKS'),jdecode(''), jdecode('%2F3048%2F6585.html'), 'true',[],'','']
	],'',''],
	['PAGE','13201',jdecode('PEOPLE'),jdecode(''), jdecode('%2F13201.html'), 'true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Cook';
theSitetree.paletteFamily='62A57A';
theSitetree.keyvisualId='11568';
theSitetree.keyvisualName='kv_11568.jpg';
theSitetree.fontsetId='32887';
theSitetree.graphicsetId='13969';
theSitetree.contentColor='713b32';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cook',
				paletteFamily: 	'62A57A',
				keyvisualId: 	'11568',
				keyvisualName: 	'kv_11568.jpg',
				fontsetId: 		'32887',
				graphicsetId: 	'13969',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20101019-215603'
};
webappMappings['7008']=webappMappings['7008-4901']={
webappId:    '7008',
documentId:  '2943',
internalId:  '4901',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-bd2a5fb1158ddb63abe57903493a5c65']={
webappId:    '7060',
documentId:  '2101',
internalId:  'bd2a5fb1158ddb63abe57903493a5c65',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20100713-230433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2943',
internalId:  '',
customField: '20101016-135825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3048',
internalId:  '',
customField: '20100713-223606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20090216-212012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2922',
internalId:  '',
customField: '20110227-000326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3069',
internalId:  '',
customField: '20110227-002538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3090',
internalId:  '',
customField: '20100714-113605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6564',
internalId:  '',
customField: '20090306-000414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6585',
internalId:  '',
customField: '20100713-232357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6522',
internalId:  '',
customField: '20100713-231402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6543',
internalId:  '',
customField: '20100713-231601'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100714-112624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20100713-153547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5043',
internalId:  '',
customField: '20100714-113222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5064',
internalId:  '',
customField: '20100713-154553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5085',
internalId:  '',
customField: '20100713-154807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5106',
internalId:  '',
customField: '20100714-114452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5127',
internalId:  '',
customField: '20100713-223933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5148',
internalId:  '',
customField: '20100714-114649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5169',
internalId:  '',
customField: '20100714-114858'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '3048',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-13560468']={
webappId:    '1501',
documentId:  '2101',
internalId:  '13560468',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12701',
internalId:  '',
customField: '20090330-220849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20090401-152408'
};
webappMappings['7060']=webappMappings['7060-11ff36e3c8b9376a1f7ad8fda24487db']={
webappId:    '7060',
documentId:  '13201',
internalId:  '11ff36e3c8b9376a1f7ad8fda24487db',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20100713-230027'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHCKR';
var companyName   = 'SI+SE%C3%91OR+MEX-MEX+GRILL';
var htmlTitle	  = 'SI+SENOR+MEX+MEX+GRILL%2C+RESTAURANTS%2C+MEXICAN%2C+food%2C+granite+city+ill%2Ctaco%2Cburrito%2C+fajitas%2C+margaritas';
var metaKeywords  = 'SI+SENOR+MEX+MEX+GRILL%2C+RESTAURANT%2C+MEXICAN%2C+TACOS%2C+FAJITAS%2C+BEST+MEXICAN+FOOD%2CMEXICAN+FOOD%2CBEER%2C+MARGARITAS%2C+TEQUILA%2C+BEST+SERVICE%2C+FRIENDLY%2CGRANITE+CITY%2C+62040%2C+MEXMEX%2CRESTAURANT%2C+MEXICAN%2C+TACOS%2C+FAJITAS%2C+BEST+MEXICAN%2C+granite+city%2C+62040%2C+MEX+MEX%2CGRIL%2C+MEX+MEX++GRILL%2CBAR%2C+BEBERAGES%2CHECTOR';
var metaContents  = 'SI+SENOR+MEX+MEX+GRILL%2C+RESTAURANT%2C+MEXICAN%2C+TACOS%2C+FAJITAS%2C+BEST+MEXICAN+FOOD%2CMEXICAN+FOOD%2CBEER%2C+MARGARITAS%2C+TEQUILA%2C+BEST+SERVICE%2C+FRIENDLY%2CGRANITE+CITY%2C+62040%2C+MEXMEX%2CRESTAURANT%2C+MEXICAN%2C+TACOS%2C+FAJITAS%2C+BEST+MEXICAN%2C+granite+city%2C+62040%2C+MEX+MEX%2CGRIL%2C+MEX+MEX++GRILL%2CBAR%2C+BEBERAGES%2CHECTOR';
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();
};

