/* [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','4598',jdecode('INICIO'),jdecode(''),'/4598.html','true',[],'',''],
	['PAGE','4709',jdecode('PRODUCTOS'),jdecode(''),'/4709/index.html','true',[ 
		['PAGE','6503',jdecode('Cuidado+Personal'),jdecode(''),'/4709/6503.html','true',[],'',''],
		['PAGE','6530',jdecode('Cuidado+Automot%C3%ADz'),jdecode(''),'/4709/6530.html','true',[],'',''],
		['PAGE','6557',jdecode('Limpieza+y+Decoraci%C3%B3n+del+Hogar'),jdecode(''),'/4709/6557.html','true',[],'',''],
		['PAGE','6584',jdecode('Promocionales'),jdecode(''),'/4709/6584.html','true',[],'',''],
		['PAGE','16633',jdecode('Hospitales+y+Laboratorios'),jdecode(''),'/4709/16633.html','true',[],'','']
	],'',''],
	['PAGE','5203',jdecode('OFERTAS'),jdecode(''),'/5203.html','true',[],'',''],
	['PAGE','5230',jdecode('CONT%C3%81CTENOS'),jdecode(''),'/5230.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='012253';
theSitetree.keyvisualId='2496';
theSitetree.keyvisualName='labor.jpg';
theSitetree.fontsetId='433';
theSitetree.graphicsetId='483';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aeskulap',
				paletteFamily: 	'012253',
				keyvisualId: 	'2496',
				keyvisualName: 	'labor.jpg',
				fontsetId: 		'433',
				graphicsetId: 	'483',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4598',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-121182']={
webappId:    '1501',
documentId:  '4598',
internalId:  '121182',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20070306-232134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5203',
internalId:  '',
customField: '20100111-134847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4709',
internalId:  '',
customField: '20080229-190221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6503',
internalId:  '',
customField: '20080330-145745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6530',
internalId:  '',
customField: '20070818-154102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6557',
internalId:  '',
customField: '20051101-165620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6584',
internalId:  '',
customField: '20051011-173302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16633',
internalId:  '',
customField: '20080529-104624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5230',
internalId:  '',
customField: '20070331-135934'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXE1Q';
var companyName   = 'QU%C3%8DMICA%2C+COSM%C3%89TICOS+Y+PROMOCIONALES%2C+S.A.+DE+C.V.';
var htmlTitle	  = 'QU%C3%8DMICA%2C+COSM%C3%89TICOS+Y+PROMOCIONALES%2C+S.A.+DE+C.V.';
var metaKeywords  = 'Cuidado+del+CabelloShampoo%2C+aloe-vera%2C+pantenol%2C+vitaminas%2C+nopal%2C+aceite+de+oso%2C+jojobaShampoo-acondicionador%2C+acondicionadorGel%2C+detener+evitar+ca%C3%ADda+del+cabello%2CSkin+Care%2C+Cuidado+de+la+PielCremas+nutritivas%2C+col%C3%A1geno%2C+elastina%2C+liposomasShampoo+cuerpo%2C+vitaminas%2C+aloe-vera%2C+loci%C3%B3n+antiarrugasCrema+l%C3%ADquida+manos+cuerpoJab%C3%B3n+l%C3%ADquidoBa%C3%B1o+de+espumaGel+relajante+refrescanteGel+antibacterialGel+hidratanteRepelente+insectosReductivos+Corporales+toronjaLoci%C3%B3n+y+crema+reafirmante+algas+marinasGel+reductor+con+centella+asi%C3%A1ticaFraganciasPerfume+dama+mujerLoci%C3%B3n+caballero+hombreBronceador+bloqueadorGel+Bronceador+aceite+zanahoria+Factor+Protecci%C3%B3n+Solar+FPSCrema+BloqueadoraAutobronceador%09%09Limpiador+de+equipo+de+c%C3%B3mputopantallas+cristalLimpiador+tableroLimpiador+hardwareMouse+Pad+L%C3%ADquidoAbrillantador+de+llantas%2C+pl%C3%A1stico+viniloDesengrasante+multiusosShampoo+carrocer%C3%ADas+ceraMultiusos+vidrios%2C+madera%2C+metalRestaurador+facias+negrasLimpia+vestidurasMaleta%2C+bolsa%2C+estuche+diversas+formas%2C+tama%C3%B1os+coloresVela+arom%C3%A1ticaAromatizante+ambientalEncendedorPlumaYarda+en+acr%C3%ADlicoCompresa+t%C3%A9rmicaCilindro+para+beber+aguaPorta+CD%C2%B4S';
var metaContents  = 'Cosm%C3%A9ticos+para+el+Cuidado+Personal+Cosm%C3%A9ticos+AutomotricesArt%C3%ADculos+PromocionalesProductos+Qu%C3%ADmicos+para+la+IndustriaL%C3%ADnea+para+el+Hogar';
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();
};
