    function checkloginpc()
    {
        var etID = deviceid();
        $("#deviceid").val(etID);
    }

    function checkSetedID()
    {
        var xndeviceid =deviceid();
        if( !xndeviceid ) defineID();
    }

    function deviceid()
    {
        var xndeviceid = get_cookie( 'ebooktaiwandevicex' );
        return xndeviceid;
    }

    function delDevice()
    {
        del_cookie( 'ebooktaiwandevicex' );
    }

    function defineID()
    {
      	$.ajax
      	({
      		type: "POST",
      		url: "cookieaction.php", 
      		data: "action=define",			
      		success: function(msg)
      		{
      			set_cookie( 'ebooktaiwandevicex', msg, 9999 );
      		} 
      	});
    }

    function checkPCname()
    {
        if( $("#pcname").val() != "" )
        {
            document.theform.submit();
            return true;
        }
        alert( "請輸入電腦名稱！" );
        return false;
    }

