
/* ****************************************************  
  Needs to modify Path from ROOT to reflect your site!
 **************************************************** */
  var offPath = ""
 
/* *********************************************************** 
  Needs to modify Path to your clear.gif to reflect your site!
 ********************************************************** */ 
  var spacerGif = offPath + "/img/clear.gif"

/* *********************************************************** 
  Optional: change the Background class/color of the dropdown
 ********************************************************** */ 
  var fillClass = "fillLtBlue"

/* **************************************************************************************************************
  VERY IMPORTANT!
  The function dropMenu below create the dropMenu Object
  Use it as a reference to see what each parameter means
  and modify it to effect your drop down's properties

  name = name of the dropdown for on/off action, needs to be same as the value of nLabel(0)
  top  = number of pixels offset menu is from top of screen
  left = number of pixels offset menu is from left of screen
  innerwidth = How wide is the dropdown link table width only, excluding the > column which is default to 10px
  linkclass = CSS style class to be applied to the links
  padding = How wide should the left & right padding in pixels
  showOrNot = 0 is by default which hides the dropdown until activated by rollover events, 1 shows it regardless
  tableBorderOnOrNot = 0 is default value, use 1 to turn on the border for tweakings
  
 ************************************************************************************************************** */


 function dropMenu(name,top,left,innerwidth,linkclass,tableBGcolor,padding,showOrNot,tableBorderOnOrNot) {
  this.name = name;
  this.top = top;
  this.left = left;
  this.innerwidth = innerwidth;
  this.linkclass = linkclass;
  this.tableBGcolor = tableBGcolor;
  this.padding = padding
  this.showOrNot = showOrNot;
  this.tableBorderOnOrNot = tableBorderOnOrNot;  
}

var menu = new Array()
var links = new Array()
  
/* Repeat below for as many dropdowns as needed, removed unused menus!!! */
/* ***************** START OF USER EDIT SECTION **************************************************

  Repeat below for as many dropdowns as needed, removed unused menus!!!
  Copy from the menu[x] line to // ends 1 dropdown section
  Remember to increase the menu array x accordingly to avoid script errors
  
  The variable links[x][y] needs 2 parameters separated by the pipe '|'
  the params are: "URL link destination|Link Label" (there's no space before or after the |
  If the Link Label is too long, use html <br> and &nbsp; to line break and indent as needed.

  Remember to increase the link counter y accordingly per example below to avoid script errors  
  AND the links x must match up with the menu x counter!
  
  Remember to give the dropdown the name same as the nLabel(x) to avoid script errors!
  
  To Adjust the location of the dropdown adjust its TOP & LEFT position, the 2nd & 3rd param
   hint - the offset of the 2nd dropdown and so forth will roughly = button's widths cummulatively
  
************************************************************************************************* */

/* *** start of -NEWS- section *** */
  menu[0] = new dropMenu('news',125,180,150,'navBorder',"",10,0,0)
  links[0] = new Array()
  links[0][0] = offPath + "/news/registration.php|Fall Registration"
  links[0][1] = offPath + "/news/calendar.php|Calendar of Events"
  links[0][2] = offPath + "/news/kidzone.php|AYSO KidZone!"
  links[0][3] = offPath + "/news/policies.php|Policies"
  links[0][4] = offPath + "/news/Sponsors_2006.htm|Region 92 Sponsors"
/* ***Sponsors_NEW.php|" *** */
/* *** ends 1 dropdown section *** */


/* *** start of -VOLUNTEER- section *** */
  menu[1] = new dropMenu('volunteer',125,281,150,'navBorder',"",10,0,0)
  links[1] = new Array()
  links[1][0] = offPath + "/volunteer/vpositions.php|Open Positions"
  links[1][1] = offPath + "/volunteer/vrequirements.php|Requirements"
  links[1][2] = offPath + "/volunteer/vcoach.php|Coaches"
  links[1][3] = offPath + "/volunteer/vreferee.php|Referees"
  links[1][4] = offPath + "/volunteer/vteamparent.php|Team Parents"
  links[1][5] = offPath + "/volunteer/vboard.php|Board Members"
  links[1][6] = offPath + "http://ayso92.org/lists/admin/|Admin"
/* *** ends 1 dropdown section *** */


/* *** start of -FALLSEASON- section *** */
  menu[2] = new dropMenu('fall',125,374,150,'navBorder',"",10,0,0)
  links[2] = new Array()
  links[2][0] = offPath + "/fall/fteams.php|Teams"
  links[2][1] = offPath + "/fall/fgameguidelines.php|Game Guidelines"
  links[2][2] = offPath + "/fall/fschedules.php|Schedules"
  links[2][3] = offPath + "/fall/fstatistics.php|Statistics"
  links[2][4] = offPath + "/fall/2009TeamPix.php|Team Pictures"
  links[2][5] = offPath + "/fall/ffields.php|Fields"
  links[2][6] = offPath + "/fall/fallstars.php|All-Stars"
  links[2][7] = offPath + "/fall/fpostseason.php|Post Season"
  links[2][8] = offPath + "/fall/2009camps.php|AYSO Summer Camps"
/* *** ends 1 dropdown section *** */


