/* [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','3201',jdecode('Opening+hours'),jdecode(''), jdecode('%2F3201.html'), 'true',[],'',''],
	['PAGE','3222',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F3222.html'), 'true',[],'',''],
	['PAGE','5201',jdecode('menu'),jdecode(''), jdecode('%2F5201%2Findex.html'), 'true',[ 
		['PAGE','5222',jdecode('Appetizers'),jdecode(''), jdecode('%2F5201%2F5222.html'), 'true',[],'',''],
		['PAGE','5243',jdecode('Soup'),jdecode(''), jdecode('%2F5201%2F5243.html'), 'true',[],'',''],
		['PAGE','5701',jdecode('Chef+Specialties'),jdecode(''), jdecode('%2F5201%2F5701.html'), 'true',[],'',''],
		['PAGE','5722',jdecode('Seafood'),jdecode(''), jdecode('%2F5201%2F5722.html'), 'true',[],'',''],
		['PAGE','5785',jdecode('Beef'),jdecode(''), jdecode('%2F5201%2F5785.html'), 'true',[],'',''],
		['PAGE','5743',jdecode('Pork'),jdecode(''), jdecode('%2F5201%2F5743.html'), 'true',[],'',''],
		['PAGE','5764',jdecode('Poultry'),jdecode(''), jdecode('%2F5201%2F5764.html'), 'true',[],'',''],
		['PAGE','5806',jdecode('Hot+%26+Spicy+Dishes'),jdecode(''), jdecode('%2F5201%2F5806.html'), 'true',[],'',''],
		['PAGE','5848',jdecode('Cantonese+Pan+Fried+Noodle'),jdecode(''), jdecode('%2F5201%2F5848.html'), 'true',[],'',''],
		['PAGE','5869',jdecode('Lo+Mein+%26+Mei+Fun'),jdecode(''), jdecode('%2F5201%2F5869.html'), 'true',[],'',''],
		['PAGE','5264',jdecode('Chop+Suey+or+Chow+Mein'),jdecode(''), jdecode('%2F5201%2F5264.html'), 'true',[],'',''],
		['PAGE','5911',jdecode('Egg+Foo+Young'),jdecode(''), jdecode('%2F5201%2F5911.html'), 'true',[],'',''],
		['PAGE','5932',jdecode('Fried+Rice'),jdecode(''), jdecode('%2F5201%2F5932.html'), 'true',[],'',''],
		['PAGE','5890',jdecode('Vegetarian'),jdecode(''), jdecode('%2F5201%2F5890.html'), 'true',[],'',''],
		['PAGE','5953',jdecode('Diet+Food'),jdecode(''), jdecode('%2F5201%2F5953.html'), 'true',[],'',''],
		['PAGE','28401',jdecode('Combination'),jdecode(''), jdecode('%2F5201%2F28401.html'), 'true',[],'',''],
		['PAGE','5827',jdecode('Special+Family+Dinner'),jdecode(''), jdecode('%2F5201%2F5827.html'), 'true',[],'',''],
		['PAGE','5974',jdecode('Kids+Menu'),jdecode(''), jdecode('%2F5201%2F5974.html'), 'true',[],'',''],
		['PAGE','5995',jdecode('Luncheon+Special'),jdecode(''), jdecode('%2F5201%2F5995.html'), 'true',[],'',''],
		['PAGE','6037',jdecode('Side+Order'),jdecode(''), jdecode('%2F5201%2F6037.html'), 'true',[],'',''],
		['PAGE','6016',jdecode('Catering+Menu'),jdecode(''), jdecode('%2F5201%2F6016.html'), 'true',[],'','']
	],'',''],
	['PAGE','53101',jdecode('Coupon'),jdecode(''), jdecode('%2F53101.html'), 'true',[],'',''],
	['PAGE','83001',jdecode('New+Item+%2F+Special'),jdecode(''), jdecode('%2F83001.html'), 'true',[],'',''],
	['PAGE','91501',jdecode('Photo+Gallery'),jdecode(''), jdecode('%2F91501.html'), 'true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Tendril';
theSitetree.paletteFamily='D9F4D5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33093';
theSitetree.graphicsetId='14058';
theSitetree.contentColor='3B8030';
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: 			'Tendril',
				paletteFamily: 	'D9F4D5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33093',
				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:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20110710-174530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20101226-173032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3222',
internalId:  '',
customField: '20110513-183816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20110710-183022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5222',
internalId:  '',
customField: '20110513-151642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6016',
internalId:  '',
customField: '20111023-145125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5743',
internalId:  '',
customField: '20110707-160653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5995',
internalId:  '',
customField: '20110513-153522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5848',
internalId:  '',
customField: '20100421-134043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5264',
internalId:  '',
customField: '20110707-162945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53101',
internalId:  '',
customField: '20110513-154825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5911',
internalId:  '',
customField: '20110513-152811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5785',
internalId:  '',
customField: '20110707-160612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5764',
internalId:  '',
customField: '20110707-160758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5243',
internalId:  '',
customField: '20110513-184105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20110707-160341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5722',
internalId:  '',
customField: '20110707-160452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5806',
internalId:  '',
customField: '20110707-162613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5827',
internalId:  '',
customField: '20110514-125954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5869',
internalId:  '',
customField: '20110707-162805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5890',
internalId:  '',
customField: '20110707-163700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5932',
internalId:  '',
customField: '20110513-152935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28401',
internalId:  '',
customField: '20110513-153410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5953',
internalId:  '',
customField: '20110514-151316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5974',
internalId:  '',
customField: '20100421-140136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6037',
internalId:  '',
customField: '20100421-140647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83001',
internalId:  '',
customField: '20110113-192754'
};
webappMappings['7060']=webappMappings['7060-c1d2f517bc8654387f9b29c8257b8478']={
webappId:    '7060',
documentId:  '91501',
internalId:  'c1d2f517bc8654387f9b29c8257b8478',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91501',
internalId:  '',
customField: '20110710-174616'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN39PY';
var companyName   = 'China+Express+in+Parma';
var htmlTitle	  = '';
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();
};

