/* [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','4676',jdecode('Home'),jdecode(''),'/4676.html','true',[],'',''],
	['PAGE','4940',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/4940/index.html','true',[ 
		['PAGE','9699',jdecode('D%C3%B3nde+encontrarnos'),jdecode(''),'/4940/9699.html','true',[],'','']
	],'',''],
	['PAGE','4967',jdecode('OLMO+10+MUSICA'),jdecode(''),'/4967/index.html','true',[ 
		['PAGE','4994',jdecode('SALAS+DE+ENSAYO'),jdecode(''),'/4967/4994.html','true',[],'',''],
		['PAGE','12534',jdecode('PLANETA+CORCHEA'),jdecode(''),'/4967/12534.html','true',[],'',''],
		['PAGE','10501',jdecode('SONORIZACI%C3%93N'),jdecode(''),'/4967/10501.html','true',[],'',''],
		['PAGE','10528',jdecode('ALQUILER+INSTRUMENTOS'),jdecode(''),'/4967/10528.html','true',[],'','']
	],'',''],
	['PAGE','15762',jdecode('Instrumentos'),jdecode(''),'/15762/index.html','true',[ 
		['PAGE','29885',jdecode('PIANOS+Digitales-TECLADOS'),jdecode(''),'/15762/29885.html','true',[],'',''],
		['PAGE','43083',jdecode('PIANOS+Verticales'),jdecode(''),'/15762/43083.html','true',[],'',''],
		['PAGE','29912',jdecode('BATERIAS+y+Percusi%C3%B3n'),jdecode(''),'/15762/29912.html','true',[],'',''],
		['PAGE','29939',jdecode('AMPLIFICADORES+Guitarra'),jdecode(''),'/15762/29939.html','true',[],'',''],
		['PAGE','33885',jdecode('AMPLIFICADORES+Bajo'),jdecode(''),'/15762/33885.html','true',[],'',''],
		['PAGE','39083',jdecode('GUITARRAS+CLASICAS'),jdecode(''),'/15762/39083.html','true',[],'',''],
		['PAGE','33912',jdecode('GUITARRAS+IBANEZ'),jdecode(''),'/15762/33912.html','true',[],'',''],
		['PAGE','45483',jdecode('GUITARRAS+WASHBURN'),jdecode(''),'/15762/45483.html','true',[],'',''],
		['PAGE','33939',jdecode('BAJOS+IBANEZ'),jdecode(''),'/15762/33939.html','true',[],'',''],
		['PAGE','34983',jdecode('CUERDA+FROTADA'),jdecode(''),'/15762/34983.html','true',[],'',''],
		['PAGE','35004',jdecode('VIENTO'),jdecode(''),'/15762/35004.html','true',[],'','']
	],'',''],
	['PAGE','10032',jdecode('mapa+de+acceso'),jdecode(''),'/10032.html','true',[],'',''],
	['PAGE','28784',jdecode('Libro+de+visitas'),jdecode(''),'/28784/index.html','true',[ 
		['PAGE','28785',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/28784/28785.html','false',[],'','']
	],'',''],
	['PAGE','49083',jdecode('C%C3%B3mo+encontrarnos'),jdecode(''),'/49083.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Speed';
theSitetree.paletteFamily='920000';
theSitetree.keyvisualId='2342';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='373';
theSitetree.graphicsetId='424';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='920000';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Speed',
				paletteFamily: 	'920000',
				keyvisualId: 	'2342',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'373',
				graphicsetId: 	'424',
				contentColor: 	'FFFFFF',
				contentBGColor: '920000',
				a_color: 		'920000',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-28784aas010in23op']={
webappId:    '1002',
documentId:  '28784',
internalId:  '28784aas010in23op',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '10032',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4967',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '4967',
internalId:  '1501',
customField: '1501'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '49083',
internalId:  'routing',
customField: 'es_ES'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4967',
internalId:  '',
customField: '20100716-191912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4994',
internalId:  '',
customField: '20100313-152626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4676',
internalId:  '',
customField: '20100716-191633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4940',
internalId:  '',
customField: '20100621-140020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9699',
internalId:  '',
customField: '20100621-140234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12534',
internalId:  '',
customField: '20100716-194628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20070808-024509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10528',
internalId:  '',
customField: '20070614-184958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15762',
internalId:  '',
customField: '20100621-135227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29885',
internalId:  '',
customField: '20081202-180616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43083',
internalId:  '',
customField: '20071022-190243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29912',
internalId:  '',
customField: '20071018-203242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29939',
internalId:  '',
customField: '20071022-184342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33885',
internalId:  '',
customField: '20071022-193255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39083',
internalId:  '',
customField: '20071018-200346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33912',
internalId:  '',
customField: '20070531-181931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45483',
internalId:  '',
customField: '20070602-115012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33939',
internalId:  '',
customField: '20070523-195336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34983',
internalId:  '',
customField: '20070808-030331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35004',
internalId:  '',
customField: '20070808-030407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10032',
internalId:  '',
customField: '20070927-211732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28784',
internalId:  '',
customField: '20060221-004543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28785',
internalId:  '',
customField: '20060221-004543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49083',
internalId:  '',
customField: '20070611-145226'
};
webappMappings['1501']=webappMappings['1501-1437693']={
webappId:    '1501',
documentId:  '4967',
internalId:  '1437693',
customField: '1501'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010IN23OP';
var companyName   = 'OLMO10MUSICA';
var htmlTitle	  = 'todo+para+la+m%C3%BAsica+a+un+precio+incre%C3%ADble';
var metaKeywords  = 'ensayo+musica+bodas+sonido+equipos+instrumentos+musicales+soprano+coro+rociero+piano+guitarra+grabacion+disc-jockey+call+and+play+conciertos++rock+blues+jazz+grindcore+alquiler+instrumentos+bateria+marshall+peavey+mapex+pianos+digitales+bajos+electricos+amplificadores+packs+guitarra+casio+privia+yamaha+guitarra+violin+luthier+petrof+strunal+';
var metaContents  = 'locales+de+ensayo+salas+de+ensayo++musica+para+bodas+grabacion+de+musica+piano+guitarra+canto+soprano+organo+sonido+instrumentos+musicales+amplificadores+tienda+de+musica+call+and+play+percusion+baterias+bateria+mapex+pearl+tama+tribal+roland+yamaha+samick+petrof';
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();
};
