/* [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('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','89301',jdecode('New+Products'),jdecode(''),'/89301.html','true',[],'',''],
	['PAGE','64801',jdecode('English+Catalogue'),jdecode(''),'/64801/index.html','true',[ 
		['PAGE','65501',jdecode('Power+Assited+Engraver'),jdecode(''),'/64801/65501.html','true',[],'',''],
		['PAGE','65522',jdecode('Power+Handpieces'),jdecode(''),'/64801/65522.html','true',[],'',''],
		['PAGE','66801',jdecode('High+Speed+Rotary+Handpiece'),jdecode(''),'/64801/66801.html','true',[],'',''],
		['PAGE','67501',jdecode('Electic+Rotary+Micromotor'),jdecode(''),'/64801/67501.html','true',[],'',''],
		['PAGE','69601',jdecode('Airtact'),jdecode(''),'/64801/69601.html','true',[],'',''],
		['PAGE','70801',jdecode('Gravers'),jdecode(''),'/64801/70801.html','true',[],'',''],
		['PAGE','73901',jdecode('Tool+Sharpening'),jdecode(''),'/64801/73901.html','true',[],'',''],
		['PAGE','74301',jdecode('Sharpening+Accessories'),jdecode(''),'/64801/74301.html','true',[],'','']
	],'',''],
	['PAGE','68001',jdecode('Contact'),jdecode(''),'/68001.html','true',[],'',''],
	['PAGE','89322',jdecode('Nuevos+Productos'),jdecode(''),'/89322.html','true',[],'',''],
	['PAGE','11501',jdecode('Cat%C3%A1logo+Espa%C3%B1ol'),jdecode(''),'/11501/index.html','true',[ 
		['PAGE','16601',jdecode('Buril+Neum%C3%A1tico'),jdecode(''),'/11501/16601.html','true',[],'',''],
		['PAGE','21101',jdecode('Piezas+de+Mano'),jdecode(''),'/11501/21101.html','true',[],'',''],
		['PAGE','24301',jdecode('Micromotor+de+Aire+Giratorio'),jdecode(''),'/11501/24301.html','true',[],'',''],
		['PAGE','34601',jdecode('Micromotor+El%C3%A9ctrico'),jdecode(''),'/11501/34601.html','true',[],'',''],
		['PAGE','22701',jdecode('Buril+Neum%C3%A1tico+sin+Pedal'),jdecode(''),'/11501/22701.html','true',[],'',''],
		['PAGE','36101',jdecode('Buriles+y+Herramientas'),jdecode(''),'/11501/36101.html','true',[],'',''],
		['PAGE','25301',jdecode('Afilado+de+Herramientas'),jdecode(''),'/11501/25301.html','true',[],'',''],
		['PAGE','26701',jdecode('Accesorios+Afilado'),jdecode(''),'/11501/26701.html','true',[],'',''],
		['PAGE','41001',jdecode('Empu%C3%B1aduras+Manuales'),jdecode(''),'/11501/41001.html','true',[],'',''],
		['PAGE','27701',jdecode('Microscopios'),jdecode(''),'/11501/27701.html','true',[],'',''],
		['PAGE','29401',jdecode('Bolas+de+Grabador'),jdecode(''),'/11501/29401.html','true',[],'',''],
		['PAGE','30801',jdecode('Accesorios+para+Bola+Grabador'),jdecode(''),'/11501/30801.html','true',[],'',''],
		['PAGE','54301',jdecode('Thermo+Loc'),jdecode(''),'/11501/54301.html','true',[],'',''],
		['PAGE','32201',jdecode('BenchMate'),jdecode(''),'/11501/32201.html','true',[],'',''],
		['PAGE','35101',jdecode('Sujeciones+para+Sortijas'),jdecode(''),'/11501/35101.html','true',[],'',''],
		['PAGE','41901',jdecode('Cortador+de+Sortijas'),jdecode(''),'/11501/41901.html','true',[],'',''],
		['PAGE','42301',jdecode('Terceras+Manos+Soldadura'),jdecode(''),'/11501/42301.html','true',[],'',''],
		['PAGE','43101',jdecode('Formador+de+Brazaletes'),jdecode(''),'/11501/43101.html','true',[],'',''],
		['PAGE','33701',jdecode('Mordaza+Multi-Uso'),jdecode(''),'/11501/33701.html','true',[],'',''],
		['PAGE','43701',jdecode('Accesorios'),jdecode(''),'/11501/43701.html','true',[],'','']
	],'',''],
	['PAGE','55801',jdecode('Formaci%C3%B3n'),jdecode(''),'/55801/index.html','true',[ 
		['PAGE','56101',jdecode('DVD'),jdecode(''),'/55801/56101.html','true',[],'',''],
		['PAGE','57801',jdecode('Libros+de+Grabado'),jdecode(''),'/55801/57801.html','true',[],'',''],
		['PAGE','59001',jdecode('Libros+de+Armas+%26+Cuchillos'),jdecode(''),'/55801/59001.html','true',[],'',''],
		['PAGE','60901',jdecode('Libros+de+Engaste+%26+Joyer%C3%ADa'),jdecode(''),'/55801/60901.html','true',[],'',''],
		['PAGE','62001',jdecode('Libros+de+Dise%C3%B1o+%26+Dibujo'),jdecode(''),'/55801/62001.html','true',[],'',''],
		['PAGE','62801',jdecode('Libros+de+Letras+%26+Monogramas'),jdecode(''),'/55801/62801.html','true',[],'','']
	],'',''],
	['PAGE','44701',jdecode('Garant%C3%ADa'),jdecode(''),'/44701.html','true',[],'',''],
	['PAGE','45101',jdecode('C%C3%B3mo+Comprar%3F'),jdecode(''),'/45101.html','true',[],'',''],
	['PAGE','47501',jdecode('Ferias+%26+Eventos'),jdecode(''),'/47501.html','true',[],'',''],
	['PAGE','48901',jdecode('Contacte+con+Nosotros'),jdecode(''),'/48901.html','true',[],'','']];
var siteelementCount=45;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='FFD375';
theSitetree.keyvisualId='2054';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='328';
theSitetree.graphicsetId='385';
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: 	'FFD375',
				keyvisualId: 	'2054',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'328',
				graphicsetId: 	'385',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFD375',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100211-165259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20090901-162247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20081121-095502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48901',
internalId:  '',
customField: '20100211-165506'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21101',
internalId:  '',
customField: '20081113-164622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22701',
internalId:  '',
customField: '20081028-131117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24301',
internalId:  '',
customField: '20081110-163303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25301',
internalId:  '',
customField: '20090709-095514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26701',
internalId:  '',
customField: '20081031-104026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27701',
internalId:  '',
customField: '20081110-164549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29401',
internalId:  '',
customField: '20100210-180600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30801',
internalId:  '',
customField: '20090429-155456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32201',
internalId:  '',
customField: '20081110-163746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33701',
internalId:  '',
customField: '20081031-103626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34601',
internalId:  '',
customField: '20081110-170206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35101',
internalId:  '',
customField: '20090522-174230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36101',
internalId:  '',
customField: '20081201-105805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41001',
internalId:  '',
customField: '20081031-112805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20081031-110107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42301',
internalId:  '',
customField: '20081031-111746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43101',
internalId:  '',
customField: '20081031-114748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43701',
internalId:  '',
customField: '20081031-120522'
};
webappMappings['7008']=webappMappings['7008-7104']={
webappId:    '7008',
documentId:  '45101',
internalId:  '7104',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44701',
internalId:  '',
customField: '20081104-115622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45101',
internalId:  '',
customField: '20100210-180838'
};
webappMappings['7008']=webappMappings['7008-7105']={
webappId:    '7008',
documentId:  '48901',
internalId:  '7105',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47501',
internalId:  '',
customField: '20100108-172819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54301',
internalId:  '',
customField: '20081114-111900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55801',
internalId:  '',
customField: '20081119-115119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56101',
internalId:  '',
customField: '20081117-102537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57801',
internalId:  '',
customField: '20081117-104727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59001',
internalId:  '',
customField: '20081117-114828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60901',
internalId:  '',
customField: '20090317-091714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62001',
internalId:  '',
customField: '20081119-114825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62801',
internalId:  '',
customField: '20081119-120739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64801',
internalId:  '',
customField: '20081121-095829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65501',
internalId:  '',
customField: '20090901-154645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65522',
internalId:  '',
customField: '20081121-112440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66801',
internalId:  '',
customField: '20081121-112526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67501',
internalId:  '',
customField: '20081121-112558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68001',
internalId:  '',
customField: '20100209-183338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69601',
internalId:  '',
customField: '20081125-164013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70801',
internalId:  '',
customField: '20081128-110233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73901',
internalId:  '',
customField: '20081202-164618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74301',
internalId:  '',
customField: '20081202-170420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89322',
internalId:  '',
customField: '20100129-100543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89301',
internalId:  '',
customField: '20090721-165538'
};
webappMappings['7008']=webappMappings['7008-7103']={
webappId:    '7008',
documentId:  '68001',
internalId:  '7103',
customField: 'language:es;country:ES;'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INVW7V';
var companyName   = 'GRS+Tools+-+Syenset';
var htmlTitle	  = '';
var metaKeywords  = 'Herramientas+de+Joyer%C3%ADa%2C+Buriles%2C+GraverMaxG8%2C+GraverMax+G8%2C+GraverMaxSC%2C+GraverMax+SC+GraverMachAT%2C+GraverMach+AT%2C+Gravermax%2C+Microscopios%2C+Engastado%2C+Grabado%2C+Grabado+de+Armas%2C+Diamantes%2C+Piedras+Preciosas%2C+Afilado%2C+Afilar+buriles%2C+Buriles+C-Max%2C+Bolas+de+Grabador%2C+Sistemas+de+Sujeci%C3%B3n+de+Joyer%C3%ADa%2C+Compresores%2C+GRS+Tools+Distribution%2C+GRS%2C+BenchMate%2C+Power+Hone%2C+Sharpening+System%2C+GRS+Europe%2C+GraverMax+Europe%2C+GRS+European+Distribution%2C+Microscopios+Engastado%2C+Libros+de+Joyer%C3%ADa%2C+Libros+Engaste+en+Joyer%C3%ADa%2C+Libros+Grabado+Manual%2C+Engaste';
var metaContents  = 'Herramientas+de+Joyer%C3%ADa%2C+Buriles%2C+GraverMaxG8%2C+GraverMax+G8+GraverMaxSC%2C+GraverMachAT%2C+GraverMach+AT+Gravermax%2C+Microscopios%2C+Engastado%2C+Grabado%2C+Grabado+de+Armas%2C+GraverMax+SC%2C+Afilado%2C+Afilar+buriles%2C+Bolas+de+Grabador%2C+Sistemas+de+Sujeci%C3%B3n+de+Joyer%C3%ADa%2C+Compresores%2C+GRS+Tools+Distribution%2C+GRS%2C+BenchMate%2C+Power+Hone%2C+Sharpening+System%2C+Afiladora+de+Buriles%2C+Buriles+C-Max+Microscopios+Engastado%2C+Libros+de+Joyer%C3%ADa%2C+Libros+Engaste+en+Joyer%C3%ADa%2C+Libros+Grabado+Manual%2C+Engaste';
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();
};
