function comm(id){

	text = $('#comtext').val();
	$('#comtext').val("");

        if (text != ""){

            $('#comm_result').hide();
            $("#comm_fields").hide();
            $("#comm_process").show();


            $.ajax({
                    type: "POST",
                    url: 'http://' + location.host + '/ajax/ajax.comments.php',
                    data: 'id=' + id + '&text=' + text ,
                    success: function(msg){
                        if (msg == "1"){
                            $("#comm_process").hide();
                            $('#comm_result').show();
                            $("#comm_fields").show();
                        }
                    }
            });

        }

}

function ctrl_enter(e, form)
{
	if (((e.keyCode == 13) || (e.keyCode == 10)) && (e.ctrlKey == true)){
		$("#" + form).click();
	}
}