/* [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('INICIO+Y+PROMOS'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','452',jdecode('EMPRESA'),jdecode(''),'/452.html','true',[],'',''],
	['PAGE','494',jdecode('SAL%C3%93N+BELLEZA+'),jdecode(''),'/494/index.html','true',[ 
		['PAGE','13801',jdecode('GALER%C3%8DA+FOTOS'),jdecode(''),'/494/13801.html','true',[],'','']
	],'',''],
	['PAGE','8801',jdecode('EXTENSIONES+CABELLO'),jdecode(''),'/8801.html','true',[],'',''],
	['PAGE','515',jdecode('CONT%C3%81CTENOS'),jdecode(''),'/515.html','true',[],'',''],
	['PAGE','19106',jdecode('LIBRO+DE+VISITAS'),jdecode(''),'/19106/index.html','true',[ 
		['PAGE','19101',jdecode('LEER+LIBRO'),jdecode(''),'/19106/19101.html','false',[],'','']
	],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Pencil';
theSitetree.paletteFamily='71488A';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10361';
theSitetree.graphicsetId='10515';
theSitetree.contentColor='71488A';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Pencil',
				paletteFamily: 	'71488A',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10361',
				graphicsetId: 	'10515',
				contentColor: 	'71488A',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana,Arial, Helvetica, sans-serif',
				contentFontSize:'10',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-5844']={
webappId:    '7008',
documentId:  '515',
internalId:  '5844',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-d6700d3a568fe078679f5273e1dd2c94']={
webappId:    '7060',
documentId:  '13801',
internalId:  'd6700d3a568fe078679f5273e1dd2c94',
customField: 'language:es;country:ES;'
};
webappMappings['1002']=webappMappings['1002-19106avec10in2o39']={
webappId:    '1002',
documentId:  '19106',
internalId:  '19106avec10in2o39',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-3180883']={
webappId:    '1501',
documentId:  '401',
internalId:  '3180883',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100416-041620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090501-015147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20090623-125347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20090623-130723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20061127-135415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20091107-013112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19106',
internalId:  '',
customField: '20061127-144258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19101',
internalId:  '',
customField: '20061127-144500'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2O39';
var companyName   = 'Sandra+Leal+Sal%C3%B3n+y+Accesorios';
var htmlTitle	  = 'Aprovecha+las+Super+Promociones+de+Extensiones+en+Sandra+Leal+Sal%C3%B3n+y+Accesorios';
var metaKeywords  = 'Sal%C3%B3n+de+Belleza%2C+Dise%C3%B1o+de+Im%C3%A1gen%2C+todo+para+la+mujer+su+pareja+y+sus+hijos%2C+Mujer%2C+im%C3%A1gen%2C+Maquillaje+HD%2C+Cursos+de+Automaquillaje%2C+U%C3%B1as+de+Acr%C3%ADlico%2C+U%C3%B1as+de+Gel%2C+Extensiones+de+Cabello+Natural%2C++tratamientos+para+Cabello%2C+Color+en+Cabello%2C+Extensiones%2C+Cortes%2C+Tintes%2C+Tratamientos+REDKEN%2C+KRYOLAN+Maquillaje%2C+Productos+Tec+Italy%2C+Mechas%2C+Rayos%2C+Efectos%2C+Transformar+tu+im%C3%A1gen%2C+Bisuter%C3%ADa%2C+Joyer%C3%ADa%2C+Accesorios%2C+Joyer%C3%ADa+de+Fantas%C3%ADa%2C++Bisuter%C3%ADa+fina%2C+Fashion+Jewelry%2C++woman+Accessories%2C++Accesorios+para+la+mujer%2C+Collares%2C+Costume+jewelry%2C+Productos+para+la+bellza+de+la+mujer%2C+cabello+Indy+Remy%2C+Indy+Remy.';
var metaContents  = 'Sal%C3%B3n+de+Belleza%2C+todos+los+servicios+que+ayudan+a+transformar+la+imagen+de+una+persona+y+Venta+de+Accesorios+en++Bisuter%C3%ADa+Fina.';
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();
};
