/* [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(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','47501',jdecode('FERIAS+-+SHOW+CALENDAR'),jdecode(''), jdecode('%2F47501.html'), 'true',[],'',''],
	['PAGE','105201',jdecode('Artes%C3%A0+CNC+-+English'),jdecode(''), jdecode('%2F105201%2Findex.html'), 'true',[ 
		['PAGE','107901',jdecode('Artes%C3%A0+-+Video'),jdecode(''), jdecode('%2F105201%2F107901.html'), 'true',[],'',''],
		['PAGE','113301',jdecode('Artes%C3%A0+-+Accessories'),jdecode(''), jdecode('%2F105201%2F113301.html'), 'true',[],'','']
	],'',''],
	['PAGE','105222',jdecode('CNC+Artes%C3%A0+-+Castellano'),jdecode(''), jdecode('%2F105222%2Findex.html'), 'true',[ 
		['PAGE','118901',jdecode('Artes%C3%A0+-+V%C3%ADdeo'),jdecode(''), jdecode('%2F105222%2F118901.html'), 'true',[],'','']
	],'',''],
	['PAGE','64801',jdecode('SYENSET+-+English+Catalogue'),jdecode(''), jdecode('%2F64801%2Findex.html'), 'true',[ 
		['PAGE','121101',jdecode('Microscopes'),jdecode(''), jdecode('%2F64801%2F121101.html'), 'true',[],'',''],
		['PAGE','70801',jdecode('Gravers'),jdecode(''), jdecode('%2F64801%2F70801.html'), 'true',[],'','']
	],'',''],
	['PAGE','68001',jdecode('Contact'),jdecode(''), jdecode('%2F68001.html'), 'true',[],'',''],
	['PAGE','89322',jdecode('Nuevos+Productos'),jdecode(''), jdecode('%2F89322.html'), 'true',[],'',''],
	['PAGE','11501',jdecode('SYENSET+-+Cat%C3%A1logo+Espa%C3%B1ol'),jdecode(''), jdecode('%2F11501%2Findex.html'), 'true',[ 
		['PAGE','120401',jdecode('Microscopios'),jdecode(''), jdecode('%2F11501%2F120401.html'), 'true',[],'',''],
		['PAGE','119801',jdecode('Motores+Colgantes'),jdecode(''), jdecode('%2F11501%2F119801.html'), 'true',[],'',''],
		['PAGE','36101',jdecode('Buriles+y+Herramientas'),jdecode(''), jdecode('%2F11501%2F36101.html'), 'true',[],'','']
	],'',''],
	['PAGE','115701',jdecode('DURSTON+-+Laminado'),jdecode(''), jdecode('%2F115701%2Findex.html'), 'true',[ 
		['PAGE','116801',jdecode('Laminado+Manual'),jdecode(''), jdecode('%2F115701%2F116801.html'), 'true',[],'',''],
		['PAGE','117701',jdecode('Laminado+El%C3%A9ctrico'),jdecode(''), jdecode('%2F115701%2F117701.html'), 'true',[],'',''],
		['PAGE','117901',jdecode('Bancos+de+Estirar'),jdecode(''), jdecode('%2F115701%2F117901.html'), 'true',[],'',''],
		['PAGE','118401',jdecode('Embutido+y+Utillaje'),jdecode(''), jdecode('%2F115701%2F118401.html'), 'true',[],'','']
	],'',''],
	['PAGE','45101',jdecode('C%C3%B3mo+Comprar%3F'),jdecode(''), jdecode('%2F45101.html'), 'true',[],'',''],
	['PAGE','48901',jdecode('Contacte+con+Nosotros'),jdecode(''), jdecode('%2F48901.html'), 'true',[],'','']];
var siteelementCount=23;
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 prodDef={
  wl_name: 'piensa',
  product: 'WSCSYSSSSLYTC2IR'
};
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: '20120131-131624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20111116-070048'
};
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:  '105201',
internalId:  '',
customField: '20110916-084135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36101',
internalId:  '',
customField: '20111114-114747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113301',
internalId:  '',
customField: '20110916-074008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115701',
internalId:  '',
customField: '20111011-155702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116801',
internalId:  '',
customField: '20111011-161125'
};
webappMappings['7008']=webappMappings['7008-7104']={
webappId:    '7008',
documentId:  '45101',
internalId:  '7104',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45101',
internalId:  '',
customField: '20110914-101325'
};
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: '20120131-131513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105222',
internalId:  '',
customField: '20111109-114049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107901',
internalId:  '',
customField: '20110915-135927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117701',
internalId:  '',
customField: '20111025-161305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117901',
internalId:  '',
customField: '20111025-161231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118401',
internalId:  '',
customField: '20111102-120918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118901',
internalId:  '',
customField: '20111109-114448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64801',
internalId:  '',
customField: '20111116-064016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120401',
internalId:  '',
customField: '20120103-104922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121101',
internalId:  '',
customField: '20120103-104354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68001',
internalId:  '',
customField: '20100209-183338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70801',
internalId:  '',
customField: '20111114-115013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89322',
internalId:  '',
customField: '20111114-114506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119801',
internalId:  '',
customField: '20111114-121422'
};
webappMappings['7008']=webappMappings['7008-7103']={
webappId:    '7008',
documentId:  '68001',
internalId:  '7103',
customField: 'language:es;country:ES;'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INVW7V';
var companyName   = 'Syenset%2C+S.L.';
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.+Syenset+Tools%2C+Herramientas+Syenset%2C+Engaste+de+Diamantes%2C+Stone+Setting%2C+Buriles%2C+Gravers%2C+M%C3%A1quina+de+Grabado+Computerizada%2C+Computerized+Engraving+Machine%2C+M%C3%A1quina+de+Grabado+Artes%C3%A0%2C+Artesa+Engraving+Machine%2C+M%C3%A1quina+para+grabar+relojes%2C+Watch+Engraving+Machine%2C+M%C3%A1quina+para+grabar+armas%2C+Gun+engraving+machine%2C+M%C3%A1quina+para+grabar+cuchillos%2C+Knife+engraving+machine%2C+M%C3%A1quina+de+grabado+art%C3%ADstico%2C+Artistic+engraving+machine%2C+Laminadores%2C+Laminadores+Durston%2C+Bancos+de+Estirar%2C+Bancos+de+Estirar+Durston%2C+Juegos+de+Embutidores%2C+Juego+de+Embutidores%2C+Laminadores+de+Joyer%C3%ADa%2C+Laminadores+El%C3%A9ctricos%2C+Laminadores+Manuales%2C+Laminadores+Econ%C3%B3micos%2C+Lastras+para+forjar+anillos%2C+Cizallas+de+Corte';
var metaContents  = 'Jewellery+Tools%2C+Stone+Setting+Tools%2C+Hand+Engraving+Tools%2C+Computerized+Engraving+Machines%2C+Stone+Setting+Microscopes%2C+Stone+Setting%2C+Gun+Engraving%2C+Knife+Engraving%2C+Jewellery+Engraving%2C+Neumathic+Tools+for+Stone+Setting%2C+Sharpeners%2C+Diamond+Wheels%2C+Engraving+Blocks%2C+Tutorial+DVD%2C+Engraving+Books%2C+Stone+Setting+Books%2C++Buriles%2CMicroscopios%2C+Engastado%2C+Grabado%2C+Grabado+de+Armas%2C+Afilado%2C+Afilar+buriles%2C+Bolas+de+Grabador%2C+Sistemas+de+Sujeci%C3%B3n+de+Joyer%C3%ADa%2C+Compresores%2C+Sharpening+System%2C+Afiladora+de+Buriles%2C+Buriles+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();
};

