//---------------------------
// Barra menu'
//---------------------------

var cBas="../";
var cCol="#ffffff";
var aCol="";
var aTab="";


function menu(typ) {
  var t1=Math.floor(typ/10);
  var t2=typ;
  if (t1==0) {
    cBas="";
  }
  
  aCol=new inzCol();
  aCol[t1]="#0000cc";
  aTab=new inzTab();

  dspTab(t1);

  document.write("<table width=100% border=0 cellspacing=0 cellpadding=0><tr>");
  dspBar(t1,t2);
  dspHome();
  document.write("</tr></table>");
}


//--- Inizializza tabella COLORI e TAB -------------------- 
function inzCol() {
  this.lenght=5;
  for (var q=0; q<this.lenght; q++) {
    this[q]="#cccccc";
  }
}

function inzTab() {
  this.lenght=5;
  this[0]="<a href=" + cBas + "index.html><img src=" + cBas + "bar/bar1.gif width=182 height=19 border=0></a>";
  this[1]="<a href=" + cBas + "home/art_home.htm style=color:" + cCol + ";text-decoration:none><b>il Giornale</b></a>";
  this[2]="<a href=" + cBas + "ricerche/ric_home.htm style=color:" + cCol + ";text-decoration:none><b>Ricerche</b></a>";
  this[3]="<a href=" + cBas + "amici/ami_home.htm style=color:" + cCol + ";text-decoration:none><b>Amici</b></a>";
  this[4]="<a href=" + cBas + "editoriale/edt_home.htm style=color:" + cCol + ";text-decoration:none><b>Editoriale</b></a>";
}


//--- Visualizza TAB --------------------------------------
function dspTab(t) {
  document.write("<table border=0 cellspacing=0 cellpadding=0><tr>");
  for (var q=0; q<aCol.lenght; q++) {
    document.write("<td bgcolor=" + aCol[q] + " valign=top><img src=" + cBas + "bar/ang_l.gif width=10 height=15></td>");
    document.write("<td bgcolor=" + aCol[q] + " align=center>" + aTab[q] + "</td>");
    document.write("<td bgcolor=" + aCol[q] + " valign=top><img src=" + cBas + "bar/ang_r.gif width=10 height=15></td>");
  }
  document.write("</tr></table>");
}


//--- Visualizza BARRA MENU -------------------------------
function dspBar(t1,t2) {
  document.write("<td bgcolor=" + aCol[t1] + " width=100%>");
  if (t2==0) {
    document.write("<center><font color=" + cCol + "><marquee loop=infinite behavior=alternate scrollamount=1><b>Il Griantino vi augura una buona lettura</b></marquee></font></center>");
  }
  if (t2==10) {
    document.write("<font color=" + cCol + "> &nbsp; ");
    document.write("<a href=art_aut.htm style=color:" + cCol + ";text-decoration:none>Articoli per Autore</a> | ");
    document.write("<a href=art_arg.htm style=color:" + cCol + ";text-decoration:none>Articoli per Argomento</a> | ");
    document.write("<a href=poe_home.htm style=color:" + cCol + ";text-decoration:none>Poesie per Autore</a>");
  }
  if (t2==11) {
    document.write("<font color=" + cCol + "> &nbsp; ");
    document.write("<b>96: </b><a href=../96-0/art960a.htm style=color:" + cCol + ";text-decoration:none>1</a> | ");
    document.write("<b>97: </b><a href=../97-1/cop971.htm style=color:" + cCol + ";text-decoration:none>1</a> ");
    document.write("<a href=../97-2/cop972.htm style=color:" + cCol + ";text-decoration:none>2</a> ");
    document.write("<a href=../97-3/cop973.htm style=color:" + cCol + ";text-decoration:none>3</a> | ");
    document.write("<b>98: </b><a href=../98-1/cop981.htm style=color:" + cCol + ";text-decoration:none>1</a> ");
    document.write("<a href=../98-2/cop982.htm style=color:" + cCol + ";text-decoration:none>2</a> ");
    document.write("<a href=../98-3/cop983.htm style=color:" + cCol + ";text-decoration:none>3</a> ");
    document.write("<a href=../98-4/cop984.htm style=color:" + cCol + ";text-decoration:none>4</a> | ");
    document.write("<b>99: </b><a href=../99-1/cop991.htm style=color:" + cCol + ";text-decoration:none>1</a> ");
    document.write("<a href=../99-2/cop992.htm style=color:" + cCol + ";text-decoration:none>2</a> ");
    document.write("<a href=../99-3/cop993.htm style=color:" + cCol + ";text-decoration:none>3</a> | ");
  }
  if (t2==20) {
    document.write("<font color=" + cCol + "> &nbsp; ");
    document.write("<a href=#TERR style=color:" + cCol + ";text-decoration:none>Territorio</a> | ");
    document.write("<a href=#STOR style=color:" + cCol + ";text-decoration:none>Storia</a> | ");
    document.write("<a href=#PERS style=color:" + cCol + ";text-decoration:none>Personaggi</a> | ");
    document.write("<a href=#VARI style=color:" + cCol + ";text-decoration:none>Varie</a> | ");
  }
  if (t2==30) {
    document.write("<font color=" + cCol + "> &nbsp; ");
    document.write("<a href=mailto:griantino@bigfoot.com style=color:" + cCol + ";text-decoration:none>Lettere</a> | ");
    document.write("<a href=ami_list.htm style=color:" + cCol + ";text-decoration:none>Amici</a> | ");
    document.write("<a href=http://venus.beseen.com/boardroom/j/26333/ style=color:" + cCol + ";text-decoration:none>Forum</a> | ");
    document.write("<a href=http://earth.beseen.com/guestbook/l/140039/guestbook.html style=color:" + cCol + ";text-decoration:none>Guest Book</a> | ");
    document.write("<a href=ami_link.htm style=color:" + cCol + ";text-decoration:none>Link Me</a> | ");
  }
  if (t2==40) {
    document.write("<font color=" + cCol + "> &nbsp; ");
    document.write("<a href=edt_tanks.htm style=color:" + cCol + ";text-decoration:none>Ringraziamenti</a> | ");
    document.write("<a href=edt_help.htm style=color:" + cCol + ";text-decoration:none>Configurazione</a> | ");
    document.write("<a href=edt_strut.htm style=color:" + cCol + ";text-decoration:none>Struttura</a> | ");
  }
  document.write("</font></td>");
}


//--- Visualizza HOME + E-MAIL ----------------------------
function dspHome() {
  document.write("<td>"); 
  document.write("<img src=" + cBas + "bar/bar2.gif width=35 height=14 border=0 align=right usemap=#bar2>");
  document.write("<map name=bar2>");
  document.write("<area shape=rect coords=0,0,14,13  href=" + cBas + "index.html target=_top>");
  document.write("<area shape=rect coords=19,0,34,13 href=mailto:griantino@bigfoot.com>");
  document.write("</map>");  
  document.write("</td>"); 
}


  

