/* [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','2001',jdecode('Home'),jdecode(''),'/2001.html','true',[],'',''],
	['PAGE','20901',jdecode('Lunch+Buffet'),jdecode(''),'/20901.html','true',[],'',''],
	['PAGE','20922',jdecode('Dinner+Buffet'),jdecode(''),'/20922.html','true',[],'',''],
	['PAGE','34201',jdecode('Kids+Buffet'),jdecode(''),'/34201.html','true',[],'',''],
	['PAGE','20943',jdecode('Take+Out+Menu'),jdecode(''),'/20943/index.html','true',[ 
		['PAGE','30401',jdecode('Appetizers'),jdecode(''),'/20943/30401.html','true',[],'',''],
		['PAGE','31401',jdecode('South+Indian+Specialties'),jdecode(''),'/20943/31401.html','true',[],'',''],
		['PAGE','30422',jdecode('Vegetarian+Specialties'),jdecode(''),'/20943/30422.html','true',[],'',''],
		['PAGE','30443',jdecode('Chicken+Specialties'),jdecode(''),'/20943/30443.html','true',[],'',''],
		['PAGE','30464',jdecode('Lamb+Specialties'),jdecode(''),'/20943/30464.html','true',[],'',''],
		['PAGE','30485',jdecode('Sea+Food+Specialties'),jdecode(''),'/20943/30485.html','true',[],'',''],
		['PAGE','30506',jdecode('Rice+Specialties'),jdecode(''),'/20943/30506.html','true',[],'',''],
		['PAGE','30527',jdecode('Breads'),jdecode(''),'/20943/30527.html','true',[],'',''],
		['PAGE','30548',jdecode('Desserts'),jdecode(''),'/20943/30548.html','true',[],'',''],
		['PAGE','30569',jdecode('Others'),jdecode(''),'/20943/30569.html','true',[],'',''],
		['PAGE','31422',jdecode('Hot+%26+Cold+Beverages'),jdecode(''),'/20943/31422.html','true',[],'','']
	],'',''],
	['PAGE','20964',jdecode('Catering+Menu'),jdecode(''),'/20964.html','true',[],'',''],
	['PAGE','20985',jdecode('Party+at+Sneha'),jdecode(''),'/20985.html','true',[],'',''],
	['PAGE','21006',jdecode('Banquet+Hall'),jdecode(''),'/21006.html','true',[],'',''],
	['PAGE','21201',jdecode('Reservations'),jdecode(''),'/21201.html','true',[],'',''],
	['PAGE','21222',jdecode('Up+Coming+Events'),jdecode(''),'/21222.html','true',[],'',''],
	['PAGE','21027',jdecode('How+To+Find+Us'),jdecode(''),'/21027.html','true',[],'',''],
	['PAGE','5122',jdecode('Photo+Gallery'),jdecode(''),'/5122.html','true',[],'',''],
	['PAGE','46301',jdecode('Video+gallery'),jdecode(''),'/46301.html','true',[],'',''],
	['PAGE','2722',jdecode('Directions'),jdecode(''),'/2722.html','true',[],'',''],
	['PAGE','2848',jdecode('Contact'),jdecode(''),'/2848.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Round';
theSitetree.paletteFamily='CC3333';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='439';
theSitetree.graphicsetId='495';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='e47272';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Round',
				paletteFamily: 	'CC3333',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'439',
				graphicsetId: 	'495',
				contentColor: 	'FFFFFF',
				contentBGColor: 'e47272',
				a_color: 		'e47272',
				b_color: 		'CC3333',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20100702-083903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20922',
internalId:  '',
customField: '20100607-111802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20901',
internalId:  '',
customField: '20100607-111514'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21027',
internalId:  '',
customField: '20100420-121543'
};
webappMappings['7008']=webappMappings['7008-6751']={
webappId:    '7008',
documentId:  '21201',
internalId:  '6751',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5122',
internalId:  '',
customField: '20100420-121513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2722',
internalId:  '',
customField: '20100420-120232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2848',
internalId:  '',
customField: '20100420-121317'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '21027',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46301',
internalId:  '',
customField: '20100607-112018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20943',
internalId:  '',
customField: '20100420-121828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20964',
internalId:  '',
customField: '20100420-121802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20985',
internalId:  '',
customField: '20100420-121737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21006',
internalId:  '',
customField: '20100420-121711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21201',
internalId:  '',
customField: '20100420-121633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21222',
internalId:  '',
customField: '20100621-094746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30401',
internalId:  '',
customField: '20100607-113941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31401',
internalId:  '',
customField: '20100420-121950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30422',
internalId:  '',
customField: '20100420-122011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30443',
internalId:  '',
customField: '20100420-122044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30464',
internalId:  '',
customField: '20100420-122126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30485',
internalId:  '',
customField: '20100420-122152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30506',
internalId:  '',
customField: '20100420-115200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30527',
internalId:  '',
customField: '20100420-122227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30548',
internalId:  '',
customField: '20100420-122254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30569',
internalId:  '',
customField: '20100420-122317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31422',
internalId:  '',
customField: '20100420-122344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20100420-113325'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INE1TX';
var companyName   = 'Sneha+South+%26+North+Indian+Restaurant';
var htmlTitle	  = 'Sneha%2C+Indian+buffet%2C+Indian+restaurant%2CBanquet+hall%2CParty+hall%2Cdinner+buffet%2Clunch+buffet';
var metaKeywords  = 'Sneha%2C+Sneha+buffet%2C+Sneha+Restaurant%2C+Sneha+Banquet+Hall%2C+Sneha+Party+Hall%2C+Grand+Indian+Buffet%2C+Indian+Buffet%2C+Indian+Dinner+Buffet%2C+Indian+Lunch+Buffet%2C';
var metaContents  = 'Indian+Cuisine%2C+Indian+food+catering%2C+Indian+buffet%2C+Wedding+party%2C+Birthday+party.';
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();
};

