/* [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('Piso+de+Concreto'),jdecode(''),'/401/index.html','true',[ 
		['PAGE','34401',jdecode('Materiales'),jdecode(''),'/401/34401.html','true',[],'',''],
		['PAGE','49101',jdecode('Moldes'),jdecode(''),'/401/49101.html','true',[],'',''],
		['PAGE','34422',jdecode('Color'),jdecode(''),'/401/34422.html','true',[],'',''],
		['PAGE','34443',jdecode('Desmoldante'),jdecode(''),'/401/34443.html','true',[],'',''],
		['PAGE','34464',jdecode('Selladores'),jdecode(''),'/401/34464.html','true',[],'','']
	],'',''],
	['PAGE','494',jdecode('Concreto+Estampado'),jdecode(''),'/494/index.html','true',[ 
		['PAGE','557',jdecode('Overlay+Estampado'),jdecode(''),'/494/557.html','true',[],'',''],
		['PAGE','515',jdecode('Oxipiso'),jdecode(''),'/494/515.html','true',[],'',''],
		['PAGE','536',jdecode('Pulido'),jdecode(''),'/494/536.html','true',[],'',''],
		['PAGE','473',jdecode('Grabado'),jdecode(''),'/494/473.html','true',[],'',''],
		['PAGE','578',jdecode('Mantenimiento'),jdecode(''),'/494/578.html','true',[],'','']
	],'',''],
	['PAGE','55537',jdecode('Galeria+Estampado'),jdecode(''),'/55537.html','true',[],'',''],
	['PAGE','39622',jdecode('Galeria+Oxipiso'),jdecode(''),'/39622.html','true',[],'',''],
	['PAGE','45901',jdecode('Galeria+Modelos'),jdecode(''),'/45901.html','true',[],'',''],
	['PAGE','620',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/620.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Plains';
theSitetree.paletteFamily='999A99';
theSitetree.keyvisualId='7886';
theSitetree.keyvisualName='blanko.swf';
theSitetree.fontsetId='16856';
theSitetree.graphicsetId='12305';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Plains',
				paletteFamily: 	'999A99',
				keyvisualId: 	'7886',
				keyvisualName: 	'blanko.swf',
				fontsetId: 		'16856',
				graphicsetId: 	'12305',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '401',
internalId:  '1501',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-2878b984a2fafc97bbc74b8c6b4cd8dc']={
webappId:    '7060',
documentId:  '39622',
internalId:  '2878b984a2fafc97bbc74b8c6b4cd8dc',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100206-164031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100115-190240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20100115-185438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20100115-185948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20100115-190013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20100115-185533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20091008-224243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39622',
internalId:  '',
customField: '20090621-182707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20090914-002630'
};
webappMappings['7008']=webappMappings['7008-5845']={
webappId:    '7008',
documentId:  '620',
internalId:  '5845',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34401',
internalId:  '',
customField: '20100206-164228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34422',
internalId:  '',
customField: '20100115-185230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34443',
internalId:  '',
customField: '20100115-185314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34464',
internalId:  '',
customField: '20090325-231129'
};
webappMappings['7060']=webappMappings['7060-842a56aaa54bf3d1ca1fb43145e19428']={
webappId:    '7060',
documentId:  '45901',
internalId:  '842a56aaa54bf3d1ca1fb43145e19428',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45901',
internalId:  '',
customField: '20091102-203920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49101',
internalId:  '',
customField: '20100614-125854'
};
webappMappings['7060']=webappMappings['7060-c0d047e849dc0412b245fbc6bc97e93f']={
webappId:    '7060',
documentId:  '55537',
internalId:  'c0d047e849dc0412b245fbc6bc97e93f',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55537',
internalId:  '',
customField: '20091102-203847'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPWUY';
var companyName   = 'DECOR+PISO';
var htmlTitle	  = 'Concreto+Estampado';
var metaKeywords  = 'acido+para+concreto-cemento+pulido-concreto+decorativo-concreto+estampado-venta+de+piso-piso+para+exterior-cemento+pulido-desmoldante-sellador-color+endurecedor-mantenimiento+de+pisos-concretos+estampados';
var metaContents  = 'Especialistas+en+Concreto+Estampado%2C++Mantenimiento+Instalacion+y+Restauracion+de+Pisos';
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();
};
