/* [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','4606',jdecode('Inicio'),jdecode(''),'/4606.html','true',[],'',''],
	['PAGE','4690',jdecode('Sobrepeso+y+Obesidad'),jdecode(''),'/4690.html','true',[],'',''],
	['PAGE','4663',jdecode('Ansiedad+y+Estr%C3%A9s'),jdecode(''),'/4663.html','true',[],'',''],
	['PAGE','28129',jdecode('Documentos'),jdecode(''),'/28129.html','true',[],'',''],
	['PAGE','27329',jdecode('Libro+de+visitas'),jdecode(''),'/27329.html','true',[],'','']];
var siteelementCount=5;
theSitetree.topTemplateName='Elegance';
theSitetree.paletteFamily='FEECCD';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10625';
theSitetree.graphicsetId='10626';
theSitetree.contentColor='545554';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'arsys',
  product: 'WSCSYSSSSLYTC2IK'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Elegance',
				paletteFamily: 	'FEECCD',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10625',
				graphicsetId: 	'10626',
				contentColor: 	'545554',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4606',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4606',
internalId:  '',
customField: '20110320-014943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4690',
internalId:  '',
customField: '20110324-225521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4663',
internalId:  '',
customField: '20101202-194007'
};
webappMappings['1002']=webappMappings['1002-27329aas010ine1uu']={
webappId:    '1002',
documentId:  '27329',
internalId:  '27329aas010ine1uu',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27329',
internalId:  '',
customField: '20110320-005251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28129',
internalId:  '',
customField: '20110324-223257'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010INE1UU';
var companyName   = '+%3E%3E%3E++%22Que+la+comida+sea+tu+alimento+y+el+alimento+tu+medicina.%22+%28Hip%C3%B3crates%29';
var htmlTitle	  = '%C2%B7+SaludNatur+%C2%AE+-+Obesidad+-+Sobrepeso';
var metaKeywords  = 'Obesidad%2C+sobrepeso%2C+peso%2C+adelgazar%2C+adelgazamiento%2C+magnetoterapia%2C+acupuntura%2C+auriculoterapia%2C+imanterapia%2C+auriculopuntura%2Cmoxibusti%C3%B3n%2C+diet%C3%A9tica%2C+dieta%2C+nutrici%C3%B3n%2C+experto+universitario+en+diet%C3%A9tica+y+nutrici%C3%B3n+humana%2C+AEDN%2C+saludnatur%2C+dolor%2C+salud%2C+fitoterapia%2C+complementos+alimenticios%2C+BIONAL%2C+Puertollano%2C+natur%C3%B3patas%2C+naturopat%C3%ADa%2C+sobrepeso%2C+acupuntura+no+invasiva%2C+acupuntura+sin+dolor%2C+acupuntura+sin+pinchazos%2C+Puertollano%2C+Castilla-La+Mancha%2C+FENACO%2C+Bel%C3%A9n+Castellanos%2C+Pedro+Ad%C3%A1n%2C+hoya+del+moro%2C+te%2C+t%C3%A9%2C+infusi%C3%B3n%2C+infusiones%2C+infusiones+selectas%2C+';
var metaContents  = 'SaludNatur+%C2%AE.+T%C3%A9cnicas+exclusivas%2C+para+ayudarte+a+controlar+tu+peso+y+luchar+contra+el+sobrepeso+y+la+obesidad%2C+bajo+estrictos+criterios+de+Diet%C3%A9tica+y+Nutrici%C3%B3n.+Dieta+natural%2C+magnetoterapia%2C+auriculoterapia%2C+moxibusti%C3%B3n%2C+ventosas+%28cupping%29+y+acupuntura+sin+agujas%2C+conforman+los+programas+terap%C3%A9uticos+de+SaludNatur%C2%AE.++Los+programas+terap%C3%A9uticos+de+SaludNatur%C2%AE+no+utilizan+pastillas+ni+ning%C3%BAn+otro+producto+para+su+ingesti%C3%B3n%2C+por+ello+est%C3%A1n+libres+de+efectos+secundarios%2C+interacciones%2C+incompatibilidades%2C+etc...++Todos+nuestros+tratamientos+est%C3%A1n+adaptados+a+las+necesidades+personales+de+cada+uno+de+nuestros+clientes.+Con+nuestros+tratamientos+personalizados+conseguimos+un+importante+nivel+de+%C3%A9xito.+++SaludNatur%C2%AE+cuida+de+tu+salud.++++';
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();
};

