/* [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','6084',jdecode('%C2%BFQuienes+somos%3F'),jdecode(''),'/6084.html','true',[],'',''],
	['PAGE','4655',jdecode('Productos'),jdecode(''),'/4655/index.html','true',[ 
		['PAGE','6003',jdecode('Qu%C3%ADmicos+Caldera+y+Torre+Enf.'),jdecode(''),'/4655/6003.html','true',[],'',''],
		['PAGE','18234',jdecode('Equipos+y+lista+de+productos'),jdecode(''),'/4655/18234.html','true',[],'','']
	],'',''],
	['PAGE','10764',jdecode('Servicios'),jdecode(''),'/10764.html','true',[],'',''],
	['PAGE','4682',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/4682.html','true',[],'',''],
	['PAGE','19347',jdecode('Bolsa+de+trabajo'),jdecode(''),'/19347.html','true',[],'',''],
	['PAGE','19501',jdecode('Prensa'),jdecode(''),'/19501.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1760';
theSitetree.keyvisualName='student.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1760',
				keyvisualName: 	'student.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4598',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6084',
internalId:  '',
customField: '20060730-160054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20100213-150158'
};
webappMappings['7008']=webappMappings['7008-8025']={
webappId:    '7008',
documentId:  '4682',
internalId:  '8025',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4655',
internalId:  '',
customField: '20100213-150754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6003',
internalId:  '',
customField: '20060807-190340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10764',
internalId:  '',
customField: '20090527-155318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4682',
internalId:  '',
customField: '20090527-153333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18234',
internalId:  '',
customField: '20100217-150837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19347',
internalId:  '',
customField: '20100213-141737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19501',
internalId:  '',
customField: '20100217-151315'
};
webappMappings['1501']=webappMappings['1501-173611']={
webappId:    '1501',
documentId:  '4598',
internalId:  '173611',
customField: '1501'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INX33F';
var companyName   = 'MAJEGO';
var htmlTitle	  = 'Quimicos+Calderas+Torres+Enfriamiento+Tratamiento+Agua+Purificadores+Ultra+violeta+Filtros+Carb%C3%B3n+Activado+Suavizadores+Resina+desmineralizador+analisis+bacteriologicos+coagulantes+floculantes+cartuchos+filtrantes+mantenimiento+refacciones+servicio+majego';
var metaKeywords  = 'empresa+comercial+ramo+qu%C3%ADmico+mexicana+Distrito+Federal+Tl%C3%A1huac+tratamiento+agua+residencial+industrial+mercado+calidad+servicio+precio+sistemas+suministro+productos+equipos+servicios+tecnol%C3%B3gicas+ambientales+Proveer+operaci%C3%B3n+mantenimiento+satisfacer+necesidades+clientes+Suministrar+ecol%C3%B3gicos+econ%C3%B3micos+f%C3%A1cil+Produtos+Qu%C3%ADmicos+JORAL+Calderas+Chillers+Torres+Enfriamiento+Purificadores+INSTAPURA+UV+Ozono+Filtros+multicama+Carb%C3%B3n+Activado+Suavizadores+Desmineralizadores+%C3%93smosis+Inversa+Ozonificadores+Plantas+Purificadoras+Purificaci%C3%B3n+Desionizadoras+Resinas+intercambio+i%C3%B3nico+Gravas+Antracita+Desionizadores+Limpieza+Cisternas+Desinfecci%C3%B3n+soluci%C3%B3n+eliminar+dureza+s%C3%ADlice+incrustaciones+elimina+ox%C3%ADgeno+disuelto+corroe+acondiciona++lodos+generan+superficies+met%C3%A1licas+corrosi%C3%B3n+ideales+evitar+problemas+causa+entaponamientos+presencia+microorganismos+ensuciamiento+disminuci%C3%B3n+transferencia+calor+biodegradables+compra+servicios+Reporte+An%C3%A1lisis+Dosificadores+Asesor%C3%ADa+especializada+Capacitaci%C3%B3n+operadores+t%C3%A9cnica+costo+estudio+t%C3%A9cnico+econ%C3%B3mico+ventas%40majego.com';
var metaContents  = 'empresa+comercial+ramo+qu%C3%ADmico+mexicana+Distrito+Federal+Tl%C3%A1huac+tratamiento+agua+residencial+industrial+mercado+calidad+servicio+precio+sistemas+suministro+productos+equipos+servicios+tecnol%C3%B3gicas+ambientales+Proveer+operaci%C3%B3n+mantenimiento+satisfacer+necesidades+clientes+Suministrar+ecol%C3%B3gicos+econ%C3%B3micos+f%C3%A1cil+Produtos+Qu%C3%ADmicos+JORAL+Calderas+Chillers+Torres+Enfriamiento+Purificadores+INSTAPURA+UV+Ozono+Filtros+multicama+Carb%C3%B3n+Activado+Suavizadores+Desmineralizadores+%C3%93smosis+Inversa+Ozonificadores+Plantas+Purificadoras+Purificaci%C3%B3n+Desionizadoras+Resinas+intercambio+i%C3%B3nico+Gravas+Antracita+Desionizadores+Limpieza+Cisternas+Desinfecci%C3%B3n+soluci%C3%B3n+eliminar+dureza+s%C3%ADlice+incrustaciones+elimina+ox%C3%ADgeno+disuelto+corroe+acondiciona++lodos+generan+superficies+met%C3%A1licas+corrosi%C3%B3n+ideales+evitar+problemas+causa+entaponamientos+presencia+microorganismos+ensuciamiento+disminuci%C3%B3n+transferencia+calor+biodegradables+compra+servicios+Reporte+An%C3%A1lisis+Dosificadores+Asesor%C3%ADa+especializada+Capacitaci%C3%B3n+operadores+t%C3%A9cnica+costo+estudio+t%C3%A9cnico+econ%C3%B3mico+ventas%40majego.com';
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();
};
