 function write_head (
	sselected_top,
	sselected_sub,
	sdoc_root
	) {
   var selected_top=0;
   var selected_sub=0;
   var doc_root = sdoc_root;
   var i;

   if (doc_root == ".") {
      doc_root = "";
   } else {
      doc_root = doc_root + "/";
   }

   for( i=0; i<top_menu.length; ++i) {
      if( sselected_top == top_menu[ i ] ) {
         selected_top = i;
         break;
      }
   }
   if (sselected_sub == '') {
     selected_sub = -1;
   } else {
     for( i=0; i<sub_menu[selected_top].length; ++i) {
       if( sselected_sub == sub_menu[selected_top][ i ] ) {
         selected_sub = i;
         break;
       }
     }
   }

   if (( selected_top < 0 ) || ( top_menu.length <= selected_top )) {
      alert("java-scriptwrite_head - selected_top out of range (" +
            selected_top + "," +
            selected_sub + ")");
      return;
   }
   if (( selected_sub < -1 ) || ( sub_menu[selected_top].length <= selected_sub )) {
     alert("java-scriptwrite_head - selected_sub out of range (" +
             selected_top + "," +
             selected_sub + ")");
     return;
   }

   if ( top_menu.length != top_menu_href.length ) {
    alert("java-scriptwrite_head - top array out of synch (" +
          selected_top + "," +
          selected_sub + ")");
     return;
   }

   if ( sub_menu[selected_top].length != sub_menu_href[selected_top].length ) {
     alert("java-scriptwrite_head - sub array out of synch (" +
            selected_top + "," +
            selected_sub + ")" );
    return;
   }

   // hmmm why does Opera 6 need this?
   doc = "";
   tmp = "<TABLE BORDER='0' WIDTH='100%'> ";
   doc += tmp;
   document.writeln(tmp);

   document.writeln( "   <TR> ");
   document.writeln( "  <TD HEIGHT='98' WIDTH='150'>");
   document.writeln( "<IMG SRC='" + doc_root + "images/logo02.gif' ALT='Independent Computer Consultants Association' WIDTH=151 HEIGHT=98 BORDER=0></TD>");
   document.writeln( "  <TD HEIGHT=98 BACKGROUND='" + doc_root + "images/block2.gif' VALIGN='TOP'> ");
   document.writeln( "    <H1>Greater Boston Chapter</H1></TD> ");
   document.writeln( "</TR> ");
   document.writeln( "</TABLE>");

  // menus across the top
   document.writeln( "<table border='0' background='images/nav1_bg.jpg' cellpadding='0' cellspacing='0' width='100%' height='25'>");
   document.writeln( "<tr>");

   for(i=0; i<top_menu.length; ++i) {
	  document.writeln("<td align='center' nowrap>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");

    if( i == selected_top) {
      document.writeln( "<a class='nav1-cur' href='#'>" + top_menu[i] + "</a>" );
    } else {
      document.writeln( "<a class='nav1' href='" + doc_root + top_menu_href[i] + "'>" + top_menu[i] + "</a>" );
    }
    document.writeln( "</td>");
   }

   document.writeln( "</tr>");
   document.writeln( "</table>");

   // spacer
   document.writeln( "<TABLE border=0 cellpadding=0 cellspacing=0  width='100%'>");
   document.writeln( "<TR><TD bgcolor='#c6d3ff' width='100%' height=3></TD></TR>");
   document.writeln( "</TABLE>");

   document.writeln( "<TABLE border=0 cellpadding=0 cellspacing=0  width='100%'>");
   document.writeln( "<TR>");

   // the left column
   document.writeln( "<TD valign='top'>");
   document.writeln("<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'>");
   document.writeln("<TR>");
   document.writeln("<TD VALIGN='top' ALIGN='left' WIDTH='10%'>");

   document.writeln("<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'>");
   document.writeln("<TR><TD HEIGHT='5'></TD></TR>");

   var j;
   if (selected_sub < 0) {
     document.writeln("<tr height='18'><td><img border='0' src='" + doc_root + "images/spacer.gif'></td></tr>");
   } else {
     for(j=0; j<sub_menu[ selected_top ].length; ++j) {
       document.writeln("<TR HEIGHT='18'><TD>");
       document.writeln("<A HREF='" + sub_menu_href[selected_top][j] + "'>");
       if( j == selected_sub ) {
         document.writeln("<IMG BORDER='0' SRC='" + doc_root + "images/" + sub_menu_imghi[selected_top][j] + "'>");
       } else {
         document.writeln("<IMG BORDER='0' SRC='" + doc_root + "images/" + sub_menu_img[selected_top][j] + "'>");
       }
     }
     document.writeln("</A>");
     document.writeln("</TD></TR>");
   }
   document.writeln("</TABLE>");
   document.writeln("</TD>");
   
   // middle column - space between menu and text
   document.writeln( "<TD WIDTH='7'></TD>");
   document.writeln( "<TD WIDTH='1' BGCOLOR='#c6d3ff'></TD>");
   document.writeln( "<TD WIDTH='7'></TD>");

   // right column - the page
   document.writeln( "<TD valign='top'> ");
}

