/* [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(''),'/301.html','true',[],'',''],
	['PAGE','3201',jdecode('Opening+hours'),jdecode(''),'/3201.html','true',[],'',''],
	['PAGE','3222',jdecode('How+to+find+us'),jdecode(''),'/3222.html','true',[],'',''],
	['PAGE','5201',jdecode('menu'),jdecode(''),'/5201/index.html','true',[ 
		['PAGE','5222',jdecode('Appetizers'),jdecode(''),'/5201/5222.html','true',[],'',''],
		['PAGE','5243',jdecode('Soup'),jdecode(''),'/5201/5243.html','true',[],'',''],
		['PAGE','5701',jdecode('Chef+Specialties'),jdecode(''),'/5201/5701.html','true',[],'',''],
		['PAGE','5722',jdecode('Seafood'),jdecode(''),'/5201/5722.html','true',[],'',''],
		['PAGE','5785',jdecode('Beef'),jdecode(''),'/5201/5785.html','true',[],'',''],
		['PAGE','5743',jdecode('Pork'),jdecode(''),'/5201/5743.html','true',[],'',''],
		['PAGE','5764',jdecode('Poultry'),jdecode(''),'/5201/5764.html','true',[],'',''],
		['PAGE','5806',jdecode('Hot+%26+Spicy+Dishes'),jdecode(''),'/5201/5806.html','true',[],'',''],
		['PAGE','5848',jdecode('Cantonese+Pan+Fried+Noodle'),jdecode(''),'/5201/5848.html','true',[],'',''],
		['PAGE','5869',jdecode('Lo+Mein+%26+Mei+Fun'),jdecode(''),'/5201/5869.html','true',[],'',''],
		['PAGE','5264',jdecode('Chop+Suey+or+Chow+Mein'),jdecode(''),'/5201/5264.html','true',[],'',''],
		['PAGE','5911',jdecode('Egg+Foo+Young'),jdecode(''),'/5201/5911.html','true',[],'',''],
		['PAGE','5932',jdecode('Fried+Rice'),jdecode(''),'/5201/5932.html','true',[],'',''],
		['PAGE','5890',jdecode('Vegetarian'),jdecode(''),'/5201/5890.html','true',[],'',''],
		['PAGE','5953',jdecode('Diet+Food'),jdecode(''),'/5201/5953.html','true',[],'',''],
		['PAGE','28401',jdecode('Combination'),jdecode(''),'/5201/28401.html','true',[],'',''],
		['PAGE','5827',jdecode('Special+Family+Dinner'),jdecode(''),'/5201/5827.html','true',[],'',''],
		['PAGE','5974',jdecode('Kids+Menu'),jdecode(''),'/5201/5974.html','true',[],'',''],
		['PAGE','5995',jdecode('Luncheon+Special'),jdecode(''),'/5201/5995.html','true',[],'',''],
		['PAGE','6037',jdecode('Side+Order'),jdecode(''),'/5201/6037.html','true',[],'',''],
		['PAGE','6016',jdecode('Catering+Menu'),jdecode(''),'/5201/6016.html','true',[],'','']
	],'',''],
	['PAGE','53101',jdecode('Coupon'),jdecode(''),'/53101.html','true',[],'',''],
	['PAGE','83001',jdecode('New+Item+%2F+Special'),jdecode(''),'/83001.html','true',[],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='Clearline';
theSitetree.paletteFamily='B71602';
theSitetree.keyvisualId='3294';
theSitetree.keyvisualName='kv_3294.jpg';
theSitetree.fontsetId='10421';
theSitetree.graphicsetId='10715';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Clearline',
				paletteFamily: 	'B71602',
				keyvisualId: 	'3294',
				keyvisualName: 	'kv_3294.jpg',
				fontsetId: 		'10421',
				graphicsetId: 	'10715',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'B71602',
				e_color: 		'989696',
				f_color: 		'989696',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20091103-141638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20091103-142208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3222',
internalId:  '',
customField: '20090719-150922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20090719-151041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5222',
internalId:  '',
customField: '20090719-151144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6016',
internalId:  '',
customField: '20090822-164145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5743',
internalId:  '',
customField: '20090719-151507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5995',
internalId:  '',
customField: '20090719-153544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5848',
internalId:  '',
customField: '20090719-151713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5264',
internalId:  '',
customField: '20090719-151848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53101',
internalId:  '',
customField: '20091103-161230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5911',
internalId:  '',
customField: '20090719-152042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5785',
internalId:  '',
customField: '20091103-172936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5764',
internalId:  '',
customField: '20090719-151619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5243',
internalId:  '',
customField: '20090719-151243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20090719-151320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5722',
internalId:  '',
customField: '20090719-151403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5806',
internalId:  '',
customField: '20090822-164926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5827',
internalId:  '',
customField: '20090719-153226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5869',
internalId:  '',
customField: '20090719-151812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5890',
internalId:  '',
customField: '20090822-165316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5932',
internalId:  '',
customField: '20090719-152950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28401',
internalId:  '',
customField: '20090719-153119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5953',
internalId:  '',
customField: '20090719-153044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5974',
internalId:  '',
customField: '20090719-153257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6037',
internalId:  '',
customField: '20090719-153611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83001',
internalId:  '',
customField: '20091103-164038'
};
var canonHostname = 'diywk01.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();
};
