/* [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('Nosotros'),jdecode(''),'/552.html','true',[],''],
	['PAGE','573',jdecode('Productos+'),jdecode(''),'/573/index.html','true',[ 
		['PAGE','594',jdecode('Tazas'),jdecode(''),'/573/594.html','true',[],''],
		['PAGE','615',jdecode('Tarros'),jdecode(''),'/573/615.html','true',[],''],
		['PAGE','636',jdecode('Tequileros'),jdecode(''),'/573/636.html','true',[],''],
		['PAGE','657',jdecode('Ceniceros'),jdecode(''),'/573/657.html','true',[],''],
		['PAGE','678',jdecode('Vasito'),jdecode(''),'/573/678.html','true',[],''],
		['PAGE','699',jdecode('Vela'),jdecode(''),'/573/699.html','true',[],''],
		['PAGE','720',jdecode('Vaso'),jdecode(''),'/573/720.html','true',[],''],
		['PAGE','741',jdecode('Plato'),jdecode(''),'/573/741.html','true',[],'']
	],''],
	['PAGE','23401',jdecode('Publicidad'),jdecode(''),'/23401.html','true',[],''],
	['PAGE','24401',jdecode('Souvenir'),jdecode(''),'/24401.html','true',[],''],
	['PAGE','26101',jdecode('Catalogo'),jdecode(''),'/26101/index.html','true',[ 
		['PAGE','26143',jdecode('Cumplea%C3%B1os'),jdecode(''),'/26101/26143.html','true',[],''],
		['PAGE','26164',jdecode('Tutti+Bambini'),jdecode(''),'/26101/26164.html','true',[],''],
		['PAGE','26185',jdecode('Vaca'),jdecode(''),'/26101/26185.html','true',[],''],
		['PAGE','26206',jdecode('Tazas+Virgencita'),jdecode(''),'/26101/26206.html','true',[],''],
		['PAGE','41601',jdecode('Velas+Virgencita+'),jdecode(''),'/26101/41601.html','true',[],''],
		['PAGE','26227',jdecode('Navidad'),jdecode(''),'/26101/26227.html','true',[],''],
		['PAGE','26248',jdecode('Bromas'),jdecode(''),'/26101/26248.html','true',[],'']
	],''],
	['PAGE','66301',jdecode('San+Valentin'),jdecode(''),'/66301.html','true',[],''],
	['PAGE','27501',jdecode('Lista+de+Precios'),jdecode(''),'/27501.html','true',[],''],
	['PAGE','762',jdecode('Cont%C3%A1ctanos'),jdecode(''),'/762.html','true',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Retro';
theSitetree.paletteFamily='990000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='204';
theSitetree.graphicsetId='246';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Retro',
				paletteFamily: 	'990000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'204',
				graphicsetId: 	'246',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'990000',
				b_color: 		'FF9900',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'EAEAEA',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-1711']={
webappId:    '7008',
documentId:  '762',
internalId:  '1711',
customField: 'language:es;country:ES;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20081223-104241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20080816-144333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20080816-164112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20080816-165154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20070905-113941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20070905-114010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20070905-114037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20070905-114059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20070905-114126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '720',
internalId:  '',
customField: '20070905-114219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20070905-112339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23401',
internalId:  '',
customField: '20070927-132828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24401',
internalId:  '',
customField: '20070927-134632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20080816-215107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26143',
internalId:  '',
customField: '20070923-222639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26164',
internalId:  '',
customField: '20070923-213030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26185',
internalId:  '',
customField: '20070927-140810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26206',
internalId:  '',
customField: '20080816-220047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41601',
internalId:  '',
customField: '20070925-173726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26227',
internalId:  '',
customField: '20080816-200219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26248',
internalId:  '',
customField: '20070927-144808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27501',
internalId:  '',
customField: '20070927-155824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20070914-113020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66301',
internalId:  '',
customField: '20081222-193256'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLBPA';
var companyName   = 'Plumas+y+Cer%C3%A1mica';
var htmlTitle	  = 'Plumas+y++Cer%C3%A1mica';
var metaKeywords  = 'cer%C3%A1mica+y+vidrio%2C+impresi%C3%B3n+en+serigrafia%2C+horneada+y+Sandblast%2C+Souvenirs%2C+Publicidad+y+Regalo';
var metaContents  = 'cer%C3%A1mica+y+vidrio%2C+impresi%C3%B3n+en+serigrafia%2C+horneada+y+Sandblast%2C+Souvenirs%2C+Publicidad+y+Regalo';
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();
};
