/* [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 theSitetree=[ 
	['PAGE','501',jdecode('Inicio'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('Productos'),jdecode(''),'/552/index.html','true',[ 
		['PAGE','17201',jdecode('toallas+bordadas'),jdecode(''),'/552/17201.html','true',[],''],
		['PAGE','15501',jdecode('pa%C3%B1os+de+cocina'),jdecode(''),'/552/15501.html','true',[],''],
		['PAGE','28101',jdecode('lisos+Glamour'),jdecode(''),'/552/28101.html','true',[],''],
		['PAGE','31901',jdecode('lisos+feeling'),jdecode(''),'/552/31901.html','true',[],'']
	],''],
	['PAGE','573',jdecode('%C2%BFQuienes+somos%3F'),jdecode(''),'/573.html','true',[],''],
	['PAGE','636',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/636.html','true',[],''],
	['PAGE','16801',jdecode('Blog'),jdecode(''),'/16801.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Palette';
theSitetree.paletteFamily='CC0000';
theSitetree.keyvisualId='9341';
theSitetree.keyvisualName='kv_9341.jpg';
theSitetree.fontsetId='17396';
theSitetree.graphicsetId='12795';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				name: 			'Palette',
				paletteFamily: 	'CC0000',
				keyvisualId: 	'9341',
				keyvisualName: 	'kv_9341.jpg',
				fontsetId: 		'17396',
				graphicsetId: 	'12795',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-367']={
webappId:    '7008',
documentId:  '636',
internalId:  '367',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-b8594d632e85a73a7a073f4b3289388c']={
webappId:    '7060',
documentId:  '15501',
internalId:  'b8594d632e85a73a7a073f4b3289388c',
customField: 'language:es;country:ES;'
};
webappMappings['7050']=webappMappings['7050-42']={
webappId:    '7050',
documentId:  '16801',
internalId:  '42',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-5aa8e4a692ae12b277df1e8b487c9a09']={
webappId:    '7060',
documentId:  '17201',
internalId:  '5aa8e4a692ae12b277df1e8b487c9a09',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-cab47c50994ece4cd8a42e172705d48e']={
webappId:    '7060',
documentId:  '28101',
internalId:  'cab47c50994ece4cd8a42e172705d48e',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-7f79e4e5b0343a16bfaf51ed39c232bf']={
webappId:    '7060',
documentId:  '31901',
internalId:  '7f79e4e5b0343a16bfaf51ed39c232bf',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20090128-062702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20061229-055541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17201',
internalId:  '',
customField: '20090128-065455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20061230-195126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28101',
internalId:  '',
customField: '20061230-195922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31901',
internalId:  '',
customField: '20061230-200008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20080902-121604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20061230-143655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16801',
internalId:  '',
customField: '20100805-162523'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABRI10IN2UGB';
var companyName   = 'Poesia+visual...+Poesia+t%C3%A1ctil...+ed%C3%B3nicamente+c%C3%B3mplices...+++++++++++++';
var htmlTitle	  = 'Toallas+Risart+-++venta+de+toallas%2Carticulos+de+rizo%2C+pa%C3%B1os+de+cocina%2C+sabanas+y+doda+clase+de+textiles+para+el+hogar';
var metaKeywords  = 'Toallas%2C+rizo%2C+albornoces%2C+alfombras+de+ba%C3%B1o%2C+pa%C3%B1os+de+cocina%2C+sabanas%2Cfundas+nordicas%2Ccolchas%2Ccojines.+bordados%2C+estampado+y+jacquard.Poesia+visual+y+t%C3%A1ctil';
var metaContents  = 'Fabricamos+e+importamos%3A+toallas%2C+albornoces%2C+playeras+y+toda+clase+de+tejidos+de+rizo.+Tambien+sabanas%2C+colchas%2C+fundas+nordicas+y+complementos+de+tejidos+para+el+hogar.+Para+venta+al+mayor+y+detall';
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();
};
