/* [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('Ecoseal+EP'),jdecode(''),'/401/index.html','true',[ 
		['PAGE','55801',jdecode('Ecoseal+EP+%28follow+up+page%29'),jdecode(''),'/401/55801.html','false',[],'','']
	],'',''],
	['PAGE','6801',jdecode('%C2%BFQuienes+somos%3F'),jdecode(''),'/6801/index.html','true',[ 
		['PAGE','6822',jdecode('Nuestro+equipo'),jdecode(''),'/6801/6822.html','true',[],'','']
	],'',''],
	['PAGE','6885',jdecode('El+medio+ambiente'),jdecode(''),'/6885.html','true',[],'',''],
	['PAGE','56701',jdecode('Ultimas+obras'),jdecode(''),'/56701.html','true',[],'',''],
	['PAGE','50801',jdecode('Ficha+T%C3%A9cnica'),jdecode(''),'/50801.html','true',[],'',''],
	['PAGE','13422',jdecode('Presentaci%C3%B3n+'),jdecode(''),'/13422.html','true',[],'',''],
	['PAGE','6201',jdecode('Referencias'),jdecode(''),'/6201.html','true',[],'',''],
	['PAGE','6864',jdecode('Servicios'),jdecode(''),'/6864.html','true',[],'',''],
	['PAGE','6843',jdecode('Cladseal'),jdecode(''),'/6843.html','true',[],'',''],
	['PAGE','45201',jdecode('Cladseal+Detalles'),jdecode(''),'/45201.html','true',[],'',''],
	['PAGE','13401',jdecode('Cubierta+Jardin-GreenGrid+'),jdecode(''),'/13401.html','true',[],'',''],
	['PAGE','41901',jdecode('GreenGrid+Detalles'),jdecode(''),'/41901.html','true',[],'',''],
	['PAGE','6990',jdecode('Trabaje+con+nosotros'),jdecode(''),'/6990.html','true',[],'',''],
	['PAGE','35101',jdecode('C%C3%B3mo+encontrarnos'),jdecode(''),'/35101.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Stitch';
theSitetree.paletteFamily='E9F1EE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10769';
theSitetree.graphicsetId='10797';
theSitetree.contentColor='4E7C6A';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stitch',
				paletteFamily: 	'E9F1EE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10769',
				graphicsetId: 	'10797',
				contentColor: 	'4E7C6A',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'969595',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100222-185726'
};
webappMappings['7060']=webappMappings['7060-562aa4f93baf549fc0315b015777ce66']={
webappId:    '7060',
documentId:  '6201',
internalId:  '562aa4f93baf549fc0315b015777ce66',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20081030-190532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6801',
internalId:  '',
customField: '20100222-113542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6822',
internalId:  '',
customField: '20091229-173832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6843',
internalId:  '',
customField: '20100222-114452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6864',
internalId:  '',
customField: '20091229-174112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45201',
internalId:  '',
customField: '20090102-114115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50801',
internalId:  '',
customField: '20091007-094303'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-6254055']={
webappId:    '1501',
documentId:  '401',
internalId:  '6254055',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35101',
internalId:  '',
customField: '20090301-162858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6885',
internalId:  '',
customField: '20100222-114145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6990',
internalId:  '',
customField: '20090507-171920'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '35101',
internalId:  'routing',
customField: 'es_ES'
};
webappMappings['7060']=webappMappings['7060-81eee062922c4877b59fe5f0b76a93bf']={
webappId:    '7060',
documentId:  '45201',
internalId:  '81eee062922c4877b59fe5f0b76a93bf',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20100222-114706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13422',
internalId:  '',
customField: '20091229-173400'
};
webappMappings['7060']=webappMappings['7060-a84f65c67e39b7ad1f23d157354313ca']={
webappId:    '7060',
documentId:  '41901',
internalId:  'a84f65c67e39b7ad1f23d157354313ca',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20100220-183834'
};
webappMappings['7008']=webappMappings['7008-7544']={
webappId:    '7008',
documentId:  '401',
internalId:  '7544',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55801',
internalId:  '',
customField: '20090516-075828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56701',
internalId:  '',
customField: '20091223-170149'
};
var canonHostname = 'llwd718.servidoresdns.net';
var accountId     = 'AARS20INVMFE';
var companyName   = 'ECOSEAL+EP';
var htmlTitle	  = 'ECOSEAL+EP';
var metaKeywords  = 'Ecoseal+EP%2C+TPO%2C+Impermeabilizaci%C3%B3n%2C+Cubierta+Deck%2C+Cubiertas+Jardin%2C+PVC%2C+EPDM%2C+Hypalon%2C+Greengrid%2C+Cladseal.';
var metaContents  = 'titleImpermeabilizacion+tpo+cubiertas+%7C+impermeabilizacion+de+cubiertas%2Ftitle+++++meta+name%3D%C2%A8title%C2%A8+content%3D%C2%A8Impermeabilizacion+tpo+cubiertas+%7C+impermeabilizacion+de+cubiertas%C2%A8+++++meta+name%3D%C2%A8description%C2%A8+content%3D%C2%A8Impermeabilizacion+tpo+cubiertas+%7C+L%C3%A1mina+tpo+de+impermeabilizaci%C3%B3n+mono+capa%2C+para+cubiertas+planas%2C+inclinadas+y+curvadas+%7C+impermeabilizacion+de+cubiertas%C2%A8+++++meta+name%3D%C2%A8keywords%C2%A8+content%3D%C2%A8impermeabilizacion+tpo+cubiertas+de%C2%A8+++META+NAME%3DREVISIT-AFTER+CONTENT%3D7+Days+%C2%A8++META+NAME%3DREVISIT+CONTENT%3D7+days%C2%A8+++META+NAME%3DROBOT+CONTENT%3DIndex%2CFollow%C2%A8+++META+NAME%3DROBOTS%C2%A8+CONTENT%3D%C2%A8All%C2%A8+++META+NAME%3D%C2%A8DISTRIBUTION%C2%A8+CONTENT%3D%C2%A8Global%C2%A8+++meta+http-equiv%3D%C2%A8Pragma%C2%A8+content%3D%C2%A8no-cache%C2%A8+++META+NAME%3D%C2%A8RATING+CONTENT%3D%C2%A8general%C2%A8+++meta+name%3D%C2%A8language%C2%A8++content%3D%C2%A8ES%C2%A8+++META+NAME%3D%C2%A8ABSTRACT%C2%A8+CONTENT%3D%C2%A8impermeabilizacion+tpo+cubiertas%C2%A8+++META+NAME%3D%C2%A8SUBJECT%C2%A8+CONTENT%3D%C2%A8impermeabilizacion+de+cubiertas%C2%A8+++META+NAME%3D%C2%A8AUTHOR%C2%A8+CONTENT%3D%C2%A8impermeabilizacion+tpo+cubiertas%C2%A8+++META+NAME%3D%C2%A8COPYRIGHT%C2%A8+CONTENT%3D%C2%A8impermeabilizacion+de+cubiertas%C2%A8+++meta+http-equiv%3D%C2%A8Content-Type%C2%A8+content%3D%C2%A8text%2Fhtml%3B+charset%3Diso-8859-1%C2%A8+++++++script+language%3DJavaScript+type%3Dtext%2Fjavascript++%21--+++++if+%28%21document.phpAds_used%29+document.phpAds_used+%3D+%2C%3B+++++phpAds_random+%3D+new+String+%28Math.random%28%29%29%3B+phpAds_random+%3D+phpAds_random.substring%282%2C11%29%3B++++++++++document.write+%28+%2B+script+language%3DJavaScript+type%3Dtext%2Fjavascript+src%3D%29%3B+++++document.write+%28http%3A%2F%2Fbanners.ecoportal.net%2Fadjs.php%3Fn%3D+%2B+phpAds_random%29%3B+++++document.write+%28what%3Dbanner_ecoportalclientid%3D6%29%3B+++++document.write+%28exclude%3D+%2B+document.phpAds_used%29%3B+++++if+%28document.referer%29++++++++document.write+%28referer%3D+%2B+escape%28document.referer%29%29%3B+++++document.write+%28+%2B+%2Fscript%29%3B++%2F%2F--++%2Fscript++noscript++a+href%3Dhttp%3A%2F%2Fbanners.ecoportal.net%2Fadclick.php%3Fn%3Da7dcc38c+target%3D_blank++img+src%3Dhttp%3A%2F%2Fbanners.ecoportal.net%2Fadview.php%3Fclientid%3D6n%3Da7dcc38c+border%3D0+alt%3D++%2Fa%2Fnoscript+';
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();
};
