/* [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','401',jdecode('Con%C3%B3cenos'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','5222',jdecode('Este+Mes+en+La+Bistecca+'),jdecode(''),'/5222.html','true',[],'',''],
	['PAGE','5264',jdecode('Realice+su+reserva+AQUI'),jdecode(''),'/5264.html','true',[],'',''],
	['PAGE','5306',jdecode('Promociones'),jdecode(''),'/5306.html','true',[],'',''],
	['PAGE','42201',jdecode('Turismo'),jdecode(''),'/42201.html','true',[],'',''],
	['PAGE','26506',jdecode('Libro+de+visitas'),jdecode(''),'/26506/index.html','true',[ 
		['PAGE','26501',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/26506/26501.html','true',[],'','']
	],'',''],
	['PAGE','85912',jdecode('Algunas+fotos+del+mes'),jdecode(''),'/85912.html','false',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Simple';
theSitetree.paletteFamily='C1BCB6';
theSitetree.keyvisualId='2573';
theSitetree.keyvisualName='italienisch.jpg';
theSitetree.fontsetId='10346';
theSitetree.graphicsetId='10456';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='c1bcb6';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Simple',
				paletteFamily: 	'C1BCB6',
				keyvisualId: 	'2573',
				keyvisualName: 	'italienisch.jpg',
				fontsetId: 		'10346',
				graphicsetId: 	'10456',
				contentColor: 	'000000',
				contentBGColor: 'c1bcb6',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'857157',
				e_color: 		'FFFFFF',
				f_color: 		'817E7E',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-26506avec10inepfn']={
webappId:    '1002',
documentId:  '26506',
internalId:  '26506avec10inepfn',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-354']={
webappId:    '7008',
documentId:  '5264',
internalId:  '354',
customField: 'language:es;country:ES;'
};
webappMappings['1501']=webappMappings['1501-9749423']={
webappId:    '1501',
documentId:  '401',
internalId:  '9749423',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100827-110310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5222',
internalId:  '',
customField: '20100803-021600'
};
webappMappings['7008']=webappMappings['7008-355']={
webappId:    '7008',
documentId:  '42201',
internalId:  '355',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5306',
internalId:  '',
customField: '20100827-130051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5264',
internalId:  '',
customField: '20100628-045516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26506',
internalId:  '',
customField: '20100307-124736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26501',
internalId:  '',
customField: '20080804-143933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42201',
internalId:  '',
customField: '20090807-203129'
};
webappMappings['7008']=webappMappings['7008-4043']={
webappId:    '7008',
documentId:  '5306',
internalId:  '4043',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-cc44847b29c63db78c2579c9dd7f9dc1']={
webappId:    '7060',
documentId:  '85912',
internalId:  'cc44847b29c63db78c2579c9dd7f9dc1',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85912',
internalId:  '',
customField: '20090710-210233'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INEPFN';
var companyName   = 'LA+BISTECCA+*Una+experiencia+gastron%C3%B3mica%2C+sin+l%C3%ADmite*';
var htmlTitle	  = 'LA+BISTECCA';
var metaKeywords  = 'turismo%2C+bistecca%2C+bistecca+lima%2C+bisteca%2C+visteka%2C+bisteka%2C+lima%2C+turismo%2C+food%2C+cristian+bravo%2C+restobar%2C+gaston+acurio%2C+gastronomia%2C+dino+lercari%2C+marisol+qui%C3%B1ones%2C+alfredo+cisneros%2C+rodrigo%2C+restaurant%2C+parrillas%2C+carnes%2C+pastas%2C+pizza%2C+maki%2C+roll%2C+ensaladas%2C+dieta%2C+comida%2C+mesa%2C+servicio%2C+cocina%2C+show%2C+mozos%2C+tour%2C+guis%2C+turismo%2C+cosmopolita%2C+hambre%2C+queirolo%2C+pisco%2C+bebida%2C+italiano%2C+italiana%2C+marisol+qui%C3%B1ones%2C+facebook%2C+bisteca%2C+visteka%2C+visteca';
var metaContents  = 'La+Bistecca+en+Lima+Restaurante+Buffet+con+cocina+showUna+experiencia+divertida+y+sin+l%C3%ADmite%21';
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();
};
