// Smartgoon by XueWu
function showMenu(sId){
	$(sId).style.display="";
	$(sId).focus();
}
function hideMenu(sId){
	$(sId).style.display="none";
}

function fnViewFeeds(oObj, sFed)
{
	var fed = $(sFed);
	if (fed.style.display == 'none')
	{
		oObj.value = hidden_feed;
		fed.style.display = '';
	}
	else
	{
		fed.style.display = 'none';
		oObj.value = show_feed;
	}
}

/**
 * ��Ա��
 */
function signIn(sFormName, sUrl)
{
  var frm = document.forms[sFormName];
  
  var username = frm.elements['rname'].value;
  var useremail = frm.elements['remail'].value;
  var comment = frm.elements['rcontent'].value;
  var total = frm.elements['rtotal'].value;
  var count = frm.elements['rcount'].value;
  
  if (total != count)
  {
  	alert(math_failure);
  	return false;
  }
  if (frm)
  {
  	if (username.length == 0 || useremail.length == 0 || comment.length == 0)
  	{
  		alert(input_not_null);
  		return;
  	}
  	else
  	{
  		frm.action = sUrl;
  		frm.submit();
  	}
  }
  else
  {
  	alert('Template Error');
  }
  
}

var sfHover = function() {
	if (!document.getElementsByTagName) return false;
	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);