
 
function increase_sending(sending_count, article_id) 
{  
$.ajax({ 
   type: "POST", 
   url: "update_sending.php", 
   data: "sending_count="+sending_count+"&article_id="+article_id
    
 }); 


 } 


function increase_printing(printing_count, article_id) 
{  
$.ajax({ 
   type: "POST", 
   url: "update_printing.php", 
   data: "printing_count="+printing_count+"&article_id="+article_id
    
 }); 


 } 


function add_comment(article_id, address, comment, full_name) 
{  
$.ajax({ 
   type: "POST", 
   url: "add_comment.php", 
   data: "article_id="+article_id+"&address="+address+"&comment="+comment+"&full_name="+full_name,
   success: alert('تم إضافة التعليق بنجاح سيتم النشر خلال مدة أقصاها 24 ساعة..')
    
 }); 
 } 
 
 function clear_form_elements(ele) {
	 
	    $(ele).find(':input').each(function() {
	        switch(this.type) {
	            case 'password':
	            case 'select-multiple':
	            case 'select-one':
	            case 'text':
	            case 'textarea':
	                $(this).val('');
	                break;
	            case 'checkbox':
	            case 'radio':
	                this.checked = false;
	        }
	    });
	 
	}
	
 function getPoliticImage(id) {
jQuery(document).ready(function($) {
        
       
        $.post("getPoliticImage.php",  { article_id:id },
        function(data){
            $("#politic_img").html(data); 
        });	
 
	
});
 }
 
function show_most(mostCase) {
jQuery(document).ready(function($) {
        
       
        $.post("gettop5.php",  { mostCase:mostCase },
        function(data){
            $("#most_reading").html(data); 
        });	
 
	
});
 }
 
 function show_article(article_id, category_id) {
jQuery(document).ready(function($) {
        
       
         $(".top_content").load("article.php?article_id="+article_id+"&category_id="+category_id);
 
	
});
 }
