/* [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','701',jdecode('Home'),jdecode(''), jdecode('%2F701.html'), 'true',[],'',''],
	['PAGE','31796',jdecode('Picture+Album'),jdecode(''), jdecode('%2F31796.html'), 'true',[],'',''],
	['PAGE','801',jdecode('About+Us'),jdecode(''), jdecode('%2F801.html'), 'true',[],'',''],
	['PAGE','843',jdecode('Carry-Out+Menu'),jdecode(''), jdecode('%2F843.html'), 'true',[],'',''],
	['PAGE','906',jdecode('Dinner+Menu'),jdecode(''), jdecode('%2F906.html'), 'true',[],'',''],
	['PAGE','22401',jdecode('Daily+Luncheon+Specials'),jdecode(''), jdecode('%2F22401.html'), 'false',[],'',''],
	['PAGE','12301',jdecode('Standard+Dine-In++Menu'),jdecode(''), jdecode('%2F12301.html'), 'false',[],'',''],
	['PAGE','948',jdecode('Children%26%23x27%3Bs+Menu'),jdecode(''), jdecode('%2F948.html'), 'true',[],'',''],
	['PAGE','927',jdecode('Dessert+%26+Coffee+Menu'),jdecode(''), jdecode('%2F927.html'), 'true',[],'',''],
	['PAGE','11701',jdecode('Lite+Fare+Menu'),jdecode(''), jdecode('%2F11701.html'), 'false',[],'',''],
	['PAGE','11722',jdecode('Banquet+Luncheon+Menu'),jdecode(''), jdecode('%2F11722.html'), 'false',[],'',''],
	['PAGE','29901',jdecode('Pasta+Banquet++Menu'),jdecode(''), jdecode('%2F29901.html'), 'false',[],'',''],
	['PAGE','11743',jdecode('Banquet++Menu'),jdecode(''), jdecode('%2F11743.html'), 'true',[],'',''],
	['PAGE','12322',jdecode('Wine+List'),jdecode(''), jdecode('%2F12322.html'), 'true',[],'',''],
	['PAGE','12343',jdecode('Services'),jdecode(''), jdecode('%2F12343.html'), 'true',[],'',''],
	['PAGE','23801',jdecode('What+To+Wear'),jdecode(''), jdecode('%2F23801.html'), 'true',[],'',''],
	['PAGE','20301',jdecode('Gift+Certificates'),jdecode(''), jdecode('%2F20301.html'), 'true',[],'',''],
	['PAGE','12406',jdecode('Reservations'),jdecode(''), jdecode('%2F12406.html'), 'true',[],'',''],
	['PAGE','969',jdecode('Contact'),jdecode(''), jdecode('%2F969.html'), 'true',[],'',''],
	['PAGE','9701',jdecode('Map'),jdecode(''), jdecode('%2F9701.html'), 'true',[],'',''],
	['PAGE','33510',jdecode('Coupons'),jdecode(''), jdecode('%2F33510.html'), 'false',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Cinema';
theSitetree.paletteFamily='B00E18';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16612';
theSitetree.graphicsetId='12208';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='B00E18';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'verizon',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cinema',
				paletteFamily: 	'B00E18',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16612',
				graphicsetId: 	'12208',
				contentColor: 	'FFFFFF',
				contentBGColor: 'B00E18',
				a_color: 		'000000',
				b_color: 		'C03E46',
				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['1501']=webappMappings['1501-1356730']={
webappId:    '1501',
documentId:  '701',
internalId:  '1356730',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '9701',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['7060']=webappMappings['7060-4d571d80163db6c6dcec85e4b84e2a3d']={
webappId:    '7060',
documentId:  '31796',
internalId:  '4d571d80163db6c6dcec85e4b84e2a3d',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20120104-143540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31796',
internalId:  '',
customField: '20100312-123959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20080516-120056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '843',
internalId:  '',
customField: '20110408-123838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '906',
internalId:  '',
customField: '20120124-131306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20080517-200114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12301',
internalId:  '',
customField: '20110408-132248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '948',
internalId:  '',
customField: '20080812-195336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '927',
internalId:  '',
customField: '20080516-135330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20080812-171546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11722',
internalId:  '',
customField: '20101014-085957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29901',
internalId:  '',
customField: '20101014-090034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11743',
internalId:  '',
customField: '20110408-114730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12322',
internalId:  '',
customField: '20110606-130319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12343',
internalId:  '',
customField: '20080807-193440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20090426-094431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20301',
internalId:  '',
customField: '20080517-184526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12406',
internalId:  '',
customField: '20110408-132529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '969',
internalId:  '',
customField: '20080807-195921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20080517-203441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33510',
internalId:  '',
customField: '20090528-065401'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3AH';
var companyName   = '+++MAMA+STELLA%27S+RISTORANTE+ITALIANO';
var htmlTitle	  = 'MAMA+STELLAS+RISTORANTE+ITALIANO%2C+BRYANS+ROAD%2C+MD';
var metaKeywords  = 'Northern+Italian+Restaurant%2C+American+and+Greek+specials%2C+seafood%2C+wedding+rehearsals%2C+wedding+receptions%2C+lunch+and%2For+dinner+meetings%2C+christenings%2C+birthdays%2C+anniversaries%2C+proms%2C+graduation%2C+parties%2C+family+reunions';
var metaContents  = 'Italian%2FSeafood+Dine-in%2C+Carry-out%2C+Banquet%2FReception+facilities+Family+Restaurant%2C+Bryans+Road%2C+Charles+County%2C+MD+close+to+Waldorf%2C+LaPlata%2C+Port+Tobacco+on+Indian+Head+Highway+serving+American+and+Greek+specials%2C+seafood+and+Northern+Italian+cuisine%2C+karaoke+Th+%26+Fri+nites';
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();
};

