var newMICounter = 0;/*function checkMenuInsert() {	if (newMICounter == 0) {		alert("U heeft nog geen menuitems toegevoegd.")		return false;	}	return true;}*/function newMenuitem() {	showLoading();	$.ajax({		url: "modules/Menu/ajax/newMenuitem.php?counter=" + newMICounter,		success: function(data) {		    $("#sortable").append(data);			$("#sortable").sortable({ 				axis: 'y', 				cursor: 'n-resize' 			});			$("#sortable").disableSelection();						$("#sortable li").hover(			  function () {			    $(this).find('span').html('<img src=\"../img/icons/arrow_inoutgrey.png\" alt=\"sort\">');			  }, 			  function () {			    $(this).find('span').html('&nbsp;');			  }			);			hideLoading();		}	});	newMICounter++;}function deleteMI(id) {	elem = document.getElementById("mi_" + id);	elem.parentNode.removeChild(elem);}function deleteNMI(counter) {	elem = document.getElementById("n_mi_" + counter);	elem.parentNode.removeChild(elem);}function editMI(id) {	showLoading();	$.ajax({		url: "modules/Menu/ajax/editMenuitem.php?id=" + id,		success: function(data) {			$("#editItem").html(data);			hideLoading();		}	});}function newPageFromMI(pid, mid, lang) {	var r = confirm("Er is nog geen pagina aan dit menuitem gekoppeld. Wilt u een nieuwe pagina aanmaken?");	if (r == true) {		showLoading();		$.ajax({			url: "modules/Menu/ajax/newPage.php?pid=" + pid + "&mid=" + mid + "&lang=" + lang,			success: function(data) {				hideLoading();				document.location = 'index.php?pid=' + data + "&lang=" + lang;			}		});	}}function changeUrl(pid, type) {	if(type == 'url'){		document.getElementById('url'+pid).style.display = "inline-block";		document.getElementById('page'+pid).style.display = "none";	} else {		document.getElementById('page'+pid).style.display = "inline-block";		document.getElementById('url'+pid).style.display = "none";	}	}function changeN_Url(NMId, type) {	if(type == 'url'){		document.getElementById('N_url'+NMId).style.display = "inline-block";		document.getElementById('N_page'+NMId).style.display = "none";	} else {		document.getElementById('N_page'+NMId).style.display = "inline-block";		document.getElementById('N_url'+NMId).style.display = "none";	}}
