/* [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','9101',jdecode('Home'),jdecode(''),'/9101.html','true',[],'',''],
	['PAGE','9194',jdecode('Menu'),jdecode(''),'/9194.html','true',[],'',''],
	['PAGE','29001',jdecode('Soup+of+the+day'),jdecode(''),'/29001.html','true',[],'',''],
	['PAGE','9257',jdecode('Coupon'),jdecode(''),'/9257.html','true',[],'',''],
	['PAGE','9236',jdecode('About+us'),jdecode(''),'/9236.html','true',[],'',''],
	['PAGE','9215',jdecode('How+to+contact+us.'),jdecode(''),'/9215.html','true',[],'','']];
var siteelementCount=6;
theSitetree.topTemplateName='Longsights';
theSitetree.paletteFamily='BDE390';
theSitetree.keyvisualId='6384';
theSitetree.keyvisualName='kv_6384.jpg';
theSitetree.fontsetId='11157';
theSitetree.graphicsetId='11966';
theSitetree.contentColor='124507';
theSitetree.contentBGColor='EDFCB2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Longsights',
				paletteFamily: 	'BDE390',
				keyvisualId: 	'6384',
				keyvisualName: 	'kv_6384.jpg',
				fontsetId: 		'11157',
				graphicsetId: 	'11966',
				contentColor: 	'124507',
				contentBGColor: 'EDFCB2',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20100827-121445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9194',
internalId:  '',
customField: '20100706-150041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9236',
internalId:  '',
customField: '20100817-074622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9215',
internalId:  '',
customField: '20100706-143023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9257',
internalId:  '',
customField: '20100817-074034'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '9101',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-9237954']={
webappId:    '1501',
documentId:  '9101',
internalId:  '9237954',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29001',
internalId:  '',
customField: '20100827-121627'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2B2Y';
var companyName   = '+++++++++++++++++Wholesome+-+Healthy+-+Delicious+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++';
var htmlTitle	  = 'Jaluka+Natural+Bistro%2C++enjoy+a+Fresh%2C+Wholesome%2C+Healthy+and+Delicious+MEAL%21++++Authentic+ACAI++Berry.+';
var metaKeywords  = 'ACAI+BERRY%2C+Veggie+Juices%2CAcai%2C+Chapel+Hill%2C+Acai+PULP%2C+JALUKA%2C+NATURAL%2C+Jaluka%2C++Jaluka+Natural%2C+natural+foods%2C+pita++sandwiches%2C+basil+dill+roll%2C+whole+wheat%2C+sesame+pitas%2C+natural+juices%2C+vegetable+juices%2C+veggie+juices%2C+Brasilian%2C+Brazilian%2C+vegetables%2C+healthy%2C+snacks%2C+coffee%2C+chapel+Hill%2C+eats%2C+juices%2C+fresh%2C+jaluka%2C+baked+goods%2C+a%C3%A7ai%2C+bananas%2C+guarana%2C+delicious%2C+swiss+lemonade%2C+brazilian+limeade%2C+pao+de+queijo%2C+Southern+Village%2C+Carborro%2C+fine+food%2C+good+eats%2C+north+carolina%2C+juices%2C+pao+de+queijo%2C+A%C3%A7ai%2C+bananas%2C+thai+chicken+wraps%2Ctofu%2C+hommus%2C+red+bull%2Cfresh%2C+natural%2C+acai+benefits%2Cacai+berries%2Cacai+berry%2Cacai+berry+juice%2C+acai+drink%2Cacai+extract%2Cacai+fruit%2Cacai+juice%2C+acai+pulp%2C+all+natural+foods%2C+fast+natural+food%2C+fast+natural+foods%2C+beet+juice%2C+beetroot+juice%2C+best+coffee%2C+where+to+buy+acai%2C+cafe%2C+caf%C3%A9%2C+caf%C3%A9+bistro%2C+carrot+juice%2C+coffe+shop%2C+coffe+shops%2C+coffee%2C+coffee+bean%2C+coffee+%2C+eans%2C+coffee+business%2C+coffee+cup%2C+coffee+cups%2C+coffee+drinks%2C+coffee+house%2C+coffee%2C+coffee+shop%2C+coffee+shops%2C+coffee+tea%2C+coffeehouse%2C+coffees%2C+coffeeshop%2C+decaf+coffee%2C+espresso%2C+espresso+coffee%2Cespresso+coffee+maker%2C+espressos%2C+food%2C+fresh+coffee%2C+fresh+fruit+%2C+Juice%2C+fresh+juice%2C+fresh+juices%2C+fresh+squeezed+juice%2C+fruit%2C+fruit+juice%2C+fruit+juices%2C+fruit+smoothiefruit+smoothies%2C+health+food%2C+health+food+stores%2C+health+foods%2C+health+stores%2C+healthy+coffeehealthy+food%2C+healthy+foods%2C+healthy+juices%2C+healthy+smoothie%2C+healthy+smoothieshot+chocolate%2C+ice+latte%2C+juice%2C+juices%2C+juicing%2C+lunch+caf%C3%A9%2C+healthy+muffins%2C+natural+dietnatural+food%2C+natural+food+store%2C+natural+foods%2C+natural+health+foods%2C+natural+juicenatural+products%2C+neighborhood+restaurant%2C+food%2C+pastries%2C+raw+food+diet%2C+restaurantrestaurants%2C+sandwiches%2C+smoothie%2C+smoothie+bar%2C+smoothie+maker%2C+smoothie+makerssmoothies%2C+smoothies+recipes%2C+smoothy%2C+vegetable+juice%2C+vegetable+juices%2C+vegetable+juicingvegetarian+food%2CWe+opt+for+fresh+quality+items+to+maximize+your+health+potential.+We++prefer+natural+foods+that+are+healthy+and+delicious.+Whole+Wheat+or+Sesame+Pita+sandwiches%2C+No+preservative+breads%2C+Natural+Fruit+Smoothies%2C+A%C3%A7ai+Smoothies%2C+Daily+Baked+Goods%2C+High+Quality+Soups%2C+and+Salads.+We+have+awesome+coffee+too';
var metaContents  = 'Home+of+the+Real+Brazilian+Acai+Berry.++Natural+foods+that+are+healthy+and+delicious.+Whole+Wheat+or+Sesame+Pita+sandwiches%2C+No+preservative+breads%2C+Natural+Fruit+Smoothies%2C+Freshly+squeezed+juices%2C+A%C3%A7ai+Smoothies%2C+Daily+Baked+Goods%2C+High+Quality+Soups%2C+and+Salads.+We+have+awesome+coffee+too.+We+opt+for+fresh+quality+items+to+maximize+your+health+potential.+';
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();
};
