/* [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','12',jdecode('Aplica%C3%A7%C3%B5es%2C+Vantagens...'),jdecode(''), jdecode('%2F12.html'), 'true',[],'',''],
	['PAGE','42',jdecode('PISOS+INTERTRAVADOS'),jdecode(''), jdecode('%2F42.html'), 'true',[],'',''],
	['PAGE','51',jdecode('PISOGRAMA+-+CONCREGR.'),jdecode(''), jdecode('%2F51%2Findex.html'), 'true',[ 
		['PAGE','61701',jdecode('Solicite+Or%C3%A7amento'),jdecode(''), jdecode('%2F51%2F61701.html'), 'true',[],'','']
	],'',''],
	['PAGE','33',jdecode('PARALELEP%C3%8DPEDOS'),jdecode(''), jdecode('%2F33%2Findex.html'), 'true',[ 
		['PAGE','63601',jdecode('Solicite+Or%C3%A7amento'),jdecode(''), jdecode('%2F33%2F63601.html'), 'true',[],'','']
	],'',''],
	['PAGE','60',jdecode('CAL%C3%87ADA+PRONTA'),jdecode(''), jdecode('%2F60%2Findex.html'), 'true',[ 
		['PAGE','63622',jdecode('Solicite+Or%C3%A7amento'),jdecode(''), jdecode('%2F60%2F63622.html'), 'true',[],'','']
	],'',''],
	['PAGE','5485',jdecode('GUIAS+%28MEIO+FIO%29'),jdecode(''), jdecode('%2F5485.html'), 'true',[],'',''],
	['PAGE','2574',jdecode('Cal%C3%A7adas+-+Dicas'),jdecode(''), jdecode('%2F2574.html'), 'true',[],'',''],
	['PAGE','27901',jdecode('Prote%C3%A7%C3%A3o+e+Limpeza+%28Dicas%29'),jdecode(''), jdecode('%2F27901.html'), 'true',[],'',''],
	['PAGE','101301',jdecode('Premoldados+de+Concreto'),jdecode(''), jdecode('%2F101301.html'), 'true',[],'',''],
	['PAGE','102701',jdecode('Serv.+de+TERRAPLENAGEM'),jdecode(''), jdecode('%2F102701.html'), 'true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Corporate';
theSitetree.paletteFamily='8AA92A';
theSitetree.keyvisualId='11070';
theSitetree.keyvisualName='kv_11070.jpg';
theSitetree.fontsetId='31953';
theSitetree.graphicsetId='13793';
theSitetree.contentColor='888D92';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0X9A9'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Corporate',
				paletteFamily: 	'8AA92A',
				keyvisualId: 	'11070',
				keyvisualName: 	'kv_11070.jpg',
				fontsetId: 		'31953',
				graphicsetId: 	'13793',
				contentColor: 	'888D92',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '51',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-1604']={
webappId:    '7008',
documentId:  '51',
internalId:  '1604',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-1603']={
webappId:    '7008',
documentId:  '42',
internalId:  '1603',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-1605']={
webappId:    '7008',
documentId:  '33',
internalId:  '1605',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-1606']={
webappId:    '7008',
documentId:  '60',
internalId:  '1606',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-1607']={
webappId:    '7008',
documentId:  '61701',
internalId:  '1607',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-1608']={
webappId:    '7008',
documentId:  '5485',
internalId:  '1608',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-1609']={
webappId:    '7008',
documentId:  '63601',
internalId:  '1609',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-1610']={
webappId:    '7008',
documentId:  '63622',
internalId:  '1610',
customField: 'language:pt;country:BR;'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '51',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12',
internalId:  '',
customField: '20110802-094614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42',
internalId:  '',
customField: '20110802-094750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51',
internalId:  '',
customField: '20110802-093508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61701',
internalId:  '',
customField: '20110802-093617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33',
internalId:  '',
customField: '20110802-093752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63601',
internalId:  '',
customField: '20110802-101737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60',
internalId:  '',
customField: '20120128-192011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63622',
internalId:  '',
customField: '20120128-193400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5485',
internalId:  '',
customField: '20110802-094158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2574',
internalId:  '',
customField: '20120128-142143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27901',
internalId:  '',
customField: '20110802-094401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101301',
internalId:  '',
customField: '20101008-173546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102701',
internalId:  '',
customField: '20101008-173644'
};
webappMappings['1501']=webappMappings['1501-2339472']={
webappId:    '1501',
documentId:  '51',
internalId:  '2339472',
customField: '1501'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2SUG';
var companyName   = 'ECOPISOS+pavimenta%C3%A7%C3%A3o+ecol%C3%B3gica';
var htmlTitle	  = '';
var metaKeywords  = 'pisograma%2C+concregrama%2C+piso+grama%2C+pisograma+concreto%2C+ecopiso%2C+ecopisos%2C+piso+drenante%2C+piso+drenante+concreto%2C+piso+ecologico%2C+piso+ecologico+concreto%2C+piso+vazado%2C+piso+vazado+concreto';
var metaContents  = 'Pisograma%2C+utilizados+para+conservar+a+GRAMA+nas+passagens+e+estacionamentos+de+ve%C3%ADculos.++';
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();
};

