var arSubNav = new Array();
arSubNav[0] = new Array("td1",10,111," ","/"," ","/");
arSubNav[1] = new Array("td2",121,221,"Post your project","/emp/post_project.cfm","Search for professionals","/emp/search.cfm","My Admin","/emp/myadmin.cfm");
arSubNav[2] = new Array("td3",341,221,"Post your profiles","/pro/post_profile.cfm","Search for projects","/pro/search.cfm","My Admin","/pro/myadmin.cfm");
arSubNav[3] = new Array("td4",561,110,"Find pros","/emp/search.cfm","Find work","/pro/search.cfm");
arSubNav[4] = new Array("td5",670,110,"Login","/");

function writeSubNav(bgc, rbgc, textcolor, rtextcolor, linecolor, bordercolor){
    if ((document.all) || (document.getElementById)){
        var j = 0;
        var subnav = "";
        for (j = 0; j < arSubNav.length; j++){
            if (arSubNav[j][0] == "td3") {
                subnav += "<div id=\"" + arSubNav[j][0] + "Menu\" style=\"z-index:999;position: absolute; cursor:pointer; cursor:hand; filter: Alpha(Opacity=100); left: " + arSubNav[j][1] + "px; width: " + arSubNav[j][2] + ";  visibility: hidden\" onmouseover=\"showSubNav('" + arSubNav[j][0] + "');\" onmouseout=\"hideSubNav('" + arSubNav[j][0] + "'); \">";
            } else {
                subnav += "<div id=\"" + arSubNav[j][0] + "Menu\" style=\"z-index:999;position: absolute; cursor:pointer; cursor:hand; filter: Alpha(Opacity=100); left: " + arSubNav[j][1] + "px; width: " + arSubNav[j][2] + ";  visibility: hidden\" onmouseover=\"showSubNav('" + arSubNav[j][0] + "'); SwitchMenu('" + arSubNav[j][0] + "');\" onmouseout=\"hideSubNav('" + arSubNav[j][0] + "'); SwitchMenu2('" + arSubNav[j][0] + "')\">";
            }
            subnav += "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"" + arSubNav[j][2] + "\">";
            subnav += "<tr>";
            subnav += "<td width=\"1\" bgcolor=\"" + bordercolor + "\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "<td colspan=\"1\" bgcolor=\"#295c90\" height=\"1\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "<td width=\"1\" bgcolor=\"" + bordercolor + "\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "</tr>";
            subnav += "<tr>";
            subnav += "<td width=\"1\" bgcolor=\"" + bordercolor + "\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "<td colspan=\"1\" bgcolor=\"#cccccc\" height=\"1\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "<td width=\"1\" bgcolor=\"" + bordercolor + "\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "</tr>";
            subnav += "<tr>";
            subnav += "<td width=\"1\" bgcolor=\"" + bordercolor + "\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "<td colspan=\"1\" bgcolor=\"#ebebeb\" height=\"1\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "<td width=\"1\" bgcolor=\"" + bordercolor + "\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "</tr>";
            subnav += "<tr>";
            subnav += "<td width=\"1\" bgcolor=\"" + bordercolor + "\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "<td colspan=\"1\" bgcolor=\"#f7f7f7\" height=\"1\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "<td width=\"1\" bgcolor=\"" + bordercolor + "\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
            subnav += "</tr>";
            for (i=3; i < arSubNav[j].length-1; i=i+2){
                subnav += "<tr>";
                subnav += "<td width=\"1\" bgcolor=\"" + bordercolor + "\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"22\"></td>";
                subnav += "<td background=\"/images/navstripe.gif\" width=\"100%\" align=\"left\" bgcolor=\"" + bgc + "\" class=\"\" onClick=\"document.location.href='" + arSubNav[j][i+1] + "'\" onmouseover=\"this.bgColor='" + rbgc + "';this.style.color='" + rtextcolor+ "';\" onmouseout=\"this.bgColor='" + bgc + "';this.style.color='" + textcolor + "'\" style=\"color: " + textcolor + "\"><div style=\"padding-left:0px;\"><img src=\"/images/spacer.gif\" width=\"10\" height=\"1\"><img src=\"/images/tiny_blarrow.gif\">&nbsp;&nbsp;" + arSubNav[j][i] + "</a></div></td>";
                subnav += "<td width=\"1\" bgcolor=\"" + bordercolor + "\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"22\"></td>";
                subnav += "</tr>";
            }
            subnav += "<tr>";
            subnav += "<td align=\"left\" colspan=\"3\" height=\"6\">";
                subnav += "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" background=\"/images/navstripe.gif\">";
                subnav += "<tr><td rowspan=\"6\"><img src=\"/images/btm.gif\" width=\"6\" height=\"6\"></td>";
                subnav += "<td width=\"100%\" height=\"1\" bgcolor=\"f8f8f8\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\"></td>";
                subnav += "<td rowspan=\"6\"><img src=\"/images/btm2.gif\" width=\"6\" height=\"6\"></td></tr>";
                subnav += "<tr><td height=\"1\" bgcolor=\"ffffff\"></td></tr>";
                subnav += "<tr><td height=\"1\" bgcolor=\"f8f8f8\"></td></tr>";
                subnav += "<tr><td height=\"1\" bgcolor=\"ffffff\"></td></tr>";
                subnav += "<tr><td height=\"1\" bgcolor=\"f8f8f8\"></td></tr>";
                subnav += "<tr><td height=\"1\" bgcolor=\"" + bordercolor + "\"></td></tr>";
                subnav += "</table></td>";
            subnav += "</tr>";
            subnav += "</table>";
            subnav += "</div>";
        }
        document.write(subnav);
    }
}