/* [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','1001',jdecode('Home'),jdecode(''),'/1001.html','true',[],'',''],
	['PAGE','1052',jdecode('About+us'),jdecode(''),'/1052.html','true',[],'',''],
	['PAGE','84301',jdecode('Event+Calendar'),jdecode(''),'/84301.html','true',[],'',''],
	['PAGE','6022',jdecode('Employment+Opportunities'),jdecode(''),'/6022.html','true',[],'',''],
	['PAGE','1115',jdecode('Menu'),jdecode(''),'/1115.html','true',[],'',''],
	['PAGE','1136',jdecode('Wine+menu'),jdecode(''),'/1136.html','true',[],'',''],
	['PAGE','94301',jdecode('Weekend+Breakfast+%26+Lunch+Menus'),jdecode(''),'/94301.html','true',[],'',''],
	['PAGE','15201',jdecode('Function+Menu+1'),jdecode(''),'/15201.html','true',[],'',''],
	['PAGE','15222',jdecode('Function+Menu+2'),jdecode(''),'/15222.html','true',[],'',''],
	['PAGE','15243',jdecode('Function+Menu+3'),jdecode(''),'/15243.html','true',[],'',''],
	['PAGE','1157',jdecode('Opening+hours'),jdecode(''),'/1157.html','true',[],'',''],
	['PAGE','1178',jdecode('How+to+find+us'),jdecode(''),'/1178.html','true',[],'',''],
	['PAGE','1199',jdecode('Offers+%2F+Specials+'),jdecode(''),'/1199.html','true',[],'',''],
	['PAGE','1220',jdecode('Contact'),jdecode(''),'/1220.html','true',[],'',''],
	['PAGE','7801',jdecode('Speed+Dating'),jdecode(''),'/7801.html','true',[],'',''],
	['PAGE','7822',jdecode('Live+Music'),jdecode(''),'/7822.html','true',[],'',''],
	['PAGE','13206',jdecode('Guestbook'),jdecode(''),'/13206/index.html','true',[ 
		['PAGE','13201',jdecode('Read+Guestbook'),jdecode(''),'/13206/13201.html','false',[],'','']
	],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='936';
theSitetree.keyvisualName='weisswein.jpg';
theSitetree.fontsetId='167';
theSitetree.graphicsetId='197';
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: 			'NewYork',
				paletteFamily: 	'660000',
				keyvisualId: 	'936',
				keyvisualName: 	'weisswein.jpg',
				fontsetId: 		'167',
				graphicsetId: 	'197',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'660000',
				c_color: 		'000000',
				d_color: 		'990000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1001',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-13206aen020in26f3']={
webappId:    '1002',
documentId:  '13206',
internalId:  '13206aen020in26f3',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20100131-101608'
};
webappMappings['1501']=webappMappings['1501-7971931']={
webappId:    '1501',
documentId:  '1001',
internalId:  '7971931',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84301',
internalId:  '',
customField: '20100131-102421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1052',
internalId:  '',
customField: '20080918-201104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6022',
internalId:  '',
customField: '20091208-082755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1115',
internalId:  '',
customField: '20091201-170135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1136',
internalId:  '',
customField: '20081029-114350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94301',
internalId:  '',
customField: '20081203-114256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20091118-091118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15222',
internalId:  '',
customField: '20091118-092010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15243',
internalId:  '',
customField: '20091118-092717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1157',
internalId:  '',
customField: '20100131-104447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1178',
internalId:  '',
customField: '20080813-132255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1199',
internalId:  '',
customField: '20100131-103604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1220',
internalId:  '',
customField: '20070117-175357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7801',
internalId:  '',
customField: '20100131-103751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7822',
internalId:  '',
customField: '20100131-104223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13206',
internalId:  '',
customField: '20070406-010226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20070406-010322'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN020IN26F3';
var companyName   = '+Valentino%27s+Cafe+Restaurant';
var htmlTitle	  = 'Valentinos+Cafe+Restaurant+The+Italian+Cuisine+Function+Specialists+in+Heathmont+Ringwood+and+the+Eastern+Suburbs+of+Melbourne';
var metaKeywords  = 'Cafe+Heathmont+Melbourne+Cafes+Italian+Restaurant+Restaurants+Valentinos+Dinner+Lunch+Breakfast+Brunch+Supper+Snack+Snacks+Food+Foods+Drink+Drinks+Eat+Eating+Drinking+Steak+Seafood+Seafoods+Steaks+Pasta+Risotto+Rissoto+Rissotto+Pizza+Pizzas+Celiac+Gluten+Free+Bar+Family+Kids+Children+Ringwood+Bayswater+Croydon+Vermont+Wantirna+Knox+Kilsyth+Lilydale+Doncaster+Warrandyte+Forest+Hill+Waverly+Glen+Mount+Ferntree+Gully';
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();
};
