function send() {
var code = document.getElementById('code');
var name = document.getElementById('name');
var user = document.getElementById('uid');
var content = document.getElementById('content');
var t_id =document.getElementById('id_t');

if (content.value == '') {
alert('الرجاء تعبئة حقل التعليق');
} else if (content.value.length < 10) {
alert('comment too short');
} else {
$.get('comments.php?do=add', { n: name.value,iu :user.value, l: code.value,id: t_id.value, c: content.value }, function(result) {
if (result == 0) {
alert('Error!');
} else {

$('#add-comment').fadeOut();
 $(result).hide().fadeIn('slow').appendTo('#commentse');
}
}
);

}
}
		
		
function edit(i){
	 $.get("cpanel.php?do=edit",{id:i},function(data){
   $("#control").html(data);

      });
}
	
function last(i) {
  $("#divmay").html('<img border="0" src="images/loading.gif">');
      $.get("last.php",{tcs:i},function(data){
   $("#divmay").html(data);

      });


    }

