function addlistType() {
    var val = $('#listtype').val();
    
    if(val == 'new'){
        $('#listtype_div').append('<div style="display:inline;margin-left:10px;"><input type="text" name="listtype_new"></div>');
    }
    
}

function deleteOpdrachtI(counter) {
    elem = document.getElementById("n_li_" + counter);
	elem.parentNode.removeChild(elem);
}

function deletelI2(counter) {
    elem = document.getElementById("li_" + counter);
	elem.parentNode.removeChild(elem);
}


var newMICounter = 0;



$(document).ready(function() {
	$("#sortable").sortable();
});

function newPartnerItem() {
	showLoading();
	$.ajax({
		url: "modules/Partner/ajax/newListitem.php?counter=" + newMICounter,
		success: function(data) {

			$("#sortable").append(data);
					 
			$("#sortable").sortable({
				axis: 'y',
				cursor: 'n-resize'
			});

			//$("#sortable").disableSelection();
			$("#sortable li").hover(
			  function () {
			    $(this).find('.cms_cursor').html('<img src=\"img/icons/arrow_inoutgrey.png\" alt=\"sort\">');
			  },
			  function () {
			    $(this).find('.cms_cursor').html('&nbsp;');
			  }
			);
			hideLoading();
			
		}
	});
	newMICounter++;
}



