//检查数字
function checkIntNum()
{
	var keyvalue = window.event.keyCode;
	if (!((keyvalue>=48 && keyvalue<=57) || (keyvalue==190) || (keyvalue==8) ||  (keyvalue==13)))
	{
		window.event.keyCode = 0;
	}
}

// 读取Cookie
  function readFromCookie(CookieName)
  {
  	var strCookies = document.cookie;
    var nIndex = -1;
    var strCookieName;
    var strCookieValue;
    var nBegin;    
   
    strCookieName = CookieName + "=";
    nIndex = strCookies.indexOf(strCookieName);
    strCookieValue = "";
    if ( nIndex > -1)
		{			
			nBegin = nIndex + strCookieName.length;
			strCookies = strCookies.substring(nBegin);
		  nIndex = strCookies.indexOf(";");
		  if ( nIndex > -1)
		  {
		  	strCookieValue = strCookies.substring(0, nIndex);
		  }
		  else
		  {
		  	strCookieValue = strCookies;
		  }			
		}
			
    return strCookieValue;
  }


//分解Cookie
function parseCookie() {
	var cookies = new Array();
	var cookie = document.cookie;
	var i = 0;
	while (i >= 0 && i < cookie.length) {
		j = cookie.indexOf("=", i);
		var name = cookie.substring(i, j);
		i = cookie.indexOf(";", j);
		j++;
		if (i > 0) {
			var value = cookie.substring(j, i);
			i += 2;
		}
		else {
			var value = cookie.substr(j);
		}
		cookies[name] = value;
	}
	return cookies;
}