/* [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.html','true',[],'',''],
	['PAGE','4401',jdecode('%C2%BFQUIENES+SOMOS%3F'),jdecode(''),'/4401.html','true',[],'',''],
	['PAGE','168612',jdecode('NUESTROS+PRODUCTOS'),jdecode(''),'/168612.html','true',[],'',''],
	['PAGE','176912',jdecode('**+VALES+DESCUENTO+**'),jdecode(''),'/176912.html','false',[],'',''],
	['PAGE','168633',jdecode('**+NOVEDADES+**'),jdecode(''),'/168633.html','true',[],'',''],
	['PAGE','4443',jdecode('CATALOGOS+CON+PRECIOS'),jdecode(''),'/4443/index.html','true',[ 
		['PAGE','131901',jdecode('PIEDRAS+-+COLLARES...'),jdecode(''),'/4443/131901.html','true',[],'','']
	],'',''],
	['PAGE','37701',jdecode('MERCADO+SEGUNDA+MANO'),jdecode(''),'/37701/index.html','true',[ 
		['PAGE','113201',jdecode('PRODUCTOS'),jdecode(''),'/37701/113201.html','true',[],'','']
	],'',''],
	['PAGE','75201',jdecode('MERCADO+OCASI%C3%93N'),jdecode(''),'/75201/index.html','true',[ 
		['PAGE','102101',jdecode('PRODUCTOS'),jdecode(''),'/75201/102101.html','true',[],'','']
	],'',''],
	['PAGE','37722',jdecode('CAJ%C3%93N+DEL+JOYERO'),jdecode(''),'/37722.html','true',[],'',''],
	['PAGE','24906',jdecode('LIBRO+DE+VISITAS'),jdecode(''),'/24906.html','true',[],'',''],
	['PAGE','106901',jdecode('ENLACES+DE+INTERES'),jdecode(''),'/106901.html','true',[],'',''],
	['PAGE','4485',jdecode('CONT%C3%81CTENOS'),jdecode(''),'/4485/index.html','true',[ 
		['PAGE','126201',jdecode('CONT%C3%81CTENOS+%28follow+up+page%29'),jdecode(''),'/4485/126201.html','false',[],'',''],
		['PAGE','5001',jdecode('COMO+ENCONTRARNOS+-+Ruta+de+viaje'),jdecode(''),'/4485/5001.html','true',[],'',''],
		['PAGE','89101',jdecode('Mapa+de+acceso'),jdecode(''),'/4485/89101.html','true',[],'','']
	],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='B0CBD6';
theSitetree.keyvisualId='1987';
theSitetree.keyvisualName='rose.jpg';
theSitetree.fontsetId='329';
theSitetree.graphicsetId='383';
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: 			'Stylus',
				paletteFamily: 	'B0CBD6',
				keyvisualId: 	'1987',
				keyvisualName: 	'rose.jpg',
				fontsetId: 		'329',
				graphicsetId: 	'383',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'B0CBD6',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100224-005957'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '5001',
internalId:  'routing',
customField: 'es_ES'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4401',
internalId:  '',
customField: '20090118-155134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75201',
internalId:  '',
customField: '20100224-012312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20090101-184330'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '89101',
internalId:  'location',
customField: 'language:es;country:ES;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4485',
internalId:  '',
customField: '20090306-233517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37701',
internalId:  '',
customField: '20100305-234208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4443',
internalId:  '',
customField: '20091129-232227'
};
webappMappings['1501']=webappMappings['1501-6952992']={
webappId:    '1501',
documentId:  '701',
internalId:  '6952992',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113201',
internalId:  '',
customField: '20091028-114458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37722',
internalId:  '',
customField: '20090601-085824'
};
webappMappings['1002']=webappMappings['1002-24906aars20inv8ul']={
webappId:    '1002',
documentId:  '24906',
internalId:  '24906aars20inv8ul',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24906',
internalId:  '',
customField: '20100224-012420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168612',
internalId:  '',
customField: '20091129-231852'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-6765']={
webappId:    '7008',
documentId:  '4485',
internalId:  '6765',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-6acbf2509c403a8a0c3f41eeddd933d4']={
webappId:    '7060',
documentId:  '102101',
internalId:  '6acbf2509c403a8a0c3f41eeddd933d4',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102101',
internalId:  '',
customField: '20091106-094453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89101',
internalId:  '',
customField: '20090107-141635'
};
webappMappings['7060']=webappMappings['7060-47eb35b2616c516bf284ef1a065ea802']={
webappId:    '7060',
documentId:  '113201',
internalId:  '47eb35b2616c516bf284ef1a065ea802',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106901',
internalId:  '',
customField: '20091129-232325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126201',
internalId:  '',
customField: '20090306-233119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168633',
internalId:  '',
customField: '20100224-010138'
};
webappMappings['7060']=webappMappings['7060-bf171158e52fb13528ecc2793d604763']={
webappId:    '7060',
documentId:  '131901',
internalId:  'bf171158e52fb13528ecc2793d604763',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131901',
internalId:  '',
customField: '20091106-094545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176912',
internalId:  '',
customField: '20091230-151048'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INV8UL';
var companyName   = '+++++++++++++++++++++almacenes-esteban.com';
var htmlTitle	  = '';
var metaKeywords  = 'fornitura+de+plata%2C+fornitura+de+oro%2C+joyeria%2C+joyero%2C+relojero%2C+grabador%2C+herramienta%2C+maquinaria%2C+pulsera%2C+acero%2C++cuero%2C+caucho%2C+zirconitas%2C+circonitas%2C+preciosas%2C+semipreciosas%2C+enfilar%2C+wholesaler%2C+jewelry%2C+';
var metaContents  = 'Almac%C3%A9n+mayorista+de+suministros+para+joyeros%2C+relojeros%2C+bisuteros.+Ubicado+en+Bilbao.+Venta+a+profesionales.+Fornitura+de+plata%2C+oro+y+metal.+Pulseras+de+plata%2C+Colgantes+de+plata%2C+Piedras+naturales+y+fantas%C3%ADa.+Maquinaria+de+joyeria%2C+Herramienta+de+joyeria.+Herramienta+de+joyeria+de+segunda+mano%2C+Maquinaria+de+joyeria+de+segunda+mano%2C+Materiales+de+cuero+y+caucho.+Estucher%C3%ADa.';
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();
};
