/* [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','16001',jdecode('INICIO'),jdecode(''),'/16001/index.html','true',[ 
		['PAGE','130612',jdecode('D%C3%B3nde+estamos'),jdecode(''),'/16001/130612.html','true',[],'','']
	],'',''],
	['PAGE','47801',jdecode('LAS+CASAS'),jdecode(''),'/47801/index.html','true',[ 
		['PAGE','873',jdecode('El+Pajar'),jdecode(''),'/47801/873.html','true',[],'',''],
		['PAGE','7701',jdecode('Casa+de+La+Virgen'),jdecode(''),'/47801/7701.html','true',[],'',''],
		['PAGE','47822',jdecode('Los+Orobales'),jdecode(''),'/47801/47822.html','true',[],'',''],
		['PAGE','119701',jdecode('Opiniones'),jdecode(''),'/47801/119701.html','true',[],'','']
	],'',''],
	['PAGE','80101',jdecode('RESERVA%2FDISPONIBILIDAD'),jdecode(''),'/80101.html','true',[],'',''],
	['PAGE','56201',jdecode('%C3%81LBUM+DE+FOTOS'),jdecode(''),'/56201/index.html','true',[ 
		['PAGE','59701',jdecode('Finca'),jdecode(''),'/56201/59701.html','true',[],'',''],
		['PAGE','56101',jdecode('El+Pajar'),jdecode(''),'/56201/56101.html','true',[],'',''],
		['PAGE','61001',jdecode('Casa+de+La+Virgen'),jdecode(''),'/56201/61001.html','true',[],'','']
	],'',''],
	['PAGE','64922',jdecode('CONT%C3%81CTENOS'),jdecode(''),'/64922/index.html','true',[ 
		['PAGE','65301',jdecode('Cont%C3%A1ctenos+%28follow+up+page%29'),jdecode(''),'/64922/65301.html','true',[],'','']
	],'',''],
	['PAGE','20101',jdecode('ENLACES'),jdecode(''),'/20101.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Evident';
theSitetree.paletteFamily='4C7D51';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10631';
theSitetree.graphicsetId='10775';
theSitetree.contentColor='1F4D23';
theSitetree.contentBGColor='F9F9D6';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Evident',
				paletteFamily: 	'4C7D51',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10631',
				graphicsetId: 	'10775',
				contentColor: 	'1F4D23',
				contentBGColor: 'F9F9D6',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'4C7C50',
				e_color: 		'1F4D23',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20100212-113623'
};
webappMappings['7060']=webappMappings['7060-12cbbcc9c98753358d7230ff3c6d3361']={
webappId:    '7060',
documentId:  '59701',
internalId:  '12cbbcc9c98753358d7230ff3c6d3361',
customField: 'language:es;country:ES;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '16001',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-fcb31d9d87330ae9996435617764c518']={
webappId:    '7060',
documentId:  '56101',
internalId:  'fcb31d9d87330ae9996435617764c518',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-469fa473a1bd8078e954fee7e1b87cf1']={
webappId:    '7060',
documentId:  '61001',
internalId:  '469fa473a1bd8078e954fee7e1b87cf1',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80101',
internalId:  '',
customField: '20091104-222457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47801',
internalId:  '',
customField: '20091005-105950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20071117-203953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47822',
internalId:  '',
customField: '20071117-204107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56201',
internalId:  '',
customField: '20080709-195459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64922',
internalId:  '',
customField: '20070723-112913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20090422-101758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '873',
internalId:  '',
customField: '20090729-233239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59701',
internalId:  '',
customField: '20081022-210712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56101',
internalId:  '',
customField: '20070629-005658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61001',
internalId:  '',
customField: '20070629-005728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65301',
internalId:  '',
customField: '20070723-112608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119701',
internalId:  '',
customField: '20100219-091730'
};
webappMappings['7008']=webappMappings['7008-7235']={
webappId:    '7008',
documentId:  '64922',
internalId:  '7235',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130612',
internalId:  '',
customField: '20081203-112727'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20IN3C59';
var companyName   = 'Finca+Casa+de+La+Virgen+-+turismo+rural';
var htmlTitle	  = 'Finca+Casa+de+La+Virgen+-+Turismo+rural+en+Canarias';
var metaKeywords  = 'finca%2C+turismo%2C+casa%2C+rural%2C+virgen%2C+pajar%2C+valleseco%2C+gran+canaria%2C+islas%2C+canarias%2C+barranco%2C+kanaren%2C+country%2C+house%2C+gite%2C+rural';
var metaContents  = 'Finca+Casa+de+La+Virgen%2C+alquiler+de+casa+para+turismo+rural+El+Pajar+de+Casa+de+la+Virgen+en+Valleseco+%28Gran+Canaria+-Islas+Canarias%29%2C+enclavada+en+el+Barranco+de+la+Virgen+dentro+del+Parque+Rural+de+Doramas.';
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();
};
