var startHeight = 20;
var endHeight = 88;

var nav = new Array();

function navItem(count)
{
 this.height = 20;
 this.ID = "nav_"+count;
 this.direction = null;
}

for (intcount=1;intcount<=6;intcount++)
{
 nav[intcount]=new navItem(intcount);
}

var intThisSection = null;
var intLastSection = null;

function fn_moveList(tmpcount)
{
 for (i=1;i<=6;i++)
 {
  if(intThisSection==i && nav[i].height<endHeight)
  {
   nav[i].height = nav[i].height+1;
   eval(structure + nav[i].ID + "').style.height='" + (nav[i].height) + "px'");
  }
  if(intThisSection!=i && nav[i].height>startHeight)
  {
   nav[i].height = nav[i].height-1;
   eval(structure + nav[i].ID + "').style.height='" + (nav[i].height) + "px'");
  }
 }
}

function fn_ResetNav()
{
 clearTimeout(doit);                   // stop any timeout that may be running preventing the layer from hiding
 doit = null;
 var speed = Math.round(5); 
 var timer = 0;
 for(intcount = 0; intcount <= 68; intcount++) 
 { 
   setTimeout("fn_moveList("+intcount+")",(timer * speed)); 
  timer++;
 }
}

function fn_ResetNavOrig()
{
 if(intLastSection!=null)
 {
  eval(structure + "nav_" + intLastSection + "').style.height='" + startHeight + "px'");
  intLastSection = null;
 }
 if(intThisSection!=null)
 {
  eval(structure + "nav_" + intThisSection + "').style.height='" + endHeight + "px'");
 }
}
  

var busy, doit;

busy = 0;
doit = setTimeout("",500);             // Needs to be set here to counteract a Timeout bug in NS6 on the Mac

function doChange()
{
 if (busy != 1) 
 {
  intThisSection = null;
  fn_ResetNav();
 }
}

function fn_HideNav()
{
 busy = 0;
 doChange();
}

onTimeout = "doChange()";              // the variable evaluated by the timeout, calling the onchange function

function fn_waitToHide()
{
 busy = 0;                             // set busy = 0 denotes that the menu is not being used and can be hidden (used in doChange())
 doit = setTimeout(onTimeout,500);     // doit is a variable that holds the Timeout which will evaluate the variable 'onTimeout'
}

function itsBusy()
{
 busy = 1;                             // set busy = 1 denotes that the menu is being used and shouldn't be hidden (used in doChange())
 clearTimeout(doit);                   // stop any timeout that may be running preventing the layer from hiding
 doit = null;                          // remove the Timeout from the variable to free it up to start again - stops older browsers getting confused
}

function checkMouseOver()
{}

function fn_NavRollover(navID)
{
 if (busy==1){return;}
 if (navID != intThisSection)
 {
  intThisSection = navID;
  fn_ResetNav(); 
 }
 itsBusy();
}
