function linkMainObj (mainObjType, otherObjType, mid, oid, the_row, ret_index) {
    kesz = false;
    $('#ext_row_'+the_row).animate({ height:"20px" }, 1000);
    timer = setTimeout("if (!kesz) {$('#ext_row_"+the_row+"').html('<img src=\""+BASEURL+"images/cms_images/loader_mini.gif\">&nbsp;Mentés folyamatban ...')};",1000);
    var p=new Array();
    p['command'] = "link_objs";
    p['linked'] = otherObjType;
    p['mid'] = mid;
    p['oid'] = oid;
    if (oid == "new") {
        p['nname'] = $("#new_tag_name").val();
        p['nszev'] = $("#new_tag_szev").val();
        p['nemail'] = $("#new_tag_email").val();
    }
    
    
    if (mainObjType) thefile = mainObjType + ".php";
        else thefile = "onlab.php";

    getAjax(thefile,p, function(ret){
                $('#ext_row_'+the_row).html(ret);
                kesz = true;
                timer = setTimeout("$('#ext_row_"+the_row+"').slideUp('slow')", 1500);
                timer1 = setTimeout('editH'+ret_index+'ListItem("'+mainObjType+'", '+the_row+', '+mid+', true)', 1950);
            });
            
            
    //editHListItem("egyenek",<?=$t?>,<?=$ta['ID']?>,true)
}

function linkOtherObj (mainObjType, otherObjType, mid, oid, the_row, ret_index) {
    kesz = false;
    $('#ext_row_'+the_row).animate({ height:"20px" }, 1000);
    timer = setTimeout("if (!kesz) {$('#ext_row_"+the_row+"').html('<img src=\""+BASEURL+"images/cms_images/loader_mini.gif\">&nbsp;Mentés folyamatban ...')};",1000);
    var p=new Array();
    p['command'] = "link_objs";
    p['linked'] = otherObjType;
    p['mid'] = mid;
    p['oid'] = oid;
    
    if (mainObjType) thefile = mainObjType + ".php";
        else thefile = "onlab.php";

    getAjax(thefile,p, function(ret){
                $('#ext_row_'+the_row).html(ret);
                kesz = true;
                timer = setTimeout("$('#ext_row_"+the_row+"').slideUp('slow')", 1500);
                timer1 = setTimeout('editH'+ret_index+'ListItem("'+otherObjType+'", '+the_row+', '+oid+', true)', 1950);
            });
            
            
    //editHListItem("egyenek",<?=$t?>,<?=$ta['ID']?>,true)
}
function delMainObjLink (mainObjType, otherObjType, mid, oid, the_row, ret_index) {
    kesz = false;
    $('#ext_row_'+the_row).animate({ height:"20px" }, 1000);
    timer = setTimeout("if (!kesz) {$('#ext_row_"+the_row+"').html('<img src=\""+BASEURL+"images/cms_images/loader_mini.gif\">&nbsp;Mentés folyamatban ...')};",1000);
    var p=new Array();
    p['command'] = "del_link";
    p['linked'] = otherObjType;
    p['mid'] = mid;
    p['oid'] = oid;
    
    if (mainObjType) thefile = mainObjType + ".php";
        else thefile = "onlab.php";

    getAjax(thefile,p, function(ret){
                $('#ext_row_'+the_row).html(ret);
                kesz = true;
                timer = setTimeout("$('#ext_row_"+the_row+"').slideUp('slow')", 1500);
                timer1 = setTimeout('editH'+ret_index+'ListItem("'+mainObjType+'", '+the_row+', '+mid+', true)', 1950);
            });
}
function delOtherObjLink (mainObjType, otherObjType, mid, oid, the_row, ret_index) {
    kesz = false;
    $('#ext_row_'+the_row).animate({ height:"20px" }, 1000);
    timer = setTimeout("if (!kesz) {$('#ext_row_"+the_row+"').html('<img src=\""+BASEURL+"images/cms_images/loader_mini.gif\">&nbsp;Mentés folyamatban ...')};",1000);
    var p=new Array();
    p['command'] = "del_link";
    p['linked'] = otherObjType;
    p['mid'] = mid;
    p['oid'] = oid;
    
    if (mainObjType) thefile = mainObjType + ".php";
        else thefile = "onlab.php";

    getAjax(thefile,p, function(ret){
                $('#ext_row_'+the_row).html(ret);
                kesz = true;
                timer = setTimeout("$('#ext_row_"+the_row+"').slideUp('slow')", 1500);
                timer1 = setTimeout('editH'+ret_index+'ListItem("'+otherObjType+'", '+the_row+', '+oid+', true)', 1950);
            });
}



function openList(type, id, the_row){
    var p=new Array();
    p['command'] = "openList";
    p['eid'] = id;
    if (type) thefile = type + ".php";
        else thefile = "onlab.php";
    
    getAjax(thefile,p, function(ret){
                //$('#ext_row_'+the_row).html(ret);
                alert('#csop_tagok_'+the_row);
                $('#csop_tagok_'+the_row).html(ret);
                //kesz = true;
                $('#csop_tagok_'+the_row).slideDown('slow');
                
                //timer = setTimeout("$('#ext_row_"+the_row+"').slideUp('slow')", 1500);
                //timer1 = setTimeout('editH'+ret_index+'ListItem("'+otherObjType+'", '+the_row+', '+oid+', true)', 1950);
            });
}

