//autocomplete menu????
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
  }
  
//dropdown menu hover for ie
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

	  

//submit a form to a location other than the default
function submitTo(fname, dest){ 
  var myform = document.getElementById(fname);
  myform.action = dest;
  myform.submit(); 
  } 

//show or hide an element by name
function toggleDiv(element) {
  var e = document.getElementById(element);
  if (e) {
    e.style.display = ((e.style.display != 'block') ? 'block' : 'none');
    }
  }
  
function hideDiv(){
  for (var i=0; i<arguments.length; i++) {
    var e = document.getElementById(arguments[i]);
    if (e) { e.style.display = 'none'; }
    }
  }


function showDiv(){
  for (var i=0; i<arguments.length; i++) {
    var e = document.getElementById(arguments[i]);
    if (e) { e.style.display = 'block'; }
    }
  }


function newwin(var_title, var_url, var_width){
  if(var_width === undefined) var_width = 880;
  var win = new Window({title: var_title,
        minimizable: false, 
        maximizable: false, 
        wiredDrag: true, 
        width: var_width, 
        height:500,
        destroyOnClose: true, 
        url: var_url
        }); 
  win.show();
  }
