// JavaScript Document

num_drops=2
dropsloaded=0
timerID=null
default_status=""

visible = 'visible';
hidden = 'hidden';

// drop down menus v1.1
function SW_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function setmenu(n,makevisible) {
 
 submenu = SW_findObj('drop' + n);
// makevisible = args[1];
  
      if (submenu.style) 
       { submenu=submenu.style;} 
		 
 if (makevisible==0) 
  {submenu.visibility = hidden;}
 else 
  {submenu.visibility = visible;} 
}

//this one drops the menu down
function showdrop(num){
        if(dropsloaded){
                clearTimeout(timerID)
                hideall()
				//repositionDiv(num);
				setmenu(num, 1);
                }
        }

//hides menus based on timeout
function hidedrop(){
        if(dropsloaded){
                timerID=window.setTimeout('hideall()',300); return;
                }
        }

//hide all of the menus
function hideall(){
        if(dropsloaded){
                for(i=1;i<=num_drops;i++){

						  setmenu(i, 0);
                        }
                }
        }

//keep the menu open if a user is trying to use it
function keepdrop(){
        if(dropsloaded){
                clearTimeout(timerID)
                }
        }

dropsloaded=1


// extra function to highlight active link in left navigation menu!

function ModifyActiveLink(curr_id) 
{
	var active_link;
	active_link = document.getElementById(curr_id); 
	
	if (active_link)
	{
		if (active_link.style) 
		{ 
		   active_link=active_link.style;
		}
	
		active_link.color ='#555555'; 
		/*active_link.backgroundColor = '#96CE90';*/
		/*active_link.fontStyle = 'italic';*/
		/*active_link.fontWeight = 'bold';*/
	}
}