function write_foot() {
     document.writeln("</TD></TR></TABLE>");
     document.writeln( "<P>&nbsp;</P></TD>");
     document.writeln( "</TR>");
     document.writeln( "</TABLE>" );

     document.writeln( "<TABLE WIDTH='100%' border=0 cellpadding=0 cellspacing=0>");
     document.writeln( "<TR><TD bgcolor='#c6d3ff' width='100%' height=3></TD></TR>");
     document.writeln( "</TABLE>");

     document.writeln("<TABLE WIDTH='100%' BORDER=0 cellpadding=0 cellspacing=5>");
     document.writeln("<tr><td width='30%'>");
     document.writeln( "<STRONG>Contact</STRONG><br/>");
     document.writeln( "Email <A HREF='mailto:info@icca-boston.org?");
     document.writeln( "subject=From---www.icca-boston.org'>info@icca-boston.org</A><br/>");
     document.writeln( "Phone Messages (617) 859-4516");
     document.writeln("</td>");
     document.writeln("<td align=center width='40%'>");
     document.writeln("<table width='100' border='0' cellpadding='0' cellspacing='0'><tr>");
     document.writeln("<td><img src='http://img.constantcontact.com/ui/images/visitor/bevel_tl_ltblue.gif' width='6' height='6' alt=''></td>");
     document.writeln("<td background='http://img.constantcontact.com/ui/images/visitor/bevel_bg_top_ltblue.gif'> </td>");
     document.writeln("<td><img src='http://img.constantcontact.com/ui/images/visitor/bevel_tr_ltblue.gif' width='6' height='6' alt=''></td></tr>");
     document.writeln("<tr><td background='http://img.constantcontact.com/ui/images/visitor/bevel_bg_left_ltblue.gif' width='6'></td>");
     document.writeln("<td bgcolor='#0099ff' align='center' style='padding:10px;'><a href='http://ui.constantcontact.com/d.jsp?m=1101103513872&p=oi' target='_blank' style='text-decoration:none; font-weight: bold;  font-family:Arial,Helvetica,sans-serif; font-size:13px; color:#000000;' width='188'>Click here to sign up for Email Announcements</a></td>");
     document.writeln("<td background='http://img.constantcontact.com/ui/images/visitor/bevel_bg_right_ltblue.gif' width='6'></td></tr>");
     document.writeln("<tr><td background='http://img.constantcontact.com/ui/images/visitor/bevel_bg_left_blue.gif'></td>");
     document.writeln("<td bgcolor='#003399'align='right'><div  style='margin-top:2'><a href='http://ui.constantcontact.com/d.jsp?m=1101103513872&p=oi' target='_blank' style='text-decoration:none; font-weight:bold;  font-family:Arial,Helvetica,sans-serif; font-size:10px; color:#ffffff;'>&raquo; JOIN NOW</a></div></td>");
     document.writeln("<td background='http://img.constantcontact.com/ui/images/visitor/bevel_bg_right_blue.gif'></td></tr>");
     document.writeln("<tr><td><img src='http://img.constantcontact.com/ui/images/visitor/bevel_bl_blue.gif' width='6' height='6' alt=''></td>");
     document.writeln("<td background='http://img.constantcontact.com/ui/images/visitor/bevel_bg_bottom_blue.gif'> </td>");
     document.writeln("<td><img src='http://img.constantcontact.com/ui/images/visitor/bevel_br_blue.gif' width='6' height='6' alt=''></td></tr>");
     document.writeln("</table>");
     document.writeln("</td>");
     document.writeln("<td width='30%'>&nbsp;</td>");
     document.writeln("</tr>");
     document.writeln( "</TABLE>");
}






