

function deleteBooking(lectureID, year, month, day, selectedUser)
{
	if(confirm("Vill du ta bort kundbokningen?"))
	{
		window.location = "index.php?curPage=2&menu=1&year="+year+"&month="+month+"&day="+day+"&deleteBooking=1&lectureID="+lectureID;
	}
}

function showHiddenTR(ID)
{
	document.getElementById("hiddenTR" + ID).style.display= "";
	document.getElementById("hiddenTR" + ID).style.visibility = "visible";
	document.getElementById("hiddenTR" + ID).style.position= "relative";
	document.getElementById("hiddenTD" + ID).style.visibility = "visible";
	document.getElementById("hiddenTD" + ID).style.position= "relative";
	document.getElementById("hiddenDIV" + ID).style.visibility = "visible";
	document.getElementById("hiddenDIV" + ID).style.position= "relative";
	document.getElementById("hiddenA" + ID).style.visibility = "visible";
	document.getElementById("hiddenA" + ID).style.position= "relative";

}
function hideHiddenTR(ID)
{
	document.getElementById("hiddenTR" + ID).style.display= "none";
}

function showElement(htmlID)
{
	document.getElementById(htmlID).style.visibility = "visible";
}

function addLecture(placeHTMLID, priceHTMLID, year, month, day, date, startTime, endTime, userID, selectedUser)
{
	place = document.getElementById(placeHTMLID).value;
	price = document.getElementById(priceHTMLID).value;

	if(place != "" && price != "")
	{
		window.location = "index.php?curPage=2&menu=1&year="+year+"&month="+month+"&day="+day+"&date=" + date + "&startTime="+startTime+"&endTime="+endTime+"&lectureUserID="+userID+"&addLecture=1&place="+place+"&price="+price+"&selectedUser="+selectedUser; 
	}

}

function deleteLecture(timeID, year, month, day, selectedUser)
{
	if(confirm("Vill du verkligen ta bort tiden?")) 
 	{
	 	window.location = "index.php?curPage=2&menu=1&year="+year+"&month="+month+"&day="+day+"&deleteLecture=1&deleteTimeID="+timeID+"&selectedUser="+selectedUser;
 	}
}

function deleteCourseTime(timeID, year, month, day, selectedUser)
{
	if(confirm("Vill du verkligen ta bort kurstiden?"))  
 	{
	 	window.location = "index.php?curPage=2&menu=1&year="+year+"&month="+month+"&day="+day+"&deleteCourseTime=1&deleteTimeID="+timeID+"&selectedUser="+selectedUser;
 	}
}

function makeLecturePayment(lectureID, year, month, day, selectedUser)
{
	if(confirm("Vill du markera tiden som betald?"))
	{
		window.location = "index.php?curPage=2&menu=1&year="+year+"&month="+month+"&day="+day+"&makeLecturePayment=1&lectureID="+lectureID+"&selectedUser="+selectedUser;
	}
}
