/* [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','6301',jdecode('INICIO'),jdecode(''),'/6301.html','true',[],'',''],
	['PAGE','37701',jdecode('MONTEIL'),jdecode(''),'/37701.html','true',[],'',''],
	['PAGE','33501',jdecode('PERFUMERIA'),jdecode(''),'/33501/index.html','true',[ 
		['PAGE','6373',jdecode('MUJER'),jdecode(''),'/33501/6373.html','true',[],'',''],
		['PAGE','6352',jdecode('HOMBRE'),jdecode(''),'/33501/6352.html','true',[],'',''],
		['PAGE','19401',jdecode('INFANTILES'),jdecode(''),'/33501/19401.html','true',[],'',''],
		['PAGE','19201',jdecode('ESTUCHES'),jdecode(''),'/33501/19201.html','true',[],'','']
	],'',''],
	['PAGE','34801',jdecode('COSMETICA'),jdecode(''),'/34801/index.html','true',[ 
		['PAGE','76901',jdecode('ADOLFO+DOMINGUEZ'),jdecode(''),'/34801/76901.html','true',[],'',''],
		['PAGE','77201',jdecode('BIOTHERM'),jdecode(''),'/34801/77201.html','true',[],'',''],
		['PAGE','77401',jdecode('CLARINS'),jdecode(''),'/34801/77401.html','true',[],'',''],
		['PAGE','77601',jdecode('CLINIQUE'),jdecode(''),'/34801/77601.html','true',[],'',''],
		['PAGE','77801',jdecode('ESTEE+LAUDER'),jdecode(''),'/34801/77801.html','true',[],'',''],
		['PAGE','78001',jdecode('GISELE+DENIS'),jdecode(''),'/34801/78001.html','true',[],'',''],
		['PAGE','78301',jdecode('KANEBO'),jdecode(''),'/34801/78301.html','true',[],'',''],
		['PAGE','78501',jdecode('LA+PRAIRIE'),jdecode(''),'/34801/78501.html','true',[],'',''],
		['PAGE','78522',jdecode('LANCASTER'),jdecode(''),'/34801/78522.html','true',[],'',''],
		['PAGE','78543',jdecode('LANC%C3%94ME'),jdecode(''),'/34801/78543.html','true',[],'',''],
		['PAGE','78564',jdecode('NATURA+BISSE'),jdecode(''),'/34801/78564.html','true',[],'',''],
		['PAGE','78585',jdecode('PIZ+BUIN'),jdecode(''),'/34801/78585.html','true',[],'',''],
		['PAGE','78606',jdecode('REDUMODEL'),jdecode(''),'/34801/78606.html','true',[],'',''],
		['PAGE','78627',jdecode('SHISEIDO'),jdecode(''),'/34801/78627.html','true',[],'',''],
		['PAGE','78648',jdecode('VICHY'),jdecode(''),'/34801/78648.html','true',[],'','']
	],'',''],
	['PAGE','33701',jdecode('RELOJER%C3%8DA'),jdecode(''),'/33701/index.html','false',[ 
		['PAGE','34101',jdecode('BREIL'),jdecode(''),'/33701/34101.html','true',[],'',''],
		['PAGE','34122',jdecode('MORELLATO'),jdecode(''),'/33701/34122.html','true',[],'',''],
		['PAGE','34143',jdecode('TIMBERLAND'),jdecode(''),'/33701/34143.html','true',[],'','']
	],'',''],
	['PAGE','33722',jdecode('JOYER%C3%8DA'),jdecode(''),'/33722.html','false',[],'',''],
	['PAGE','33743',jdecode('BISUTERIA'),jdecode(''),'/33743.html','false',[],'',''],
	['PAGE','33764',jdecode('COMPLEMENTOS'),jdecode(''),'/33764.html','false',[],'',''],
	['PAGE','74701',jdecode('DROPSHIPPING'),jdecode(''),'/74701.html','true',[],'',''],
	['PAGE','6394',jdecode('CONDICIONES'),jdecode(''),'/6394.html','true',[],'',''],
	['PAGE','11501',jdecode('CONTACTENOS'),jdecode(''),'/11501.html','true',[],'',''],
	['PAGE','11522',jdecode('PRECIOS'),jdecode(''),'/11522.html','false',[],'',''],
	['PAGE','73601',jdecode('HOSPITAL+DE+FIGUERES'),jdecode(''),'/73601.html','false',[],'','']];
var siteelementCount=35;
theSitetree.topTemplateName='Blades';
theSitetree.paletteFamily='466AD2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='31704';
theSitetree.graphicsetId='13467';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='608DFE';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'piensa',
  product: 'WSCSYSSSSLYTC2IR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blades',
				paletteFamily: 	'466AD2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'31704',
				graphicsetId: 	'13467',
				contentColor: 	'FFFFFF',
				contentBGColor: '608DFE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20110314-105729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6352',
internalId:  '',
customField: '20110418-110524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6373',
internalId:  '',
customField: '20110418-110505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6394',
internalId:  '',
customField: '20110418-110611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20110506-154858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20110216-124256'
};
webappMappings['7008']=webappMappings['7008-7905']={
webappId:    '7008',
documentId:  '11501',
internalId:  '7905',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11522',
internalId:  '',
customField: '20100305-121510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20110216-123722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20110216-131003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33701',
internalId:  '',
customField: '20100617-191857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33722',
internalId:  '',
customField: '20100617-191857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33764',
internalId:  '',
customField: '20100617-191857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33743',
internalId:  '',
customField: '20100617-191857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34143',
internalId:  '',
customField: '20100617-192706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34101',
internalId:  '',
customField: '20100617-192706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34122',
internalId:  '',
customField: '20100617-192706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34801',
internalId:  '',
customField: '20110531-184446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37701',
internalId:  '',
customField: '20110216-125144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74701',
internalId:  '',
customField: '20110531-163951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73601',
internalId:  '',
customField: '20110321-191526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76901',
internalId:  '',
customField: '20110531-175416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77201',
internalId:  '',
customField: '20110531-180949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77401',
internalId:  '',
customField: '20110531-181151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77601',
internalId:  '',
customField: '20110531-181323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77801',
internalId:  '',
customField: '20110531-181604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78001',
internalId:  '',
customField: '20110531-181809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78301',
internalId:  '',
customField: '20110531-182709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78501',
internalId:  '',
customField: '20110531-183240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78522',
internalId:  '',
customField: '20110531-183312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78543',
internalId:  '',
customField: '20110531-183348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78564',
internalId:  '',
customField: '20110531-183433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78585',
internalId:  '',
customField: '20110531-183535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78606',
internalId:  '',
customField: '20110531-183620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78627',
internalId:  '',
customField: '20110531-183651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78648',
internalId:  '',
customField: '20110531-183729'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AAS340INZCW7';
var companyName   = 'AIRE+DE+FIGUERES';
var htmlTitle	  = 'Aire+de+Figueres.+Mayoristas+de+Perfumer%C3%ADa+Selectiva.';
var metaKeywords  = 'Perfumes%0D%0AMayorista%0D%0A';
var metaContents  = 'mayorista+de+perfumeria';
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();
};

