function case_comments(id, page) {
  $.get('case.comments.php', {id: id, page: page}, function(data) {
    $('#comments').html(data);
  }, 'html');
}

function case_post_comment(id) {
  $.post('case.send.comment.php', {id: id, comment: document.forms.form_comment_case.comment.value}, function(data) {
    $('#form_comment_case').html(data);
  }, 'html');
}

function handleEnter(inField, e) 
{
    var charCode;
    
    if(e && e.which)
	{
        charCode = e.which;
    }
	else if(window.event)
	{
        e = window.event;
        charCode = e.keyCode;
    }

    if(charCode == 13) 
	{
        inField.submit();
    }
}

function popup(url, width, height) {
  var options = "width=" + width + ",height=" + height + ",";
  options    += "resizable=no,scrollbars=yes,status=no,";
  options    += "menubar=no,toolbar=no,location=no,directories=no";
  var newWin  = window.open(url, 'newWin', options);
  newWin.focus();
}
