/* [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','185256',jdecode('FELIZ+ANO+NOVO'),jdecode(''), jdecode('%2F185256.html'), 'false',[],'',''],
	['PAGE','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','158034',jdecode('GRUPIM+-+NEWS'),jdecode(''), jdecode('%2F158034.html'), 'true',[],'',''],
	['PAGE','9201',jdecode('QUEM+SOMOS'),jdecode(''), jdecode('%2F9201.html'), 'true',[],'',''],
	['PAGE','36001',jdecode('AMBIENTES'),jdecode(''), jdecode('%2F36001.html'), 'true',[],'',''],
	['PAGE','113934',jdecode('EVENTOS+-+FESTAS'),jdecode(''), jdecode('%2F113934.html'), 'true',[],'',''],
	['PAGE','32501',jdecode('PROMO%C3%87%C3%83O+LOCAL'),jdecode(''), jdecode('%2F32501.html'), 'true',[],'',''],
	['PAGE','36022',jdecode('DELIVERY'),jdecode(''), jdecode('%2F36022.html'), 'true',[],'',''],
	['PAGE','9222',jdecode('CARD%C3%81PIO'),jdecode(''), jdecode('%2F9222%2Findex.html'), 'true',[ 
		['PAGE','24001',jdecode('Expressos'),jdecode(''), jdecode('%2F9222%2F24001.html'), 'true',[],'',''],
		['PAGE','178156',jdecode('Os+Fil%C3%A9s+Cl%C3%A1ssicos'),jdecode(''), jdecode('%2F9222%2F178156.html'), 'true',[],'',''],
		['PAGE','9243',jdecode('Carnes+Verm+Tradic'),jdecode(''), jdecode('%2F9222%2F9243.html'), 'true',[],'',''],
		['PAGE','9264',jdecode('Frangos'),jdecode(''), jdecode('%2F9222%2F9264.html'), 'true',[],'',''],
		['PAGE','9285',jdecode('Peixes'),jdecode(''), jdecode('%2F9222%2F9285.html'), 'true',[],'',''],
		['PAGE','24701',jdecode('Massas'),jdecode(''), jdecode('%2F9222%2F24701.html'), 'true',[],'',''],
		['PAGE','26301',jdecode('FOTOS+Pratos+Carnes'),jdecode(''), jdecode('%2F9222%2F26301.html'), 'true',[],'',''],
		['PAGE','24722',jdecode('Bebidas'),jdecode(''), jdecode('%2F9222%2F24722.html'), 'true',[],'','']
	],'',''],
	['PAGE','10001',jdecode('SUGEST%C3%95ES+DA+SEMANA'),jdecode(''), jdecode('%2F10001.html'), 'true',[],'',''],
	['PAGE','44701',jdecode('RECEITAS'),jdecode(''), jdecode('%2F44701.html'), 'true',[],'',''],
	['PAGE','59401',jdecode('CONV%C3%8ANIOS'),jdecode(''), jdecode('%2F59401.html'), 'true',[],'',''],
	['PAGE','36301',jdecode('LOCALIZA%C3%87%C3%83O'),jdecode(''), jdecode('%2F36301.html'), 'true',[],'',''],
	['PAGE','36322',jdecode('FALE+CONOSCO'),jdecode(''), jdecode('%2F36322.html'), 'true',[],'',''],
	['PAGE','63906',jdecode('Livro+de+visitas%2FF%C3%B3rum'),jdecode(''), jdecode('%2F63906%2Findex.html'), 'true',[ 
		['PAGE','63901',jdecode('Servi%C3%A7o+de+bilhetes'),jdecode(''), jdecode('%2F63906%2F63901.html'), 'false',[],'','']
	],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Clearline';
theSitetree.paletteFamily='885A11';
theSitetree.keyvisualId='3294';
theSitetree.keyvisualName='kv_3294.jpg';
theSitetree.fontsetId='10421';
theSitetree.graphicsetId='10717';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0X9A9'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Clearline',
				paletteFamily: 	'885A11',
				keyvisualId: 	'3294',
				keyvisualName: 	'kv_3294.jpg',
				fontsetId: 		'10421',
				graphicsetId: 	'10717',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'885A11',
				e_color: 		'989696',
				f_color: 		'989696',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-b49535538f9901e238f0bcc882fb196a']={
webappId:    '7060',
documentId:  '26301',
internalId:  'b49535538f9901e238f0bcc882fb196a',
customField: 'language:pt;country:BR;'
};
webappMappings['1002']=webappMappings['1002-63906avec10inf18q']={
webappId:    '1002',
documentId:  '63906',
internalId:  '63906avec10inf18q',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20120118-201553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20120201-201244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20110626-204820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36001',
internalId:  '',
customField: '20110626-205004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32501',
internalId:  '',
customField: '20110807-172439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36022',
internalId:  '',
customField: '20110807-172347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9222',
internalId:  '',
customField: '20110925-183844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24001',
internalId:  '',
customField: '20110925-170920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9243',
internalId:  '',
customField: '20110925-183934'
};
webappMappings['1501']=webappMappings['1501-8952185']={
webappId:    '1501',
documentId:  '401',
internalId:  '8952185',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9264',
internalId:  '',
customField: '20110921-205407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9285',
internalId:  '',
customField: '20110921-210716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20110611-210557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26301',
internalId:  '',
customField: '20090308-170515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24722',
internalId:  '',
customField: '20110611-210948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44701',
internalId:  '',
customField: '20091231-130910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59401',
internalId:  '',
customField: '20110807-173240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36301',
internalId:  '',
customField: '20110611-211148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36322',
internalId:  '',
customField: '20110801-211438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63906',
internalId:  '',
customField: '20080712-215557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63901',
internalId:  '',
customField: '20080712-215557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '185256',
internalId:  '',
customField: '20111229-193954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113934',
internalId:  '',
customField: '20110604-211012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '178156',
internalId:  '',
customField: '20110925-190918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158034',
internalId:  '',
customField: '20111023-163432'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INF18Q';
var companyName   = 'RASPATACHO+Restaurante';
var htmlTitle	  = 'RASPATACHO+RESTAURANTE';
var metaKeywords  = 'restaurante%2Calmo%C3%A7o%2C%C3%A0+la+carte%2Cdelivery%2Cpratos+delivery%2Cdelivery+faria+lima%2Chappy+hour+pinheiros%2Cdelivery+pinheiros%2Chappy+hour+faria+lima%2Cbar%2Ccarnes%2Cfil%C3%A9s%2C+picanhas%2C+peixes%2Cfrangos%2Csalm%C3%A3o%2C+linguado%2Cpescada%2Catum%2Cbianchi+bertoldi%2C+pinheiros%2Cfaria+lima%2Centrega+em+domicilio%2Cpromocao%2Cpromocoes%2Ccardapio%2Cmeuniere%2C+marinara%2Cmassas%2Clasanha%2C+parmegiana%2Ccontra+file%2Csobremesa%2C+sobremesas%2Cpudim%2Ctiramisu%2C+buffet+saladas';
var metaContents  = 'Restaurante+almo%C3%A7o+%C3%A0+la+carte+em+Pinheiros%2C+Servi%C3%A7o+Delivery%2C+Happy+Hour%2C+Promo%C3%A7%C3%B5es%2C+Card%C3%A1pio+de+cozinha+Euro+Brasileira%3A+Fil%C3%A9s%2C+Picanhas%2C+Frangos%2C+Peixes%2C+Buffet+de+Saladas+e+Sobremesas+inclusos+no+pre%C3%A7o.+Almo%C3%A7o+das+11%3A15+%C3%A0s+16%3A00+h+-+Happy+Hour+a+partir+de+17%3A30+h%2C+de+2%C2%AA+a+6%C2%AA.';
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();
};

