/* [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','701',jdecode('Inicio'),jdecode(''),'/701/index.html','true',[ 
		['PAGE','10901',jdecode('TIENDA+ONLINE'),jdecode(''),'/701/10901.html','true',[],'',''],
		['PAGE','38701',jdecode('Portadas+anteriores'),jdecode(''),'/701/38701.html','true',[],'',''],
		['PAGE','30901',jdecode('Versi%C3%B3n+Digital'),jdecode(''),'/701/30901.html','true',[],'',''],
		['PAGE','18201',jdecode('Videos...'),jdecode(''),'/701/18201.html','true',[],'',''],
		['PAGE','23401',jdecode('Bolsa+de+Trabajo'),jdecode(''),'/701/23401.html','true',[],'',''],
		['PAGE','33201',jdecode('Nuestros+CLIENTES'),jdecode(''),'/701/33201.html','true',[],'','']
	],'',''],
	['PAGE','752',jdecode('%C2%BFQuienes+somos%3F'),jdecode(''),'/752.html','true',[],'',''],
	['PAGE','773',jdecode('%C2%BFPor+qu%C3%A9+anunciarse%3F'),jdecode(''),'/773.html','true',[],'',''],
	['PAGE','794',jdecode('Distribuci%C3%B3n+y+Tarifas'),jdecode(''),'/794/index.html','true',[ 
		['PAGE','7101',jdecode('Puntos+de+Distribuci%C3%B3n'),jdecode(''),'/794/7101.html','true',[],'','']
	],'',''],
	['PAGE','836',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/836.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Lunch';
theSitetree.paletteFamily='8E0C0A';
theSitetree.keyvisualId='3848';
theSitetree.keyvisualName='kv_3848.jpg';
theSitetree.fontsetId='10491';
theSitetree.graphicsetId='11064';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='B32A28';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Lunch',
				paletteFamily: 	'8E0C0A',
				keyvisualId: 	'3848',
				keyvisualName: 	'kv_3848.jpg',
				fontsetId: 		'10491',
				graphicsetId: 	'11064',
				contentColor: 	'DDDDDD',
				contentBGColor: 'B32A28',
				a_color: 		'8E0C0A',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'E38F68',
				e_color: 		'E38F68',
				f_color: 		'E38F68',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-8733980']={
webappId:    '1501',
documentId:  '701',
internalId:  '8733980',
customField: '1501'
};
webappMappings['4001']=webappMappings['4001-9002795']={
webappId:    '4001',
documentId:  '10901',
internalId:  '9002795',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100823-161403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20100223-185140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20090226-200605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38701',
internalId:  '',
customField: '20100209-223359'
};
webappMappings['7060']=webappMappings['7060-5b66e1ca64e642822dd518d4afd9fdf8']={
webappId:    '7060',
documentId:  '38701',
internalId:  '5b66e1ca64e642822dd518d4afd9fdf8',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20081008-203453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20090522-154216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20100210-130527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20100223-184735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20080205-235648'
};
webappMappings['1002']=webappMappings['1002-23401avec10inzbx9']={
webappId:    '1002',
documentId:  '23401',
internalId:  '23401avec10inzbx9',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23401',
internalId:  '',
customField: '20090221-140435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30901',
internalId:  '',
customField: '20100223-180021'
};
webappMappings['7060']=webappMappings['7060-f9b03b44a4a6c82ad132ef31cb4bf984']={
webappId:    '7060',
documentId:  '33201',
internalId:  'f9b03b44a4a6c82ad132ef31cb4bf984',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-7867']={
webappId:    '7008',
documentId:  '30901',
internalId:  '7867',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33201',
internalId:  '',
customField: '20090527-121909'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZBX9';
var companyName   = 'LE+CHEF+-+Revista+Gastron%C3%B3mica+del+Caribe';
var htmlTitle	  = 'Le+Chef+Revista+Gastronomica+del+Caribe';
var metaKeywords  = 'gastronom%C3%ADa+gastronomia+cocina+comida+soy+chef+chefs+alimentos+alimento+bebida++cancun+playa+del+carmen+quintana+roo+mexico+m%C3%A9xico+mejico+tulum+tul%C3%BAm+cozumel+isla+mujeres+chichen+itza+chichenitza+merida+m%C3%A9rida+asociacion+chefs+asociacion+hoteles+asociaci%C3%B3n+proveedores+bebidas+catering+solidaridad+chetumal+akumal+puerto+morelos+puerto+aventuras+riviera+maya+mayan+riviera+tur%C3%ADstico+cocineros+cocinero+cocinera+cocineras+pasteleros+pasteler%C3%ADa+pasteleria++le+chef+revista+gastron%C3%B3mica+lechef+le+cheff+lecheff+cheff+lechefs+chefs+cheffs++lecheffs+quintana+roo+maya+soychef+gourmet+food+wine++';
var metaContents  = 'gastronom%C3%ADa+gastronomia+cocina+mexicana+comida+mexicana+revistas+revista+gastronomica+alimentos+bebidas+chef+chefs+mexico+quintana+roo+caribe+cancun+riviera+maya+cozumel+tulum+rivieramaya+le+chef+lechef';
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();
};
