/* [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','4478',jdecode('Home'),jdecode(''),'/4478.html','true',[],'',''],
	['PAGE','22120',jdecode('Porcelana'),jdecode(''),'/22120/index.html','true',[ 
		['PAGE','22501',jdecode('Schmidt'),jdecode(''),'/22120/22501.html','true',[],'',''],
		['PAGE','22522',jdecode('Principado'),jdecode(''),'/22120/22522.html','true',[],'',''],
		['PAGE','22564',jdecode('Orme'),jdecode(''),'/22120/22564.html','true',[],'',''],
		['PAGE','22543',jdecode('Anfora'),jdecode(''),'/22120/22543.html','true',[],'',''],
		['PAGE','59123',jdecode('SantaAnita'),jdecode(''),'/22120/59123.html','true',[],'','']
	],'',''],
	['PAGE','10203',jdecode('Aluminio'),jdecode(''),'/10203.html','true',[],'',''],
	['PAGE','4535',jdecode('Cristaleria'),jdecode(''),'/4535/index.html','true',[ 
		['PAGE','10803',jdecode('Crisa'),jdecode(''),'/4535/10803.html','true',[],'',''],
		['PAGE','11103',jdecode('Libbey'),jdecode(''),'/4535/11103.html','true',[],'',''],
		['PAGE','59144',jdecode('Arc'),jdecode(''),'/4535/59144.html','true',[],'','']
	],'',''],
	['PAGE','4562',jdecode('Cubiertos'),jdecode(''),'/4562/index.html','true',[ 
		['PAGE','15530',jdecode('Oneida'),jdecode(''),'/4562/15530.html','true',[],'',''],
		['PAGE','15557',jdecode('Sabural'),jdecode(''),'/4562/15557.html','true',[],'','']
	],'',''],
	['PAGE','4589',jdecode('Eq.+de+Cocina'),jdecode(''),'/4589/index.html','true',[ 
		['PAGE','14803',jdecode('Halco'),jdecode(''),'/4589/14803.html','true',[],'',''],
		['PAGE','21511',jdecode('Cambro'),jdecode(''),'/4589/21511.html','true',[],'',''],
		['PAGE','21991',jdecode('Rubbermaid'),jdecode(''),'/4589/21991.html','true',[],'',''],
		['PAGE','53512',jdecode('Tablecraft'),jdecode(''),'/4589/53512.html','true',[],'','']
	],'',''],
	['PAGE','24201',jdecode('Melamina'),jdecode(''),'/24201/index.html','true',[ 
		['PAGE','59165',jdecode('Lenox'),jdecode(''),'/24201/59165.html','true',[],'',''],
		['PAGE','59186',jdecode('Get'),jdecode(''),'/24201/59186.html','true',[],'','']
	],'',''],
	['PAGE','25701',jdecode('Charolas'),jdecode(''),'/25701.html','true',[],'',''],
	['PAGE','91423',jdecode('Cuchiller%C3%ADa'),jdecode(''),'/91423/index.html','true',[ 
		['PAGE','25722',jdecode('Tramontina'),jdecode(''),'/91423/25722.html','true',[],'',''],
		['PAGE','91123',jdecode('Colonial'),jdecode(''),'/91423/91123.html','true',[],'','']
	],'',''],
	['PAGE','25743',jdecode('Extractores+y+Licuadoras+'),jdecode(''),'/25743.html','true',[],'',''],
	['PAGE','34401',jdecode('Art%C3%ADculos+madera'),jdecode(''),'/34401.html','true',[],'',''],
	['PAGE','4697',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/4697.html','true',[],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Fields';
theSitetree.paletteFamily='FEFEFE';
theSitetree.keyvisualId='11083';
theSitetree.keyvisualName='kv_11083.jpg';
theSitetree.fontsetId='31968';
theSitetree.graphicsetId='13807';
theSitetree.contentColor='6F861D';
theSitetree.contentBGColor='FEFEFE';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Fields',
				paletteFamily: 	'FEFEFE',
				keyvisualId: 	'11083',
				keyvisualName: 	'kv_11083.jpg',
				fontsetId: 		'31968',
				graphicsetId: 	'13807',
				contentColor: 	'6F861D',
				contentBGColor: 'FEFEFE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22120',
internalId:  '',
customField: '20090720-121452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4478',
internalId:  '',
customField: '20090618-120255'
};
webappMappings['7008']=webappMappings['7008-8627']={
webappId:    '7008',
documentId:  '4697',
internalId:  '8627',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22501',
internalId:  '',
customField: '20090717-132336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22522',
internalId:  '',
customField: '20060930-095047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22564',
internalId:  '',
customField: '20090717-124543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22543',
internalId:  '',
customField: '20090720-112453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10203',
internalId:  '',
customField: '20060923-115339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4535',
internalId:  '',
customField: '20090708-131546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10803',
internalId:  '',
customField: '20090629-180028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11103',
internalId:  '',
customField: '20090630-165634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4562',
internalId:  '',
customField: '20080806-130620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15530',
internalId:  '',
customField: '20060821-123533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15557',
internalId:  '',
customField: '20070723-114000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4589',
internalId:  '',
customField: '20080806-130641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14803',
internalId:  '',
customField: '20090717-133727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21511',
internalId:  '',
customField: '20090720-110041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21991',
internalId:  '',
customField: '20090722-191405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53512',
internalId:  '',
customField: '20090709-124734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24201',
internalId:  '',
customField: '20090709-180100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25701',
internalId:  '',
customField: '20060923-121515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25722',
internalId:  '',
customField: '20090720-121942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25743',
internalId:  '',
customField: '20090717-131710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34401',
internalId:  '',
customField: '20060930-091549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4697',
internalId:  '',
customField: '20080313-125712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59123',
internalId:  '',
customField: '20090720-114951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59144',
internalId:  '',
customField: '20090708-133048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59186',
internalId:  '',
customField: '20090720-125216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59165',
internalId:  '',
customField: '20090709-180707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91423',
internalId:  '',
customField: '20090720-111249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91123',
internalId:  '',
customField: '20090720-110904'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXSO1';
var companyName   = 'EPARE+PORCELANAS';
var htmlTitle	  = 'EPARE+PORCELANAS';
var metaKeywords  = '';
var metaContents  = '';
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();
};
