// for Search box 
function clearInit(obj,val){
	if(obj.value==val) {
		obj.value='';
	}
}


//Help IE with the menu's li:hover class for Home page
sfHover = function() {
	var menu = document.getElementById("menu");
	if (!menu)
		return;
		
	var sfEls = menu.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);

//Help IE with the menu's li:hover class for rest of site (Horizontal Navigation)
sf2Hover = function() {
	var nav = document.getElementById("nav");
	if (!nav)
		return;
		
	var sfEls = nav.getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sf2hover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sf2hover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sf2Hover);


//Alternating Row Color
function alternate(id){
 if(document.getElementsByTagName){  
   var table = document.getElementById(id);  
   var rows = table.getElementsByTagName("tr");  
   for(i = 0; i < rows.length; i++){          
 //manipulate rows
     if(i % 2 == 0){
       rows[i].className = "even";
     }else{
       rows[i].className = "odd";
     }      
   }
 }
}
