function ch_img(img_id, new_src) {
    var img = document.getElementById(img_id);
    img.src = new_src;
}

function init_page(amt_bars) {
    var bar_src = "button_a.gif";
    var bar_height = 30;
    var buttons_dir = "buttons/";
    var buttons = new Array;
    buttons[0] = new Array("our_philosophy.html", "philobuttongif.gif", "philobutton_hover.gif");
    buttons[1] = new Array("our_tutors.html", "tutbutton.gif", "tutbutton_hover.gif");
    buttons[2] = new Array("testimonials.html", "testbutton.gif", "testbutton_hover.gif");
//    buttons[3] = new Array("index.html", "homebutton.gif", "home_hover.gif");    
  
    document.write("<img src=\"weblogo3.gif\" class=\"page_top\">");
    document.write("<div class=\"page_contents\">");
    document.write("<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">");
    for (var i = 0; i < amt_bars || i < buttons.length; i++) {
        document.write("<tr height=\"" + bar_height + "\"><td>&nbsp;");
        document.write("<table height=\"100%\" style=\"position: absolute;\" cellpadding=\"0\" cellspacing=\"0\">");
        document.write("<tr><td style=\"vertical-align: middle;\">");
        document.write("<img src=\"" + bar_src + "\">");
        document.write("</td></tr></table>");
        if (i < buttons.length) {
            document.write("<table height=\"100%\" style=\"position: absolute;\" cellpadding=\"0\" cellspacing=\"0\">");
            document.write("<tr><td style=\"vertical-align: middle;\">");
            document.write("<a href=\"" + buttons[i][0] + "\">");
            document.write("<img src=\"" + buttons_dir + buttons[i][1] + "\" id=\"button_" + i + "\" border=\"0\" onmouseover=\"ch_img('button_" + i + "', '" + buttons_dir + buttons[i][2] + "');\" onmouseout=\"ch_img('button_" + i + "', '" + buttons_dir + buttons[i][1] + "');\">");
            document.write("</a>");
            document.write("</td></tr></table>");
        }
        document.write("</td></tr>");
    }
    document.write("</table>");
    document.write("</div>");
}
                    

