<!--
// 鼠标移入
function mouseover(obj){
	obj.background="images/Button_bgB.gif";
	obj.style.cursor="hand";
}
//鼠标移出
function mouseout(obj){
	obj.background="images/Button_bg.gif";
	obj.style.cursor="hand";
}
//鼠标点击
function mouseclick(Bottonid,URL){
	//计算COOKIES 时间
	//var curTime = new Date();
    //curTime.setTime(curTime.getTime() + 1000*24*60*60*1000);
	document.cookie="Button="+Bottonid;//写COOKIES
	window.location=URL;
}

///取得ＣＯＯＫＩＥＳ值
function getCookie(name)
{											// 使用名称参数取得Cookie值, null表示Cookie不存在
  var strCookies = document.cookie;
  var cookieName = name + "=";  // Cookie名称
  var valueBegin, valueEnd, value;
  // 寻找是否有此Cookie名称
  valueBegin = strCookies.indexOf(cookieName);
  if (valueBegin == -1) return null;  // 没有此Cookie
  // 取得值的结尾位置
  valueEnd = strCookies.indexOf(";", valueBegin);
  if (valueEnd == -1)
      valueEnd = strCookies.length;  // 最後一个Cookie
  // 取得Cookie值
  value = strCookies.substring(valueBegin+cookieName.length,valueEnd);
  return value;
}//end function getCookie

// 检查Cookie是否存在
function checkCookieExist(name)
{											
  if (getCookie(name))
      return true;
  else
      return false;
}//end function checkCookieExist

//从ＣＯＯＫＩＥＳ对应设置菜单状态
function settable(){
	if(checkCookieExist("Button")){
		Button[getCookie("Button")].background="images/Button_bgB.gif";
	}else{
		Button[0].background="images/Button_bgB.gif";
	}
}
//验证用户登陆
function CheckUserLogin(){
	if(document.UserLogin.Userid.value==""){
		alert("The user ID can't be empty!");
		document.UserLogin.Userid.focus();
		return false;
	}
	if(document.UserLogin.Password.value==""){
		alert("The Password can't be empty!");
		document.UserLogin.Password.focus();
		return false;
	}
}
//搜索验证
function CheckSearch(){
	if(document.Search.K.value==""){
		alert("Please input keywords!");
		document.Search.K.focus();
		return false;
	}
}
//设置被先表格颜色
function ModThisBgColor(obj,thisobj){
	if(thisobj.checked){
		obj.style.backgroundColor='#FFF7D0';
	}else{
		obj.style.backgroundColor='#FBFBFB';
	}
}
//-->
