function comment_add(object_id, item_id, type) {
	var text = $('comment_text').get('value');
	var user_name = $('user_name_c').get('value');
    var pars = $H({ object_id:object_id, item_id:item_id, type:type, text:text, user_name:user_name }).toQueryString();
    var myRequest = new Request.HTML({
        url: 'modules/comments/ajax/comment_add.php',
        method: 'post',
        update: 'comments_list',
        evalScripts: true,
        onComplete: function(){  }
    }).send(pars);

}

function comment_status(id) {
	$('comment_'+id).style.display = 'none';
    var pars = $H({ id:id }).toQueryString();
    var myRequest = new Request.HTML({
        url: 'modules/comments/ajax/comment_status.php',
        method: 'get',
        evalScripts: true,
        onComplete: function(){ 
		 }
    }).send(pars);
}

function comment_admin_status(id) {
    var pars = $H({ id:id }).toQueryString();
    var myRequest = new Request.HTML({
        url: 'modules/comments/ajax/comment_admin_status.php',
        method: 'get',
        update: 'comment_'+id,
        evalScripts: true,
        onComplete: function(){ 
		 }
    }).send(pars);
}

function comments_admin(type) {
    var pars = $H({ type:type }).toQueryString();
    var myRequest = new Request.HTML({
        url: 'modules/comments/ajax/comments_admin.php',
        method: 'get',
        update: 'out_block_top',
        evalScripts: true,
        onComplete: function(){  }
    }).send(pars);

}  
