/* [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('Rest.+El+Mirlo+Blanco'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','473',jdecode('Ubicacc%C3%B3n+%2F+Location'),jdecode(''),'/473.html','true',[],'',''],
	['PAGE','494',jdecode('Horario%2F+Service+Hrs'),jdecode(''),'/494.html','true',[],'',''],
	['PAGE','557',jdecode('Sugerencias%2FMenu+Tips'),jdecode(''),'/557.html','true',[],'',''],
	['PAGE','43301',jdecode('Carta+de+vinos%2F+Wine+List'),jdecode(''),'/43301.html','true',[],'',''],
	['PAGE','11901',jdecode('ALBUM+'),jdecode(''),'/11901.html','true',[],'',''],
	['PAGE','599',jdecode('Reservas+%2FReservations'),jdecode(''),'/599.html','true',[],'',''],
	['PAGE','66712',jdecode('Eventos+%2F+Venues'),jdecode(''),'/66712.html','true',[],'',''],
	['PAGE','54112',jdecode('Prensa+%2F+Press'),jdecode(''),'/54112.html','true',[],'',''],
	['PAGE','49201',jdecode('Cuadros+%2F+Paintings'),jdecode(''),'/49201.html','true',[],'','']];
var siteelementCount=10;
theSitetree.topTemplateName='Ragtime';
theSitetree.paletteFamily='DBC984';
theSitetree.keyvisualId='3572';
theSitetree.keyvisualName='kv_3572.jpg';
theSitetree.fontsetId='10452';
theSitetree.graphicsetId='10848';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Ragtime',
				paletteFamily: 	'DBC984',
				keyvisualId: 	'3572',
				keyvisualName: 	'kv_3572.jpg',
				fontsetId: 		'10452',
				graphicsetId: 	'10848',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'DBC984',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'707272',
				e_color: 		'A99B63',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100726-140817'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '66712',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '401',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20100509-112942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20100622-125435'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20100614-130500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100726-141413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20100509-112828'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '473',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['1501']=webappMappings['1501-10691433']={
webappId:    '1501',
documentId:  '401',
internalId:  '10691433',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-f6c0b7a626d715a4325d83c6ef98b6b9']={
webappId:    '7060',
documentId:  '11901',
internalId:  'f6c0b7a626d715a4325d83c6ef98b6b9',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '49201',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '54112',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43301',
internalId:  '',
customField: '20100726-142138'
};
webappMappings['7008']=webappMappings['7008-6405']={
webappId:    '7008',
documentId:  '599',
internalId:  '6405',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '494',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66712',
internalId:  '',
customField: '20100823-124935'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '557',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54112',
internalId:  '',
customField: '20100509-113355'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '43301',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '11901',
internalId:  '',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49201',
internalId:  '',
customField: '20100215-105022'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '599',
internalId:  '',
customField: 'language:es;country:ES;'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INLUBK';
var companyName   = 'Restaurante+EL+MIRLO+BLANCO';
var htmlTitle	  = '';
var metaKeywords  = 'restaurantes+en+mijas%2C+restaurante+el+mirlo+blanco%2Crestaurant+in+mijas%2Crestaurants+in+mijas%2C++best+resturant+in+mijas%2C++charming+restaurants+mijas%2C+mijas%2C+cocina+vasca%2C+terraza%2C+panoramic+terrace%2Cterrace%2Crestuarant+in+mijas%2Ccomer+en+mijas%2Crestuarante+en+mijas%2C+romantico%2Cromantic+restuarants+in+mijas%2Cromantic+restuarant%2Cpanoramic+terrace%2C+obras+de+arte%2C+cuadros%2C+arte%2Cpinturas%2Cartistas%2C+exibicion+de+arte%2C+paintings%2C+artits%2Crestaurante+en+malaga%2C+cocina+tradicional%2Ccocina+tradicional+vasca+de+mercado%2C+comer+en+mijas%2C+desde+1968%2C+auzmendi%2C+bodas%2C+banquetes%2Ceventos%2C+comidas+para+grupos%2C+venues%2C+venues+in+mijas%2C+comidas+de+empresa%2C+wedings+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++';
var metaContents  = 'restuarante+el+mirlo+blanco+en+mijas%2C+cocina+vasca%2Cauzmendi%2C+terraza+con+vistas%2C+mejor+restuarante+en+mijas%2Ctxangurro%2C+merluza+de+pincho%2Crestaurantes+en+la+costa+del+sol%2C+comedores+con+chimenea%2Crestaurante+mirlo+blanco%2C+restuarant+in+mijas%2Ccuadros%2Cartistas%2Cpinturas%2Carte%2C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++';
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();
};
