/* [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','501',jdecode('P%C3%A1gina+inicial'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','163567',jdecode('Quem+somos'),jdecode(''), jdecode('%2F163567%2Findex.html'), 'true',[ 
		['PAGE','163588',jdecode('Hist%C3%B3ria+do+grupo'),jdecode(''), jdecode('%2F163567%2F163588.html'), 'true',[],'','']
	],'',''],
	['PAGE','163609',jdecode('Componentes'),jdecode(''), jdecode('%2F163609%2Findex.html'), 'true',[ 
		['PAGE','169988',jdecode('Wanderson+Fuzaro'),jdecode(''), jdecode('%2F163609%2F169988.html'), 'true',[],'',''],
		['PAGE','170072',jdecode('Welerson+Silva'),jdecode(''), jdecode('%2F163609%2F170072.html'), 'true',[],'',''],
		['PAGE','169967',jdecode('Israel+Soares'),jdecode(''), jdecode('%2F163609%2F169967.html'), 'true',[],'',''],
		['PAGE','170114',jdecode('Ediel+Oliveira'),jdecode(''), jdecode('%2F163609%2F170114.html'), 'true',[],'',''],
		['PAGE','170009',jdecode('Alfredo+Neto'),jdecode(''), jdecode('%2F163609%2F170009.html'), 'true',[],'',''],
		['PAGE','170093',jdecode('Natan+Silva'),jdecode(''), jdecode('%2F163609%2F170093.html'), 'true',[],'',''],
		['PAGE','170051',jdecode('Eduardo+Moreira'),jdecode(''), jdecode('%2F163609%2F170051.html'), 'true',[],'',''],
		['PAGE','173167',jdecode('Manoel+Junior'),jdecode(''), jdecode('%2F163609%2F173167.html'), 'true',[],'',''],
		['PAGE','170156',jdecode('Luiz+Fernando'),jdecode(''), jdecode('%2F163609%2F170156.html'), 'true',[],'',''],
		['PAGE','170135',jdecode('Dud%C3%BA+Oliveira'),jdecode(''), jdecode('%2F163609%2F170135.html'), 'true',[],'','']
	],'',''],
	['PAGE','163088',jdecode('Videos'),jdecode(''), jdecode('%2F163088.html'), 'true',[],'',''],
	['PAGE','163067',jdecode('Redes+Sociais'),jdecode(''), jdecode('%2F163067.html'), 'true',[],'',''],
	['PAGE','163109',jdecode('Fotos'),jdecode(''), jdecode('%2F163109.html'), 'true',[],'',''],
	['PAGE','163630',jdecode('M%C3%BAsica'),jdecode(''), jdecode('%2F163630%2Findex.html'), 'true',[ 
		['PAGE','163651',jdecode('MP3'),jdecode(''), jdecode('%2F163630%2F163651.html'), 'true',[],'',''],
		['PAGE','163672',jdecode('CDs'),jdecode(''), jdecode('%2F163630%2F163672.html'), 'true',[],'','']
	],'',''],
	['PAGE','163693',jdecode('Not%C3%ADcias'),jdecode(''), jdecode('%2F163693%2Findex.html'), 'true',[ 
		['PAGE','163714',jdecode('Agenda'),jdecode(''), jdecode('%2F163693%2F163714.html'), 'true',[],'',''],
		['PAGE','163735',jdecode('Datas+da+tourn%C3%A9e'),jdecode(''), jdecode('%2F163693%2F163735.html'), 'true',[],'','']
	],'',''],
	['PAGE','163756',jdecode('Contato'),jdecode(''), jdecode('%2F163756.html'), 'true',[],'',''],
	['PAGE','169267',jdecode('Livro+de+Visitas'),jdecode(''), jdecode('%2F169267.html'), 'true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Holz';
theSitetree.paletteFamily='C239A1';
theSitetree.keyvisualId='8817';
theSitetree.keyvisualName='KV_03.swf';
theSitetree.fontsetId='17181';
theSitetree.graphicsetId='12652';
theSitetree.contentColor='B69654';
theSitetree.contentBGColor='262626';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0X9A9'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Holz',
				paletteFamily: 	'C239A1',
				keyvisualId: 	'8817',
				keyvisualName: 	'KV_03.swf',
				fontsetId: 		'17181',
				graphicsetId: 	'12652',
				contentColor: 	'B69654',
				contentBGColor: '262626',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'C039A3',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '501',
internalId:  '1501',
customField: '1501'
};
webappMappings['1501']=webappMappings['1501-1840718']={
webappId:    '1501',
documentId:  '501',
internalId:  '1840718',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-169267avec10ine7hu']={
webappId:    '1002',
documentId:  '169267',
internalId:  '169267avec10ine7hu',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169267',
internalId:  '',
customField: '20110824-204204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169967',
internalId:  '',
customField: '20110824-202123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169988',
internalId:  '',
customField: '20110825-053910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170009',
internalId:  '',
customField: '20110825-055053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '173167',
internalId:  '',
customField: '20110825-071443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170051',
internalId:  '',
customField: '20110825-065533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170072',
internalId:  '',
customField: '20110825-064406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170093',
internalId:  '',
customField: '20110825-065418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170114',
internalId:  '',
customField: '20110825-065315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170135',
internalId:  '',
customField: '20110825-064827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170156',
internalId:  '',
customField: '20110825-064735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20110824-170139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163067',
internalId:  '',
customField: '20110824-102738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163088',
internalId:  '',
customField: '20110824-103140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163109',
internalId:  '',
customField: '20110824-172755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163567',
internalId:  '',
customField: '20110825-071527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163756',
internalId:  '',
customField: '20110824-114624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163693',
internalId:  '',
customField: '20110824-173135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163630',
internalId:  '',
customField: '20110824-114759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163588',
internalId:  '',
customField: '20110824-171939'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163609',
internalId:  '',
customField: '20110824-202511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163651',
internalId:  '',
customField: '20110824-172902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163672',
internalId:  '',
customField: '20110824-173011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163714',
internalId:  '',
customField: '20110824-173242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163735',
internalId:  '',
customField: '20110824-173331'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INE7HU';
var companyName   = 'Minist%C3%A9rio+Quarteto+Adora%C3%A7%C3%A3o+';
var htmlTitle	  = 'Quarteto+Adora%C3%A7%C3%A3o';
var metaKeywords  = 'Quarteto';
var metaContents  = 'Quarteto+Adora%C3%A7%C3%A3o';
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();
};

