/* [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','4596',jdecode('INICIO'),jdecode(''),'/4596.html','true',[],'',''],
	['PAGE','4680',jdecode('CIRCUITOS'),jdecode(''),'/4680.html','true',[],'',''],
	['PAGE','94532',jdecode('DESIERTO'),jdecode(''),'/94532/index.html','true',[ 
		['PAGE','96932',jdecode('DESIERTO+%28follow+up+page%29'),jdecode(''),'/94532/96932.html','false',[],'','']
	],'',''],
	['PAGE','94553',jdecode('ATLAS'),jdecode(''),'/94553/index.html','true',[ 
		['PAGE','98532',jdecode('ATLAS+%28follow+up+page%29'),jdecode(''),'/94553/98532.html','false',[],'','']
	],'',''],
	['PAGE','94574',jdecode('KASBAHS'),jdecode(''),'/94574/index.html','true',[ 
		['PAGE','99032',jdecode('KASBAHS+%28follow+up+page%29'),jdecode(''),'/94574/99032.html','false',[],'','']
	],'',''],
	['PAGE','59132',jdecode('RUTAS+ATL%C3%81NTICO'),jdecode(''),'/59132/index.html','true',[ 
		['PAGE','103432',jdecode('RUTAS+VERANO+%28follow+up+page%29'),jdecode(''),'/59132/103432.html','false',[],'','']
	],'',''],
	['PAGE','16101',jdecode('4X4+%22A+LA+CARTA%22+'),jdecode(''),'/16101/index.html','true',[ 
		['PAGE','101632',jdecode('4X4+%22A+LA+CARTA%22++%28follow+up+page%29'),jdecode(''),'/16101/101632.html','false',[],'',''],
		['PAGE','19004',jdecode('Viajes+Activos'),jdecode(''),'/16101/19004.html','true',[],'','']
	],'',''],
	['PAGE','52632',jdecode('DROMEDARIOS'),jdecode(''),'/52632/index.html','true',[ 
		['PAGE','106132',jdecode('DROMEDARIOS+%28follow+up+page%29'),jdecode(''),'/52632/106132.html','false',[],'','']
	],'',''],
	['PAGE','118832',jdecode('Te+a%C3%B1ades+al+grupo..%3F'),jdecode(''),'/118832/index.html','true',[ 
		['PAGE','46332',jdecode('Puente+Diciembre'),jdecode(''),'/118832/46332.html','true',[],'',''],
		['PAGE','112632',jdecode('FIN+DE+A%C3%91O+desde+FEZ'),jdecode(''),'/118832/112632.html','true',[],'',''],
		['PAGE','35432',jdecode('FIN+DE+A%C3%91O+MARRAKECH'),jdecode(''),'/118832/35432.html','true',[],'','']
	],'',''],
	['PAGE','23101',jdecode('Semana+Santa'),jdecode(''),'/23101/index.html','true',[ 
		['PAGE','111532',jdecode('Semana+Santa+%28follow+up+page%29'),jdecode(''),'/23101/111532.html','false',[],'','']
	],'',''],
	['PAGE','4653',jdecode('NOMAD+PALACE+HOTEL'),jdecode(''),'/4653/index.html','true',[ 
		['PAGE','17501',jdecode('Haimas'),jdecode(''),'/4653/17501.html','true',[],'','']
	],'',''],
	['PAGE','62232',jdecode('Plazas+libres'),jdecode(''),'/62232.html','true',[],'',''],
	['PAGE','23364',jdecode('Vuestras+FOTOS'),jdecode(''),'/23364.html','true',[],'',''],
	['PAGE','34532',jdecode('Vuestras+CARTAS'),jdecode(''),'/34532.html','true',[],'',''],
	['PAGE','24101',jdecode('CONTACTO'),jdecode(''),'/24101/index.html','true',[ 
		['PAGE','85832',jdecode('CONTACTO+%28follow+up+page%29'),jdecode(''),'/24101/85832.html','false',[],'','']
	],'',''],
	['PAGE','101832',jdecode('LINKS'),jdecode(''),'/101832.html','true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Airplane';
theSitetree.paletteFamily='FCFDC9';
theSitetree.keyvisualId='10199';
theSitetree.keyvisualName='airplane_modern.swf';
theSitetree.fontsetId='21114';
theSitetree.graphicsetId='13214';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='BBC9A6';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Airplane',
				paletteFamily: 	'FCFDC9',
				keyvisualId: 	'10199',
				keyvisualName: 	'airplane_modern.swf',
				fontsetId: 		'21114',
				graphicsetId: 	'13214',
				contentColor: 	'000000',
				contentBGColor: 'BBC9A6',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-c0d70fbb39fd3987836b14623221b4f4']={
webappId:    '7060',
documentId:  '23364',
internalId:  'c0d70fbb39fd3987836b14623221b4f4',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4596',
internalId:  '',
customField: '20100306-212020'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4596',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-3097872']={
webappId:    '1501',
documentId:  '4596',
internalId:  '3097872',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46332',
internalId:  '',
customField: '20091111-211155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94532',
internalId:  '',
customField: '20091121-181321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35432',
internalId:  '',
customField: '20091217-183356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4653',
internalId:  '',
customField: '20100123-120746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20091010-230306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4680',
internalId:  '',
customField: '20091111-204803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52632',
internalId:  '',
customField: '20091111-205259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20091010-202107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20091010-221932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19004',
internalId:  '',
customField: '20091009-223502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59132',
internalId:  '',
customField: '20091009-223313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23364',
internalId:  '',
customField: '20070710-023405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34532',
internalId:  '',
customField: '20070713-013605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24101',
internalId:  '',
customField: '20100306-205856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62232',
internalId:  '',
customField: '20100123-121315'
};
webappMappings['7008']=webappMappings['7008-7033']={
webappId:    '7008',
documentId:  '52632',
internalId:  '7033',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85832',
internalId:  '',
customField: '20090412-161504'
};
webappMappings['7008']=webappMappings['7008-7034']={
webappId:    '7008',
documentId:  '94532',
internalId:  '7034',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94553',
internalId:  '',
customField: '20091120-203657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94574',
internalId:  '',
customField: '20091009-223229'
};
webappMappings['7008']=webappMappings['7008-7035']={
webappId:    '7008',
documentId:  '94553',
internalId:  '7035',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96932',
internalId:  '',
customField: '20090821-212042'
};
webappMappings['7008']=webappMappings['7008-7036']={
webappId:    '7008',
documentId:  '94574',
internalId:  '7036',
customField: 'language:es;country:ES;'
};
webappMappings['7008']=webappMappings['7008-7037']={
webappId:    '7008',
documentId:  '16101',
internalId:  '7037',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98532',
internalId:  '',
customField: '20090823-225002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99032',
internalId:  '',
customField: '20090823-234731'
};
webappMappings['7008']=webappMappings['7008-7038']={
webappId:    '7008',
documentId:  '59132',
internalId:  '7038',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101832',
internalId:  '',
customField: '20100305-221505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101632',
internalId:  '',
customField: '20091007-164815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103432',
internalId:  '',
customField: '20091007-190859'
};
webappMappings['7008']=webappMappings['7008-7039']={
webappId:    '7008',
documentId:  '23101',
internalId:  '7039',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106132',
internalId:  '',
customField: '20091007-212449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111532',
internalId:  '',
customField: '20091010-220756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112632',
internalId:  '',
customField: '20091128-232146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118832',
internalId:  '',
customField: '20100116-195536'
};
webappMappings['7008']=webappMappings['7008-7032']={
webappId:    '7008',
documentId:  '24101',
internalId:  '7032',
customField: 'language:es;country:ES;'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010INEWQO';
var companyName   = 'GAGATRAVEL%2C+Viajes+por+Marruecos+%22a+la+carta%22+';
var htmlTitle	  = '';
var metaKeywords  = 'viajes+marruecos%2C+turismo+marruecos%2C++merzouga%2C++rutas++4x4%2C+circuitos+marruecos%2C+trekking%2C+quads%2C++dromedarios%2C+expediciones+sahara%2C+hoteles+marruecos%2C+dunas+merzouga%2C++alojamiento+marruecos%2C+fin+de+a%EF%BF%BDo%2Csemana+santa%2C+marruecos%2C+Marruecos%2C+viajes+por+marruecos%2C+maroc%2C+marroc%2C+Marrakech%2C+Fez%2C+bereber%2C+tagine%2C+harira%2C+cuscus%2C+';
var metaContents  = 'VIAJES+MARRUECOS%2C+CIRCUITOS+MARRUECOS.+RUTAS+4X4+MARRUECOS%2C+RUTAS+DESIERTO+%2CMARRUECOS%2C+RUTAS+ATLAS+MARRUECOS+%2C+VIAJE+AVENTURA+MARRUECOS%2C+TREKKINGS+MARRUECOS%2C+HAIMAS+MARRUECOS%2C+CAMELTREKS+MARRUECOS%2C+TURISMO+MARRUECOS++++';
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();
};