/* *** start of -SPRINGSEASON- section *** */
  menu[3] = new dropMenu('spring',125,471,150,'navBorder',"",10,0,0)
  links[3] = new Array()
  links[3][0] = offPath + "/spring/steams.php|Teams"
  links[3][1] = offPath + "/spring/sschedules.php|Schedules"
  links[3][2] = offPath + "/spring/sstatistics.php|Statistics"
  links[3][3] = offPath + "/spring/spring2009teampix.php|Team Pictures"
  links[3][4] = offPath + "/spring/sfields.php|Fields"
/* *** ends 1 dropdown section *** */


/* ***************** END OF USER EDIT SECTION, EDIT CODES BELOW AT YOUR OWN RISK! ****************** */


function createDropDown() {
  var page = "";
  var temp2 = ""
  var lt = "<td valign='top' class='"+fillClass+"'>&gt;</td>"
  var rt = "<td class='"+fillClass+"' valign='top'>"
  var filler_col = ""  
  //var t = screen.availWidth
  
  //window.status = t
  
  
  for (var j=0; j < menu.length; j++) {    
    if(j==0) filler_col = "<td><img width="+menu[j].padding+" height="+menu[j].padding+" src='"+spacerGif+"'></td>" 
      page += "<div  class='"+ fillClass+"' id='mn_"+menu[j].name+"' onMouseOver='layerOn(&quot;"+menu[j].name+"&quot;);swapOn2(&quot;T_"+menu[j].name+"&quot;)' onMouseOut='layerOff(&quot;"+menu[j].name+"&quot;);swapOff2(&quot;T_"+menu[j].name+"&quot;)' style='position:absolute; top:"+menu[j].top+"px; left:"+menu[j].left+"px; visibility:"
      page += (menu[j].showOrNot==0)? "hidden'>" : "visible'>"    	
	  page += "<table cellpadding=0 cellspacing=0 class='"+menu[j].linkclass+"' width="+menu[j].innerwidth
      page += (menu[j].tableBGcolor!="")? " bgcolor='"+menu[j].tableBGcolor+"'" : " "
      page += (menu[j].tableBorderOnOrNot==0)? "border=0>" : "border=1>"
	  page += "<tr>" + filler_col 
	  page += "<td><img width='10' height='10' src='"+spacerGif+"'></td>"
	  page += "<td><img width='5' height='10' src='"+spacerGif+"'></td>"
	  page += "<td><img width="+menu[j].innerwidth+" height="+menu[j].padding+" src='"+spacerGif+"'></td>" 
      page += "<td><img width='"+menu[j].padding+"' height='"+menu[j].padding+"' src='"+spacerGif+"'></td></tr>"  
	  temp2 = "<td rowspan="+links[j].length+" class='"+fillClass+"'><img width="+menu[j].padding+" height=25 src='"+spacerGif+"' border=0></td>"
	  for(var k=0; k < links[j].length; k++) {
        page += "<tr>"
	    page += (k==0)? temp2 : ""
        temp = links[j][k].split("|")
	    page += lt+rt+"<img width=5 height=1 border=0 src='"+spacerGif+"'></td>"+rt+"<a href='"+temp[0]+"' title='"+temp[1]+"'>"+temp[1]+"</a><br><img width=1 height=2 border=0 src='"+spacerGif+"'></td>"
	    page += (k==0)? temp2 : ""
	    page += "</tr>"
      }
      page += "<tr><td colspan='5'><img width='"+menu[j].innerwidth+"' height='"+menu[j].padding+"' src='"+spacerGif+"' border=0></td>"
      page += "</tr></table></div>"	    
  } 
  return page	
}


function HideAllLayers(layer,topORLeft) {
  if (topORLeft==null) {
    for(var j=0; j < menu.length; j++) {
     if(menu[j].name!=layer) layerOff(menu[j].name)  
    }
  } else {
    for(var j=0; j < lf_menu.length; j++) {
     if(lf_menu[j].name!=layer) layerOff(lf_menu[j].name)  
    }
  }
}

function layerOn(layer,topORLeft) { 
	  HideAllLayers(layer,topORLeft); 
	  show("mn_"+layer);
}

function layerOff(layer) {  
    hide("mn_"+layer);
}

function hide(aLayer) { eval("document.getElementById('"+aLayer+"').style.visibility='hidden'"); }
function show(aLayer) {	eval("document.getElementById('"+aLayer+"').style.visibility='visible'"); }	


/* Added 9/5/2002 - recalculates the dropdown's position on resize of browser */

function reCalculateMenuPositions(){
  documentWidth  = document.body.offsetWidth+document.body.scrollLeft-20;
  documentHeight = document.body.offsetHeight+document.body.scrollTop-0;
  /* 
    recalculate the positions here of all layers
    if width > 778, if less than that, take default settings.
  
  */
  var Loffset = 0;
  
  if (parseInt(documentWidth) > 778) {
    Loffset = parseInt((documentWidth-778)/2)
  } else {
    Loffset = 0;
  }
  
  for(var j=0; j < menu.length; j++) {
 		
 	document.getElementById("mn_"+menu[j].name).style.left = (Loffset + parseInt(menu[j].left)) + 'px';       
 
 	
 }
}



