/* [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','452',jdecode('CAMBIADOR+BEBES'),jdecode(''),'/452.html','true',[],'',''],
	['PAGE','72523',jdecode('DESFIBRILADORES+'),jdecode(''),'/72523/index.html','true',[ 
		['PAGE','90923',jdecode('LIFEPAK+1000'),jdecode(''),'/72523/90923.html','true',[],'',''],
		['PAGE','90944',jdecode('LIFEPAK+CR+PLUS'),jdecode(''),'/72523/90944.html','true',[],'','']
	],'',''],
	['PAGE','12001',jdecode('TEXTIL+%2F+LABORAL'),jdecode(''),'/12001.html','true',[],'',''],
	['PAGE','83923',jdecode('COMPRAR'),jdecode(''),'/83923.html','true',[],'',''],
	['PAGE','2885',jdecode('CONTACTAR'),jdecode(''),'/2885/index.html','true',[ 
		['PAGE','43412',jdecode('Contactar++%28follow+up+page%29'),jdecode(''),'/2885/43412.html','false',[],'','']
	],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='336699';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='73';
theSitetree.graphicsetId='94';
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: 			'Galerie',
				paletteFamily: 	'336699',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'73',
				graphicsetId: 	'94',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'336699',
				b_color: 		'D8F8F8',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100809-101218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100809-101022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72523',
internalId:  '',
customField: '20100205-175526'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83923',
internalId:  '',
customField: '20100809-094232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2885',
internalId:  '',
customField: '20100729-162435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12001',
internalId:  '',
customField: '20100120-110223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90923',
internalId:  '',
customField: '20100206-120204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90944',
internalId:  '',
customField: '20100603-120922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43412',
internalId:  '',
customField: '20090830-023443'
};
webappMappings['7008']=webappMappings['7008-10071']={
webappId:    '7008',
documentId:  '2885',
internalId:  '10071',
customField: 'language:es;country:ES;'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20INV2AX';
var companyName   = 'NANAMBOO.com';
var htmlTitle	  = 'CAMBIADORES+PARA+BEB%C3%89S+ROBUST%2C+DESFIBRILADORES+SEMIAUTOMATICOS';
var metaKeywords  = 'HEADROBUST%2FHEAD+HEADCAMBIADORES%2FHEAD++HEADBEBE%2FHEAD++HEADBEBES%2FHEAD++HEADCAMBIADOR%2FHEAD++HEADTROCADOR%2FHEAD+HEADPARED%2FHEAD+HEADPLEGABLE%2FHEAD+HEADPA%C3%91ALES%2FHEAD+HEADMADERA%2FHEAD+HEADTUBO%2FHEAD+HEADESPA%C3%91A%2FHEAD+HEADMEDICINA%2FHEAD+HEADCOMPRAR%2FHEAD+HEADRECICLABLE%2FHEAD+%2FHEAD+HEADCHANGING%2FHEAD++HEADTABLE%2FHEAD++HEADNURSING%2FHEAD++HEADPAREDE%2FHEAD+HEADNANAMBOO%2FHEAD+HEADNANAMBU%2FHEAD+HEADNANANBOO%2FHEAD+HEADNANANBU%2FHEAD+HEADCAMISETAS%2FHEAD++HEADSUDADERAS%2FHEAD++HEADSERIGRAFIA%2FHEAD++HEADBORDADOS%2FHEAD++HEADTOALLAS%2FHEAD++HEADFORROS%2FHEAD++HEADPOLARES%2FHEAD++HEADESCUDOS%2FHEAD++HEADHAYA%2FHEAD++HEADCHANDAL+%2FHEAD+HEADGAS+SPRING%2FHEAD++HEADLIMPIO%2FHEAD++HEADRESTAURANTES+%2FHEAD+HEADBOLSAS+RECICLABLES%2FHEAD+HEADBOLSAS%2FHEAD+HEADTELA%2FHEAD++HEADHOTELES%2FHEAD++HEADIGLESIAS%2FHEAD++HEADGASOLINERAS%2FHEAD++HEADGUARDERIAS%2FHEAD++HEADJARDIN%2FHEAD++HEADINFANCIA%2FHEAD++HEADNI%C3%91OS%2FHEAD++HEADPA%C3%91ALES+HEADPUBLICO+HEADIMAGEN+HEADSKOTBORD+HEADDISE%C3%91O+%2FHEAD+SUECO%2FHEAD+DESFIBRILADORES%2FHEAD+MEDTRONIC%2FHEAD+MEDTROSAFE%2FHEAD+SALVARVIDAS%2FHEAD+PUBLICO%2FHEAD+SEGURO%2FHEAD+HOMOLOGADO%2FHEAD';
var metaContents  = 'CAMBIADOR+BEBE%2C+CAMBIADOR+PARED+BEBES%2C+CAMBIADOR%2C+BEBE%2C+CAMBIADOR+PLEGABLE%2C++BEBES%2C+ROBUST%2C+PARED%2C+NI%C3%91OS%2C+DESFIBRILADORES%2C+MEDTRONIC%2C+SEMIAUTOMATICOS%2C+CAMBIADOR%2C+BEBE%2C+COMPRAR%2C+CAMBIADOR+HOSTELERIA%2C+CAMBIADOR%2C+ESPACIOS%2C+PUBLICOS%2C+PA%C3%91ALES%2C+BEBES%2C+CAMBIADORES%2C+PARED%2C+PARA%2C+BEBES%2C+ALGOD%C3%93N%2C+PLEGABLE%2C+PA%C3%91ALES%2C+PERSONALIZACION%2C+PRENDAS%2C+COMPLEMENTOS%2C+MERCHANDISING%2C+EMPRESAS%2C+EVENTOS%2C+SERIGRAFIA%2C+BORDADOS%2C+CAMBIADORES+PARA+BEBES%2C+CAMBIADOR+BEBE%2C+CAMBIADOR+DE+BEBE%2C+CAMBIADOR+DE+PA%C3%91ALES%2C+CAMBIADOR+BEBE%2C+NANAMBOO%2C+NANAMBU';
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();
};
