/* [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('Home'),jdecode(''),'/12.html','true',[],'',''],
	['PAGE','1997',jdecode('AYA+Tradu%C3%A7%C3%A3o'),jdecode(''),'/1997/index.html','true',[ 
		['PAGE','3454',jdecode('Perguntas+Frequentes'),jdecode(''),'/1997/3454.html','true',[],'','']
	],'',''],
	['PAGE','57401',jdecode('AYA+Interpreta%C3%A7%C3%A3o'),jdecode(''),'/57401.html','true',[],'',''],
	['PAGE','57422',jdecode('AYA+Revis%C3%A3o+Textual'),jdecode(''),'/57422.html','true',[],'',''],
	['PAGE','57443',jdecode('AYA+Pedag%C3%B3gico'),jdecode(''),'/57443/index.html','true',[ 
		['PAGE','54101',jdecode('Cursos+de+Portugu%C3%AAs'),jdecode(''),'/57443/54101.html','true',[],'',''],
		['PAGE','54122',jdecode('Treinamento+p%2F+Professores'),jdecode(''),'/57443/54122.html','true',[],'',''],
		['PAGE','9201',jdecode('Publica%C3%A7%C3%B5es'),jdecode(''),'/57443/9201.html','true',[],'','']
	],'',''],
	['PAGE','54143',jdecode('Clientes'),jdecode(''),'/54143.html','true',[],'',''],
	['PAGE','1988',jdecode('A+Empresa'),jdecode(''),'/1988/index.html','true',[ 
		['PAGE','57464',jdecode('Valores'),jdecode(''),'/1988/57464.html','true',[],'',''],
		['PAGE','35601',jdecode('O+Nome+%22AYA%22'),jdecode(''),'/1988/35601.html','true',[],'','']
	],'',''],
	['PAGE','3245',jdecode('Quem+Somos'),jdecode(''),'/3245.html','true',[],'',''],
	['PAGE','37501',jdecode('Parceiros'),jdecode(''),'/37501.html','true',[],'',''],
	['PAGE','2006',jdecode('Contato'),jdecode(''),'/2006.html','true',[],'',''],
	['PAGE','61801',jdecode('%C3%81lbum+AYA'),jdecode(''),'/61801.html','true',[],'',''],
	['PAGE','3534',jdecode('Livro+de+visitas%2FF%C3%B3rum'),jdecode(''),'/3534/index.html','true',[ 
		['PAGE','3533',jdecode('Servi%C3%A7o+de+bilhetes'),jdecode(''),'/3534/3533.html','false',[],'','']
	],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='006633';
theSitetree.keyvisualId='1427';
theSitetree.keyvisualName='tastatur.jpg';
theSitetree.fontsetId='234';
theSitetree.graphicsetId='280';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Startup',
				paletteFamily: 	'006633',
				keyvisualId: 	'1427',
				keyvisualName: 	'tastatur.jpg',
				fontsetId: 		'234',
				graphicsetId: 	'280',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'006633',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '12',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12',
internalId:  '',
customField: '20100517-204938'
};
webappMappings['1002']=webappMappings['1002-3534AVEC10IN26D4']={
webappId:    '1002',
documentId:  '3534',
internalId:  '3534AVEC10IN26D4',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57443',
internalId:  '',
customField: '20100517-222231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57464',
internalId:  '',
customField: '20100517-224445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1988',
internalId:  '',
customField: '20100517-223746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35601',
internalId:  '',
customField: '20100517-224725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3245',
internalId:  '',
customField: '20090426-220546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1997',
internalId:  '',
customField: '20100517-213720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54143',
internalId:  '',
customField: '20100517-223355'
};
webappMappings['1501']=webappMappings['1501-1110548']={
webappId:    '1501',
documentId:  '12',
internalId:  '1110548',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57401',
internalId:  '',
customField: '20100517-220821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54101',
internalId:  '',
customField: '20100517-222648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54122',
internalId:  '',
customField: '20090428-221337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3454',
internalId:  '',
customField: '20100517-214212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20090426-225411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2006',
internalId:  '',
customField: '20090426-225523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37501',
internalId:  '',
customField: '20100517-230154'
};
webappMappings['7060']=webappMappings['7060-3290a423ab2f4509257b07b603f92663']={
webappId:    '7060',
documentId:  '61801',
internalId:  '3290a423ab2f4509257b07b603f92663',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3534',
internalId:  '',
customField: '20090426-225625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3533',
internalId:  '',
customField: '20070319-223944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57422',
internalId:  '',
customField: '20100517-221656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61801',
internalId:  '',
customField: '20100524-204809'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN26D4';
var companyName   = 'AYA+Instituto+Lingu%C3%ADstico';
var htmlTitle	  = '++++++AYA+INSTITUTO+LINGU%C3%8DSTICO';
var metaKeywords  = 'Tradu%C3%A7%C3%A3o++Tradu%C3%A7%C3%B5es++Vers%C3%A3o++Vers%C3%B5es++AYA+Instituto++AYA++Rita+de+C%C3%A1ssia++Tradutores++Tradutor++Servi%C3%A7os+de+Tradu%C3%A7%C3%A3o+Int%C3%A9rprete+Interpreta%C3%A7%C3%A3o+Simult%C3%A2nea+Legendagem+Revis%C3%A3o';
var metaContents  = 'Site+de+apresenta%C3%A7%C3%A3o+do+AYA+Instituto+Ling%C3%BC%C3%ADstico+que+oferece+servi%C3%A7os+de+tradu%C3%A7%C3%A3o+e+vers%C3%A3o%2C+interpreta%C3%A7%C3%A3o%2C+legendagem+e+curso+de+portugu%C3%AAs+para+estrangeiros.';
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();
};
