/* [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','4598',jdecode('Home'),jdecode(''),'/4598.html','true',[],'',''],
	['PAGE','4682',jdecode('C%C3%A1rcamos+-+Trench+Grating'),jdecode(''),'/4682.html','true',[],'',''],
	['PAGE','5518',jdecode('Drenajes+Puntuales+-+Drains'),jdecode(''),'/5518.html','true',[],'',''],
	['PAGE','5545',jdecode('Tapas+Inspecci%C3%B3n+-+Manholes'),jdecode(''),'/5545.html','true',[],'',''],
	['PAGE','5572',jdecode('Otros+Productos+-+Novedades'),jdecode(''),'/5572.html','true',[],'',''],
	['PAGE','5150',jdecode('Galeria+de+Fotos'),jdecode(''),'/5150.html','true',[],'',''],
	['PAGE','12094',jdecode('Normas+-+Noticias'),jdecode(''),'/12094.html','true',[],'',''],
	['PAGE','5599',jdecode('Contactenos'),jdecode(''),'/5599.html','true',[],'',''],
	['PAGE','5626',jdecode('Clientes+-+Distribuidores'),jdecode(''),'/5626.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Business';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='2487';
theSitetree.keyvisualName='seminar.jpg';
theSitetree.fontsetId='418';
theSitetree.graphicsetId='463';
theSitetree.contentColor='020E66';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'grp13-hosti3',
  product: 'WSCVWLSSSLYTC2IW'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Business',
				paletteFamily: 	'003366',
				keyvisualId: 	'2487',
				keyvisualName: 	'seminar.jpg',
				fontsetId: 		'418',
				graphicsetId: 	'463',
				contentColor: 	'020E66',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4598',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-430bf7782b23fb74994686f486c3a735']={
webappId:    '7060',
documentId:  '5150',
internalId:  '430bf7782b23fb74994686f486c3a735',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20101124-234635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4682',
internalId:  '',
customField: '20070706-194159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5518',
internalId:  '',
customField: '20061019-120840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5599',
internalId:  '',
customField: '20090303-211314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5626',
internalId:  '',
customField: '20050803-221950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12094',
internalId:  '',
customField: '20061021-172929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5150',
internalId:  '',
customField: '20050727-172323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5545',
internalId:  '',
customField: '20061021-172548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5572',
internalId:  '',
customField: '20061019-115708'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INX28Y';
var companyName   = 'METAL+FDC+Ltda.';
var htmlTitle	  = 'MetalFdC';
var metaKeywords  = 'manhole%2C+drain%2C+rejilla%2C+sumidero%2C+tapa%2C+alcantarillado%2C+cajilla%2C+contador%2C+trench+grating%2C+gully%2C+roof+drain%2C+tragante%2C+piso%2C+industrial%2C+fundici%C3%B3n%2C+metalurgia%2C+metalmecanica%2C+metalurgica%2C+construccion%2C+box+cover%2C+meter+box%2C+metalfdc%2C+metal+fdc%2C+metal%2C+metaldeck%2C+fdc%2C+bolardo%2C+arotapa%2C+aerotapa%2C+parrilla%2C+pilona%2C+poste%2C+drenaje%2C+luminaria%2C+aluminio%2C+hierro%2C+bronce%2C+gris%2C+nodular%2C+amoblamiento%2C+urbano%2C+colrejillas%2C+colombiana+de+rejillas%2C+elprecon%2C+rejincol%2C+karma%2C+taesmet%2C+perfiglass%2C+tecnoremovibles%2C+emeco%2C+faberlux%2C+estibas%2C+plasticas%2C+plastico%2C+rejillas%2C+fanalrej%2C+fundametales%2C+fundimetales%2C+gametal%2C+pronalrej%2C+rejicali%2C+inspeccion%2C+metalplast%2C+metalplas%2C+superior%2C+vargas+claudia%2C+delima%2C+de+lima%2C+induasro%2C+maderplast%2C+maderplas%2C+metalconcreto%2C+silplas%2C+silplast%2C+taller%2C+pasuy%2C+cover%2C+tapa%2C+inspeccion%2C+piso%2C+estructural%2C+plataforma%2C+carcamo%2C+cancamo%2C+drenaje%2C+rioplast%2C+rioplas%2C+vallejo%2C+energy%2C+control%2C+laminaire%2C+metaltec%2C+fundiciones%2C+delima%2C+de+lima%2C+metalconcreto%2C+metalplas%2C+metalplast%2C+rejimetal%2C+taller%2C+pasuy%2C+elprecom%2C+dischem%2C+protco%2C+vargas+claudia%2C+campana%2C+campanas%2C+de+iglesia%2C+tapas%2C+cajas%2C+grating%2C+box%2C+inyeccion%2C+arena%2C+fundiciones%2C+cast%2C+foundry%2C+castro%2C+jovita%2C+trench%2C+inyection%2C+plast%2C+tecnometales%2C+tecnometal%2C+saint%2C+gobain%2C+pamcol%2C+irving%2C+jorge%2C+herrera%2C+drenage%2C+drenajes%2C+sosco%2C+fundido%2C+sumideros%2C+bocatomas%2C+bocatoma%2C+robo%2C+urbanismo%2C+ventilacion%2C+contadores%2C+medidores%2C+eaab%2C+codensa%2C+telefonos%2C+epm%2C+alcantarilla%2C+alcantarillas%2C+';
var metaContents  = 'MetalFdC+produce+accesorios+para+acueducto+y+alcantarillado%2C+rejillas%2C+sumideros%2C+amoblamiento+urbano%2C+servicios+de+fundicion';
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();
};

