// JavaScript Document	
    m_width=new Array();
	m_width[0]=70;
	m_width[1]=50;
	m_width[2]=80;
	m_width[3]=70;
	m_width[4]=46;
	m_width[5]=156;
	m_width[6]=90;
	m_width[7]=50;
	m_width[8]=130;
	m_width[9]=40;
	
	m_pulldown_width=new Array();
	m_pulldown_width[0]=120;
	m_pulldown_width[2]=140;
	m_pulldown_width[5]=146;

	m_height=20;
	m_height_pulldown=16;
	m_gap=0;
	
	header_image="";
	line_image="";
	line_indentation=0;

	text_class="topnav";
	m_header_style="cursor:pointer; background: transparent; font-size:11px; font-family:verdana,arial,helvetica,sanserif; color: #ffffff; font-weight:bold; border:solid black 0px";
	m_pulldown_style="cursor:pointer; background: transparent; font-size:11px; font-family:verdana,arial,helvetica,sanserif; color: #ffffff;font-weight:bold; border:solid #F5F5F5 0px; table-layout: fixed";
	m_pulldown_cellcolor="#737373";
	m_mouseover_color="#737373";
	m_mouseout_color="#737373"; <!-- should usually be the same as pulldown background color -->

	mi=new Array();
	ml=new Array();
	mt=new Array();
	mi[1]=new Array("Home");
	ml[1]=new Array("index.php");
	mt[1]=new Array("");
	
	mi[2]=new Array("Contact Us");
	ml[2]=new Array("page.php?team=bcnm&page=Contact Us");
	mt[2]=new Array("");
	
	mi[3]=new Array("Calendar");
	ml[3]=new Array("page.php?team=bcnm&page=Calendar");
	mt[3]=new Array("");
	
	mi[4]=new Array("Staff");
	ml[4]=new Array("page.php?team=bcnm&page=Staff");
	mt[4]=new Array("");
	
	mi[5]=new Array("Churches and Entities", "Churches", "Entities", "Pastorless Churches", "Associations", "Church Minister Positions");
	ml[5]=new Array("","page.php?team=bcnm&page=Churches","page.php?team=bcnm&page=Entities","page.php?team=bcnm&page=Pastorless Churches","page.php?team=Missions&category=Associations","page.php?team=bcnm&page=Church Minister Positions");
	mt[5]=new Array("","","","");
	
	mi[6]=new Array("BCNM Equip");
	ml[6]=new Array("http://bcnm.e-quip.net");
	mt[6]=new Array("target=\"_blank\"");
	
	mi[7]=new Array("Links");
	ml[7]=new Array("page.php?team=bcnm&page=Links");
	mt[7]=new Array("");
	
	mi[8]=new Array("Upcoming Events");
	ml[8]=new Array("page.php?team=bcnm&page=Upcoming Events");
	mt[8]=new Array("");
	
	mi[9]=new Array("Login");
	ml[9]=new Array("admin");
	mt[9]=new Array("target=\"_blank\"");
<!-------------------------------------------------------------------------------------------------------------------------->
if(typeof link_prefix=="undefined")
	link_prefix = "";
	
overcat=new Array();
cat=new Array();
totalcols=mi.length-1;

col_width=new Array();
pdcol_width=new Array();
col_loc=new Array();
lc=1;col_max=0;
while(lc<=totalcols)
	{
	  if(typeof m_width[lc]!="undefined")
	  	col_width[lc]=m_width[lc];
	  else col_width[lc]=m_width[0];
	  col_loc[lc]=col_max;
	  col_max=col_max+col_width[lc]+4;

	  if(typeof m_pulldown_width=="undefined")
		pdcol_width[lc]=col_width[lc];
	  else if(typeof m_pulldown_width[lc]!="undefined")
		pdcol_width[lc]=m_pulldown_width[lc];
	  else if(typeof m_pulldown_width[0]!="undefined")
	      pdcol_width[lc]=m_pulldown_width[0];
	  else pdcol_width[lc]=col_width[lc];

	  lc=lc+1;
	}

function mvex(pdid) <!---- execute when mouse over ---->
{
   document.getElementById(pdid).style.visibility="visible";
   x=1;
   while(x<=totalcols)
	{
	  if(pdid!=x)
	  	  document.getElementById(x).style.visibility="hidden";
	  x=x+1;
	}
}

function moex(pdid) <!---- execute when mouse out after a second---->
{
   if(!overcat[pdid])
     document.getElementById(pdid).style.visibility="hidden";
}

function winopen(glink)
{
   if(glink!="")
     {
	 if(glink.indexOf(" ")==-1)
	 	window.location=glink;
	 else
		{
		  w_command=glink.split(" ");

	  	  if(w_command[0]="new")
		    window.open(w_command[1],"","scrolling=yes, resizable=yes");
		}
     }
}

function showmenu()
{
document.write("<div style='position: relative; width:" + col_max + "px; z-index: 20; visibility: visible;'>");

document.write("<table cellspacing=0 cellpadding=0>");
  document.write("<tr>"); <!---- menu headers ---->
    y=1;
    while(y<=totalcols)
	{
		use_link_prefix = link_prefix;
		if(mt[y][0]!="") use_link_prefix = "";
        document.write("<td class='" + text_class + "' valign='center' height='" + m_height + "' style='" + m_header_style + "' align='left' width=" + col_width[y] + " onMouseOver='mvex(" + y + "); overcat[" + y + "]=1;' onMouseOut='overcat[" + y + "]=0; setTimeout(\"moex(" + y + ")\",500);'><a href=\"" + use_link_prefix + ml[y][0] + "\" " + mt[y][0] + ">" + header_image + mi[y][0] + "</a>");
		if(y<totalcols)
			document.write(" | ");																																																																																				  		document.write("</td>");
	  y=y+1;
	}
  document.write("</tr>");
document.write("</table>");

y=1; <!----- pulldown items ------>
while(y<=totalcols)
  {
  document.write("<div id='" + y + "' style='position: absolute; top: " + (m_height+m_gap) + "px; left: " + (col_loc[y] + line_indentation) + "px; z-index: 100; visibility: hidden;'>");
  
  document.write("<table id='topNav' style='" + m_pulldown_style + "' cellspacing=0 width=" + (pdcol_width[y]+4) + ">");
  z=1;
  while(typeof mi[y][z]!="undefined")
	{
		use_link_prefix = link_prefix;
		if(mt[y][z]!="") use_link_prefix = "";
  	  document.write("<tr><td class='" + text_class + "' bgcolor='" + m_pulldown_cellcolor + "' align='left' valign='center' onMouseOver='overcat[" + y + "]=1;' onMouseOut='overcat[" + y + "]=0; setTimeout(\"moex(" + y + ")\",500);' height=" + m_height_pulldown + " width=95%><a href=\"" + use_link_prefix + ml[y][z] + "\" " + mt[y][z] + ">" + line_image + mi[y][z] + "</a></td>");
	  if(z==1) document.write("<td style='background: url(\"graphics/rollshade_side.gif\") no-repeat' rowspan=" + (mi[y].length-1) + ">&nbsp;</td>");
	  document.write("</tr>");
	  z=z+1;
	}
  if(z>1)
  	{
	  document.write("<tr><td style='height:6px; background: url(\"graphics/rollshade_bottom.gif\") no-repeat'>&nbsp;</td>");
	  document.write("<td height=6 style='height:6px; background: url(\"graphics/rollshade_corner.gif\") no-repeat'>&nbsp;</td></tr>");
	}
  document.write("</table>");
  
  document.write("</div>");
  y=y+1;
  }

document.write("</div>");
}
