ï»¿

function check_isnum(){
	var c="";
	var ok=0;
	c=event.keyCode;
	if(c==37 | c==39) ok=1; 
	if(c==8 | c==46) ok=1;  
	if(c>=48 && c<=57) ok=1;						
	if(ok){ 
	  	return true;	  	  	  	 	 
	  }
	else
	  return false;
}




function get_header_login(){
	var e=getCookie('user');
	if(e==null){
		document.write(' <a href="login.php" class="A">ç™»å…¥</a> ');
	}else{ 
		document.write(' <a href="logout.php" class="A">ç™»å‡º</a> ');
	}
	
}




function jb() 
{ 
		var A=null; 
		try 
		{ 
		A=new ActiveXObject("Msxml2.XMLHTTP") 
		} catch(e) { 
		try 
		{ 
		A=new ActiveXObject("Microsoft.XMLHTTP") 
		} catch(oc) { 
		A=null 
		} 
		} 
		if ( !A && typeof XMLHttpRequest != "undefined" ) 
		{ 
		A=new XMLHttpRequest() 
		} 
		return A 
} 

var oHttpReq = new jb();
function ajax_get(myurl){
	
	var result="";
	oHttpReq.open("GET", myurl, false);
	oHttpReq.send("");
	if(oHttpReq.status == 200)
	    result = (oHttpReq.responseText);	
	else
		  result ='µL¸ê®Æ';
	return result;
}


var caution = false
   function setCookie(name, value, expires, path, domain, secure) {
      var curCookie = name + "=" + escape(value) +
         ((expires) ? "; expires=" + expires.toGMTString() : "") +
         ((path) ? "; path=" + path : "") +
         ((domain) ? "; domain=" + domain : "") +
         ((secure) ? "; secure" : "")
      if (!caution || (name + "=" + escape(value)).length <= 4000)
         document.cookie = curCookie
      else
         if (confirm("Cookie exceeds 4KB and will be cut!"))
            document.cookie = curCookie
   }

function getCookie(name) {
	var prefix = name + "="
	var cookieStartIndex = document.cookie.indexOf(prefix)
	if (cookieStartIndex == -1)
		return null;
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
	if (cookieEndIndex == -1)
		cookieEndIndex = document.cookie.length
	return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}