function $i(id){ return document.getElementById(id); }

function CheckCompare(id,val,sect)
    {
       if (!sect) sect=0;
       if (!val)
       {
        var check=$('#compare_'+id+':checked').val();
        if (check!='on') check='';
       }else
        {
            check=(val!='false'?'1':'');
            $('#compare_'+id).attr('checked',(val!='false'?'checked':''))
            
        }
       
       
       //alert(host+'/index.php?mode=ajax&act=checklogin');
        jQuery.ajax({
                type: 'POST',
                data:'id='+id+'&sect='+sect+'&value='+check,
                dataType:'json',
                url: host+'/index.php?mode=ajax&act=compare',
                success: function(data){
                   if (data.item_1)
                        {
                            $('#compare_item_1').html(data.item_1);
                        }else
                            {
                                $('#compare_item_1').html('')
                            }
                   if (data.item_2)
                        {
                            $('#compare_item_2').html(data.item_2);
                        }else
                            {
                                $('#compare_item_2').html('')
                            }
                   if (data.item_3)
                        {
                            $('#compare_item_3').html(data.item_3);
                        }else
                            {
                                $('#compare_item_3').html('')
                            }
                    if (data.too_many_elements=='1')
                        {
                            $('#compare_'+id).attr('checked','');
                        }
                    return false;
                }
            }); 
        /*
        $('#reg_info').html(msg);
        $('#reg_info').css('display','block');
        */
        return;
    }
