
tab = new Array()
ref = new Array()
pagetitle = new Array()

tab = [0, "H o m e", "C. V.", "R e s e a r c h", "O t h e r &nbsp;&nbsp; M a t h", "M e"]
pagetitle = [0, "M a r c &nbsp;&nbsp; S t e t s o n &nbsp;&nbsp;  R e n a u l t", "C u r r i c u l u m &nbsp;&nbsp; V i t a e", "R e s e a r c h", "O t h e r &nbsp;&nbsp; M a t h", "A b o u t &nbsp;&nbsp; M e"]
ref = [0, "index.html", "cv.html", "research.html", "othermath.html", "me.html"]

bgcolor = "white"
menucolor = "white"  // "snow"
titlecolor = "darkslategray"
sectioncolor = "darkslategray"
leftcolor = "maroon"
rightcolor = "antiquewhite"
sidebarwidth = "90"

bullet = "bulBlue.gif"



function Bullet() {
    document.writeln("<img src='images/"+bullet+"'>")
}

function Section(sectiontitle) {
    document.writeln("<font color="+sectioncolor+"><h3><i>"+sectiontitle+"</i></h3></font>")
}

function Separator() {
    document.writeln("<p><center>")
    document.writeln("<img src='images/bulStar.gif'> <img src='images/bulStar.gif'> <img src='images/bulStar.gif'>")
    document.writeln("</center><p>")
}


function Head(n) {
    document.writeln("<title>Marc Renault -:- "+tab[n]+"</title>")
    document.bgColor = bgcolor
}


function BeginBody(n, subtitle) {

    if (!subtitle) { 
        SideBarTail("left", leftcolor)  // use "" instead of "left"
        MenuBar(n, "left") 
    }
    
    document.writeln("<table width=100%><tr>                                         ")
    document.writeln("    <td bgcolor="+leftcolor+" width="+sidebarwidth+">          ")
    document.writeln("        <spacer type=block height=12 width="+sidebarwidth+">   ")
    document.writeln("    </td>                                                      ")
    document.writeln("    <td>                                                       ")
    if (subtitle) {
        ReturnBar(n, "left")
    } 
    document.writeln("        <blockquote>                                           ")
    document.writeln("            <br>                                               ")
    
    Title(n, subtitle)

    document.writeln("            <br>")

}


function EndBody(n, subtitle) {

      // The next three lines create enough space to push the middle column
      // out against the two side columns.  Only needed for Netscape Navigator.
    spaces = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n"
    manyspaces = StringRep(spaces, 16)
    document.writeln(manyspaces)
    
    document.writeln("        </blockquote>                                         ")
    if (subtitle) {
        ReturnBar(n, "right")
    } 
    document.writeln("    </td>                                                     ")
    document.writeln("    <td bgcolor="+rightcolor+" width="+sidebarwidth+">        ")
    document.writeln("        <spacer type=block height=12 width="+sidebarwidth+">  ")
    document.writeln("    </td>                                                     ")
    document.writeln("</tr></table>                                                 ")

    if (!subtitle) { 
        MenuBar(n, "right") 
        SideBarTail("right", rightcolor)
    }
}


function SideBarTail(alignment, color) {
    document.writeln("<div align="+alignment+">                 ")
    document.writeln("<table><tr>           ")
    document.writeln("    <td bgcolor="+color+" width="+sidebarwidth+" height=12>  ")
    document.writeln("         <spacer type=block height=12 width="+sidebarwidth+">    ")
    document.writeln("    </td>                                                        ")                 
    document.writeln("</tr></table>                                                    ")
    document.writeln("</div>            ")
}


function MenuBar(n, alignment) {
    
    if (alignment == "left") { 
        menuselectcolor = rightcolor 
        fontcolor = "black"
    }
    else {
        menuselectcolor = leftcolor 
        fontcolor = "white"
    }

    document.writeln("<div align="+alignment+">  ")
    document.writeln("<table border=1 cellspacing=0 cellpadding=3 bgcolor="+menucolor+"><tr><td>")
    document.writeln("    <table border=0 cellspacing=0 cellpadding=1 bgcolor="+menucolor+"><tr>")
    
    for (i = 1; i < n; i++) { 
        document.writeln("    <td><font face=Arial size=-2><i>          ")
        document.writeln("        <a href="+ref[i]+">"+tab[i]+"</a>         ")
        document.writeln("    </i></font></td>                              ")
        document.writeln("    <td><font face=Arial size=-2>          ")
        document.writeln("        &nbsp;|&nbsp;              ")
        document.writeln("    </font></td>                              ")
    }
    
    document.writeln("    <td bgcolor="+menuselectcolor+"><font color="+fontcolor+" face=Arial size=-2><b> "+ tab[i] +" </b></font></td>")
    
    for (i = n+1; i < tab.length; i++) {
        document.writeln("    <td><font face=Arial size=-2>          ")
        document.writeln("        &nbsp;|&nbsp;              ")
        document.writeln("    </font></td>                              ")
        document.writeln("    <td><font face=Arial size=-2><i>          ")
        document.writeln("        <a href="+ref[i]+">"+tab[i]+"</a>         ")
        document.writeln("    </i></font></td>                              ")
    }
    document.writeln("    </tr></table>    ")
    document.writeln("</td></tr></table>   ")
    document.writeln("</div>                 ")

}

function ReturnBar(n, alignment) {
    document.writeln("<div align="+alignment+">                 ")
    document.writeln("<table border=1 cellspacing=0 cellpadding=3 bgcolor="+menucolor+"><tr>")
    document.writeln("    <td><font face=Arial size=-2>          ")
    document.writeln("        Return to <a href="+ref[n]+">"+tab[n]+"</a>         ")
    document.writeln("    </font></td>                              ")
    document.writeln("</tr></table>   ")
    document.writeln("</div>                 ")

}



function Title(n, subtitle) {
    if (subtitle) {
        document.writeln("<center>")
        document.writeln("<font color="+titlecolor+" face='Arial'> <h3>"+subtitle+"</h3> </font>")
        document.writeln("</center>")
    }
    else {
        document.writeln("<center>")
        document.writeln("<font color="+titlecolor+" face='Arial'> <h2>"+pagetitle[n]+"</h2> </font>")
        document.writeln("</center>")
    }
}

function StringRep(a, n) {
    reptext = ""
    for (j = 1; j <= n; j++) { reptext += a }
    return reptext
}
