/* [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','901',jdecode('NOSOTROS'),jdecode(''),'/901.html','true',[],'',''],
	['PAGE','3001',jdecode('CAF%C3%89'),jdecode(''),'/3001/index.html','true',[ 
		['PAGE','3022',jdecode('Caf%C3%A9+Cerezo'),jdecode(''),'/3001/3022.html','true',[],'',''],
		['PAGE','3043',jdecode('Caf%C3%A9+Oriental'),jdecode(''),'/3001/3043.html','true',[],'','']
	],'',''],
	['PAGE','952',jdecode('JARABES'),jdecode(''),'/952/index.html','true',[ 
		['PAGE','973',jdecode('Da+Vinci'),jdecode(''),'/952/973.html','true',[],'',''],
		['PAGE','994',jdecode('Oscar%60s'),jdecode(''),'/952/994.html','true',[],'',''],
		['PAGE','1015',jdecode('Monin'),jdecode(''),'/952/1015.html','true',[],'','']
	],'',''],
	['PAGE','3443',jdecode('POLVOS+PARA+FRAPPE'),jdecode(''),'/3443/index.html','true',[ 
		['PAGE','3401',jdecode('Frappease'),jdecode(''),'/3443/3401.html','true',[],'',''],
		['PAGE','3422',jdecode('Caffee+D%60Amore'),jdecode(''),'/3443/3422.html','true',[],'','']
	],'',''],
	['PAGE','1036',jdecode('VASOS'),jdecode(''),'/1036/index.html','true',[ 
		['PAGE','1057',jdecode('Carton+Encerado'),jdecode(''),'/1036/1057.html','true',[],'',''],
		['PAGE','1078',jdecode('Pet+%28Cristal-Domo%29'),jdecode(''),'/1036/1078.html','true',[],'',''],
		['PAGE','1120',jdecode('T%C3%A9rmico'),jdecode(''),'/1036/1120.html','true',[],'',''],
		['PAGE','1141',jdecode('Trophy+%28Laminado%29'),jdecode(''),'/1036/1141.html','true',[],'',''],
		['PAGE','1099',jdecode('Vending'),jdecode(''),'/1036/1099.html','true',[],'','']
	],'',''],
	['PAGE','1204',jdecode('PULPAS+NATURALES'),jdecode(''),'/1204.html','true',[],'',''],
	['PAGE','1246',jdecode('T%C3%89+GOURMET'),jdecode(''),'/1246/index.html','true',[ 
		['PAGE','21801',jdecode('Euro+Te'),jdecode(''),'/1246/21801.html','true',[],'',''],
		['PAGE','2701',jdecode('Te+Chai'),jdecode(''),'/1246/2701.html','true',[],'',''],
		['PAGE','21822',jdecode('La+Pastora'),jdecode(''),'/1246/21822.html','true',[],'','']
	],'',''],
	['PAGE','34101',jdecode('CONGELADOS'),jdecode(''),'/34101/index.html','true',[ 
		['PAGE','1225',jdecode('Rich'),jdecode(''),'/34101/1225.html','true',[],'','']
	],'',''],
	['PAGE','1267',jdecode('ESTUCHADOS'),jdecode(''),'/1267.html','true',[],'',''],
	['PAGE','1288',jdecode('MAQUINAS'),jdecode(''),'/1288.html','true',[],'',''],
	['PAGE','1309',jdecode('VARIOS'),jdecode(''),'/1309.html','true',[],'',''],
	['PAGE','8001',jdecode('CRISTIAN+Mat.Primas'),jdecode(''),'/8001.html','true',[],'',''],
	['PAGE','58386',jdecode('Libro+de+visitas'),jdecode(''),'/58386/index.html','true',[ 
		['PAGE','58381',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/58386/58381.html','false',[],'','']
	],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Retail';
theSitetree.paletteFamily='C5E099';
theSitetree.keyvisualId='11797';
theSitetree.keyvisualName='kv_11797.jpg';
theSitetree.fontsetId='33064';
theSitetree.graphicsetId='14046';
theSitetree.contentColor='3f3f3f';
theSitetree.contentBGColor='C5E099';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Retail',
				paletteFamily: 	'C5E099',
				keyvisualId: 	'11797',
				keyvisualName: 	'kv_11797.jpg',
				fontsetId: 		'33064',
				graphicsetId: 	'14046',
				contentColor: 	'3f3f3f',
				contentBGColor: 'C5E099',
				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:  '952',
internalId:  '',
customField: '20090902-104943'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-6578767']={
webappId:    '1501',
documentId:  '901',
internalId:  '6578767',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20100810-144006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58386',
internalId:  '',
customField: '20080605-100737'
};
webappMappings['1002']=webappMappings['1002-58386avec10inlyuv']={
webappId:    '1002',
documentId:  '58386',
internalId:  '58386avec10inlyuv',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '973',
internalId:  '',
customField: '20100810-130724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '994',
internalId:  '',
customField: '20100810-131055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1015',
internalId:  '',
customField: '20071007-104708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34101',
internalId:  '',
customField: '20090318-230945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20100810-125005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3022',
internalId:  '',
customField: '20071007-074138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3043',
internalId:  '',
customField: '20071007-073418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3443',
internalId:  '',
customField: '20081124-204825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20070829-103633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3422',
internalId:  '',
customField: '20071007-083319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1036',
internalId:  '',
customField: '20100810-131652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1057',
internalId:  '',
customField: '20081124-204935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1078',
internalId:  '',
customField: '20100810-131727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1120',
internalId:  '',
customField: '20070825-125324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1141',
internalId:  '',
customField: '20070830-103609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1099',
internalId:  '',
customField: '20070825-141334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1204',
internalId:  '',
customField: '20081124-205104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1246',
internalId:  '',
customField: '20100810-135148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20071007-075103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20070829-171739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21822',
internalId:  '',
customField: '20100810-135731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1225',
internalId:  '',
customField: '20070930-065320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1267',
internalId:  '',
customField: '20070826-144942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1288',
internalId:  '',
customField: '20090318-231026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1309',
internalId:  '',
customField: '20070827-070526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8001',
internalId:  '',
customField: '20070830-082936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58381',
internalId:  '',
customField: '20080605-100737'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLYUV';
var companyName   = 'COFFEE+SHOP+++Todo+para+su+Cafeteria';
var htmlTitle	  = '';
var metaKeywords  = 'vasos+desechables+insumos+para+cafeteria+cafe+to+do+para+su+cafeteria';
var metaContents  = 'productos+para+cafeteria+insumos+vasos+desechables+cafe+';
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();
};
