// JavaScript Document

// DROPDOWN MENU
Menu = {timer : null, current : null};
Menu.getStyle = function(name){
	if(document.getElementById) return document.getElementById(name).style;
	else if(document.all) return document.all[name].style;
	else if(document.layers) return document.layers[name];
}
Menu.show = function(name){
	if(this.timer) clearTimeout(this.timer);
	this.getStyle(name).visibility = "visible";
	this.current = name;
}
Menu.hide = function(){
	this.timer = setTimeout("Menu.doHide()",100);
}
Menu.doHide = function(){
	if(this.current){
		this.getStyle(this.current).visibility = "hidden";
		this.current = null;
	}
}

// MAXIMIZE PAGE

function maximizeWin() {
  if (window.screen) {
    var aw = screen.availWidth;
    var ah = screen.availHeight;
    window.moveTo(0, 0);
    window.resizeTo(aw, ah);
  }
}
// ALERT 640x480 

function checkRes() {
	if ((screen.width < 780) || (screen.height < 550))
		alert('Please note: This site is optimized for a Screen Resolution of 800x600 or larger. Please adjust your settings for optimal viewing.');
}

// SELECT DROPDOWNS

function SelectIt() {
  if (document.QuickJump.Select.options[document.QuickJump.Select.selectedIndex].value != "none"){ 
    location = document.QuickJump.Select.options[document.QuickJump.Select.selectedIndex].value}
}

// CLEAR FORM FIELDS

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 


// POPUP - NOSCROLL

var desktop;
function key(Pop, name, size)
{
desktop=window.open(Pop, name, size+'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,top=20,left=20');
}

// POPUP - SCROLL

var desktop;
function keyScroll(Pop, name, size)
{
desktop=window.open(Pop, name, size+'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=20,left=20');
}

//add the following to the bottom of your scripts.js file. This makes the hover menu work in IE6
// START LIST FOR IE6

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);


  

