var myOffline = document.location.href.substring(0,(document.location.href.lastIndexOf("/sw_instituto/l_ge/"))+19);

var myOnline = document.location.pathname.substring(0,(document.location.pathname.lastIndexOf("/sw_instituto/l_ge/"))+19); 

var webname = "Instituto"

var myWidthMenu = 100 //80


function dbopc(id,nom,tit,url,pmsn,pmss,sbm) {

  this.id = id; this.nom = nom; this.url = url;

  if (tit=="") { this.tit = nom; } else { this.tit = tit; } 

  this.pmsn = pmsn; this.pmss = pmss;

  this.sbm = sbm; return this;

}

var opcmenu = new Array();

var opcsubmenu = new Array();



opcmenu[1] = new Array();

opcmenu[1][0] = new dbopc("I_quemsomos","Quem somos","","objetivos.htm","",",'','','','','','clLevel0a','clLevel0aover','','',0",false);

opcmenu[1][1] = new dbopc("I_objetivos","Objetivos","","objetivos.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[1][2] = new dbopc("I_apresentacao","Memória Fundação","Memória da Fundação","apresentacao.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[1][3] = new dbopc("I_ata","Ata de Fundação","Ata de Fundação e Estatutos","ata.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[1][4] = new dbopc("I_diretoria","Diretoria","","diretoria.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[1][5] = new dbopc("I_conselho","Conselho Acadêmico","","conselho.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[1][6] = new dbopc("I_membros","Membros","","membros.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[1][7] = new dbopc("I_filiais","Filiais","","filiais.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[1][8] = new dbopc("I_convenio","Convênios","","convenio.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);



opcmenu[2] = new Array();

opcmenu[2][0] = new dbopc("I_trabalhos","Trabalhos","Trabalhos em andamento","ativ98-03.htm","",",'','','','','','clLevel0a','clLevel0aover'",false);

opcmenu[2][1] = new dbopc("I_ativ98-03","Atividades 1998-2004","","ativ98-03.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[2][2] = new dbopc("I_sbpc","So. Bras. Prog. Ciência","Sociedade Brasileira para o Progresso da Ciência","sbpc.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[2][3] = new dbopc("I_cnpq","Cons. Nac. de Pesquisas","Conselho Nacional de Pesquisas","cnpq.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[2][4] = new dbopc("I_artigos","Livros e artigos","Livros e artigos publicados no Brasil","artigos.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[2][5] = new dbopc("I_abstracts","Abstracts das teses","Abstracts das teses defendidas no Brasil","abstracts.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[2][6] = new dbopc("I_ativ_andamento","Atividades andamento","Atividades em andamento","ativ_andamento.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);



opcmenu[3] = new Array();

opcmenu[3][0] = new dbopc("I_boletins","Boletins","","boletins.htm","",",'','','','','','clLevel0a','clLevel0aover'",false);



opcmenu[4] = new Array();

opcmenu[4][0] = new dbopc("I_biblioteca","Biblioteca","Biblioteca do Instituto","biblioteca.htm","",",'','','','','','clLevel0a','clLevel0aover','','',0",false);



opcmenu[5] = new Array();

opcmenu[5][0] = new dbopc("I_paiscat","Povos Catalães","","nacional.htm","",",'','','','','','clLevel0a','clLevel0aover','','',0",true);

opcmenu[5][1] = new dbopc("I_nacio","Nacionalidades","","nacional.htm","",",'','','','','','clLevel1a','clLevel1aover','','',0",false);

opcmenu[5][2] = new dbopc("I_opais","Os Territórios","","","",",'','','','','','clLevel1a','clLevel1aover','','',0",true);

opcmenu[5][3] = new dbopc("I_alingua","A língua","","","",",'','','','','','clLevel1a','clLevel1aover','','',0",true);

opcmenu[5][4] = new dbopc("I_ahistoria","A história","","","",",'','','','','','clLevel1a','clLevel1aover','','',0",true);

opcmenu[5][5] = new dbopc("I_acultura","A cultura","","","",",'','','','','','clLevel1a','clLevel1aover','','',0",true);

opcmenu[5][6] = new dbopc("I_actual","Atualidade","","","",",'','','','','','clLevel1a','clLevel1aover','','',0",true);


opcsubmenu[5] = new Array();

opcsubmenu[5][1] = new Array();

opcsubmenu[5][1][1] = new dbopc("I_naciona","Nacionalidades","","nacional.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);


opcsubmenu[5][2] = new Array();

opcsubmenu[5][2][1] = new dbopc("I_posgeo","Posição geográfica","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][2][2] = new dbopc("I_orografia","Paisagem","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][2][3] = new dbopc("I_clima","Clima","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][2][4] = new dbopc("I_demograf","Demografia","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][2][5] = new dbopc("I_territorio","Ordenação territorial","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);



opcsubmenu[5][3] = new Array();

opcsubmenu[5][3][1] = new dbopc("I_geografia","Extensão geográfica","Extensão geográfica da língua catalã","extensaogeografica.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][3][2] = new dbopc("I_historia","Evolução histórica","Origem e evolução histórica","evolucaohist.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][3][3] = new dbopc("I_dialetos","Principais variantes","","princvariantes.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][3][4] = new dbopc("I_literatura","A literatura catalã","","literaturacatala.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);



opcsubmenu[5][4] = new Array();

opcsubmenu[5][4][1] = new dbopc("I_inicio","Os inícios","Os inícios","inicios.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][4][2] = new dbopc("I_condados","Os condes hereditários","Os condes hereditários","condados.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][4][3] = new dbopc("I_coroa","A Coroa de Aragão","A Coroa de Aragão","coroaaragao.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][4][4] = new dbopc("I_expansao","Os Trastámara","A expansão mediterrânea","ostrastamara.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][4][5] = new dbopc("I_decadencia","Os Aústria","Os Aústria","osaustria.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][4][6] = new dbopc("I_XIX","Os Borbons","","osborbons.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][4][7] = new dbopc("I_XX","O século XX","","oseculoxx.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);



opcsubmenu[5][5] = new Array();

opcsubmenu[5][5][1] = new dbopc("I_ideias","Idéias e valores","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][5][2] = new dbopc("I_costum","Costumes e Leis","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][5][3] = new dbopc("I_arte","Artes","","artes.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][5][4] = new dbopc("I_musica","Música e Dança","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][5][5] = new dbopc("I_tradic","Tradições Populares","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][5][6] = new dbopc("I_gastron","Gastronomia","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);



opcsubmenu[5][6] = new Array();

opcsubmenu[5][6][1] = new dbopc("I_politico","Política","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][6][2] = new dbopc("I_economia","Economia","Situação econômica","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][6][3] = new dbopc("I_educa","Oferta educativa","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][6][4] = new dbopc("I_futuro","Mídia","Mídia","midia.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][6][5] = new dbopc("I_turismo","Turismo","","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcsubmenu[5][6][6] = new dbopc("I_bcn","Barcelona","Barcelona, cidade aberta","pendent.htm","",",'','','','','','clLevel2a','clLevel2aover','','',0",false);

opcmenu[6] = new Array();
opcmenu[6][0] = new dbopc("I_megaloja","Megaloja","","http://www.ramonllull.net/sw_principal/l_ge/megaloja.htm","",",'','','','','','clLevel0a','clLevel0aover'",false);

opcmenu[7] = new Array();
opcmenu[7][0] = new dbopc("I_doacoes","Doações","","doacoes.php","",",'','','','','','clLevel0a','clLevel0aover'",false);





// determina inx segons id

var socainx = new Array();

function buscarinx() {

  if (soca[0]=="") { //==0

    socainx[0]=0; socainx[1]=soca[1]; //socainx[0]=soca[0]; socainx[1]=soca[1];

  } else {

    for (inxi=1; inxi<opcmenu.length; inxi++) {

      if (opcmenu[inxi][0].id==soca[0]) {

	    socainx[0]=inxi;

		if (soca[1]=="") {

		  socainx[1]=0;

		} else {

  	      for (inxj=1; inxj<opcmenu[inxi].length; inxj++) {

	        if (opcmenu[inxi][inxj].id==soca[1]) {

		      socainx[1] = inxj;

		      break;

		    }

	      }

		}

	    break;  

	  }

    }

    if (soca.length==3) {

      for (inxk=1; inxk<opcsubmenu[socainx[0]][socainx[1]].length; inxk++) {

	    if (opcsubmenu[socainx[0]][socainx[1]][inxk].id==soca[2]) {

	      socainx[2]=inxk;

		  break;

	    }

	  }

    }  

  }

} 

buscarinx();



function escriumenu() {





  document.writeln('<table border="0" cellspacing="0" cellpadding="0">');

  document.writeln('  <tr>');

  document.writeln('    <td valign="top"><img src="../../comum/img/pix.gif" width="5" height="16" border="0"></td>');

    for (i=1; i<opcmenu.length; i++) {

  document.writeln('    <td>');

  document.writeln('      <ilayer id="layerMenu' + i + '">');

  document.writeln('      <div id="divMenu' + i + '"><img src="../../comum/img/pix.gif" width="' + myWidthMenu + '" height="16" alt="" border="0"></div>');

  document.writeln('      </ilayer>');

  document.writeln('    </td>');

    }

  document.writeln('    <td valign="top"><img src="../../comum/img/pix.gif" width="1" height="16" border="0"></td>');

  document.writeln('  </tr>');

  document.writeln('</table>');



}



function escriuopcio(i) {

  if (opcmenu[i][0].url=="") {

    document.write('<b>' + opcmenu[i][0].nom + '</b>');

  } else {

    document.write('<a href="' + opcmenu[i][0].url + '" class="link" title="' + opcmenu[i][0].tit + '">' + opcmenu[i][0].nom + '</a>');

  }

}



function escriufil() {

  txt1 = ''; txt2 = ''; txt3='';

  if (socainx[0]==0) {

    txt1 = soca[1];

  } else {

    txt1 = opcmenu[socainx[0]][0].tit;

    if (socainx[1]!=0) { txt2 = " > " + opcmenu[socainx[0]][socainx[1]].tit }

    if (socainx.length == 3) { txt3 = " > " + opcsubmenu[socainx[0]][socainx[1]][socainx[2]].tit; }

  }

  document.write(webname + " > " + txt1 + txt2 + txt3);

  document.title = (txt1 + txt2 + txt3);

}



function escriumapa() {

document.write('<table border="0" cellspacing="0" cellpadding="0">');

  for (j=1; j<opcmenu.length; j++) {

    if ((opcmenu[j].length-1)==0) {

document.write('  <tr>');

document.write('    <td align="right" valign="middle" class="txtmapa"><a href="' + opcmenu[j][0].url + '" class="link">' + opcmenu[j][0].nom + '</a></td>');

document.write('    <td valign="middle"><img src="../../comum/img/pix.gif" width="4" height="1"></td>');

document.write('    <td valign="middle"><img src="../../comum/img/pix.gif" width="12" height="1"></td>');

document.write('    <td>&nbsp;</td>');

document.write('  </tr>');

    } else {

      for (i=1; i<opcmenu[j].length; i++) {

	    if (opcmenu[j][i].url=="") {

	       txt = '<b>' + opcmenu[j][i].nom + '</b>';

	    } else {

	       txt = '<a href="' + opcmenu[j][i].url + '" class="link">' + opcmenu[j][i].nom + '</a>';

	    }

        img = 'm'; if (i==1) img = 't';  if (i==(opcmenu[j].length-1)) img = 'b';

document.write('  <tr>');

	    if (i==1) {

document.write('    <td align="right" valign="middle" rowspan="' + (opcmenu[j].length-1) + '" class="txtmapa">' + opcmenu[j][0].nom + '</td>');

document.write('    <td valign="middle" rowspan="' + (opcmenu[j].length-1) + '"><img src="../../comum/img/pix.gif" width="4" height="1"></td>');

document.write('    <td valign="middle" rowspan="' + (opcmenu[j].length-1) + '"><img src="../../comum/img/punt.gif" width="12" height="1"></td>');

	    }

document.write('    <td>');

	    if (opcmenu[j][i].sbm) {

document.write('      <table border="0" cellspacing="0" cellpadding="0">');

document.write('        <tr>');

		  if (img=='m' || img=='b') {

		    imgb = 'background="../../comum/img/punt_l.gif"'

		  } else { imgb = '' }

document.write('          <td ' + imgb + ' valign="bottom"><img src="../../comum/img/punt_' + img + '_s.gif" width="18" height="8"></td>');

document.write('          <td rowspan="2">');

document.write('            <table border="0" cellspacing="0" cellpadding="0">');

		  for (k=1; k<opcsubmenu[j][i].length; k++) {

		    if (opcsubmenu[j][i][k].url=="") {

		      txt2 = '<b>' + opcsubmenu[j][i][k].nom + '</b>';

		    } else {

		      txt2 = '<a href="' + opcsubmenu[j][i][k].url + '" class="link">' + opcsubmenu[j][i][k].nom + '</a>';

		    }

		    img2 = 'm'; if (k==1) img2 = 't';  if (k==(opcsubmenu[j][i].length-1)) img2 = 'b';

document.write('              <tr>');

		    if (k==1) {

document.write('                <td valign="middle" rowspan="' + (opcsubmenu[j][i].length-1) + '" class="txtmapa"><b>' + txt + '</b></td>');

document.write('                <td valign="middle" rowspan="' + (opcsubmenu[j][i].length-1) + '"><img src="../../comum/img/pix.gif" width="4" height="1"></td>');

document.write('                <td valign="middle" rowspan="' + (opcsubmenu[j][i].length-1) + '"><img src="../../comum/img/punt.gif" width="12" height="1"></td>');

		    }

document.write('                <td><img src="../../comum/img/punt_' + img2 + '.gif" width="18" height="16"></td>');

document.write('                <td valign="middle" class="txtmapa">' + txt2 + '</td>');

document.write('              </tr>');

		  }

document.write('            </table>');		

document.write('          </td>');

document.write('        </tr>');

document.write('        <tr>');

		  if (img=='m' || img=='t') {

		    imgb = 'background="../../comum/img/punt_l.gif"'

		  } else { imgb = '' }

document.write('          <td ' + imgb + ' valign="top"><img src="../../comum/img/punt_' + img + '_i.gif" width="18" height="8"></td>');

document.write('        </tr>');

document.write('      </table>');		

	    } else {

document.write('      <table border="0" cellspacing="0" cellpadding="0">');

document.write('        <tr>');

document.write('          <td><img src="../../comum/img/punt_' + img + '.gif" width="18" height="16"></td>');

document.write('          <td valign="middle" class="txtmapa"><b>' + txt + '</b></td>');

document.write('        </tr>');

document.write('      </table>');		

	    }

document.write('    </td>');

document.write('  </tr>');

      }

    }

  }

document.write('</table>');		



}


