function confirmDelete(id)
{
	var checkDelete = confirm("Wollen Sie diesen Eintrag wirklich löschen?");
	if(checkDelete == false)
	{
		skipValidation(0);
	 	return false;
	}
	else skipValidation(1);
		
	if(id != null) setListItemId(id);
}

function confirmCancel()
{
	if(formIsModified())
	{
		var checkCancel = confirm("Wollen Sie die Änderungen verwerfen?");
		if(checkCancel == false) return false;
	}
	return true;	
}

function confirmLock(id)
{
	var checkLock = confirm("Wollen Sie diesen Eintrag wirklich sperren?");
	if(checkLock == false)
	{	
		skipValidation(0);
		return false;
	}
	else skipValidation(1);
	if(id != null) setListItemId(id);
}

function confirmUnlock(id)
{
	var checkUnlock = confirm("Wollen Sie diesen Eintrag wirklich entsperren?");
	if(checkUnlock == false)
	{	
		skipValidation(0);
		return false;
	}
	else skipValidation(1);
	if(id != null) setListItemId(id);
}

function validateChanges()
{
	document.getElementById('modifiedForm').value = formIsModified() ? 1 : 0; 
}

function setListItemId(id)
{
	document.getElementById('listItemId').value = id;
}

function skipValidation(skip)
{
	document.getElementById("skipValidation").value = 0;

	if(skip == 1)
	{
		document.getElementById("skipValidation").value = "skipValidation";
	}
}

function handleAbout(show)
{
	var about = document.getElementById('aboutContent');
	
	if(show == 1)
	{
		if(about.style.display != "inline")
		{
			about.style.display = "block";
		}
	}
	else
	{
		about.style.display = "none";
	}	
}
