//--------------------- Last Modified --> 2006.11.10 ---------------------//

//------------------- Son-Of-Sucker-Fish IE Hack -------------------//
sfHover = function(elementId) {
	var sftmpEls = document.getElementById(elementId);
	if(sftmpEls) {
	    var sfEls = sftmpEls.getElementsByTagName("LI");
	    // for each list item in the menu...
	    for (var i=0; i < sfEls.length; i++) {
		    // Is this IE7?  If so, use onmouseleave to fix the fact that onmouseout won't fire
		    is_IE7 = navigator.appVersion.indexOf("MSIE 7.0") != -1;

		    sfEls[i].onmouseover = function() {
			    this.className+=" sfHover";
			    // is this a top-level menu item?
			    var child_ul = this.getElementsByTagName('ul')[0];
			    if (child_ul && is_IE7){
				    // fix for IE7
				    child_ul.style.position = 'static';
			    }
		    }

		    sfEls[i].onmouseleave = function() {
			    // is this a top-level menu item?
			    var child_ul = this.getElementsByTagName('ul')[0];
			    if (child_ul && is_IE7){
				    // fix for IE7
				    child_ul.style.position = 'absolute';
				    child_ul.style.left = '-9000px';
			    }
		    }

		    sfEls[i].onmouseout = function() {
			    this.className=this.className.replace(new RegExp(" sfHover\\b"), "");
		    }

	    }
	}
}



//------------------- for clearing and replacing text in form input fields and textareas -------------------//
function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
} 
function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}

