function validateAddComment()
{
	// Check if text is written
	if(!checkFieldEmpty(document.getElementById("commentText").value, "commentText"))
	{
		Form.errors = 1;
	}
}

function validateDelComment(formID)
{
	if(confirm("Vill du ta bort kommentaren?"))
	{
		document.getElementById(formID).submit();
	}
}

function validateReportComment()
{
	if(confirm("Vill du anmäla kommentaren?"))
	{
		document.getElementById("reportCommentForm").submit();
	}
}

function commentWindow(url) 
{
	window.open(url, "myWindow", "status = 1, height = 200, width = 300, resizable = 0" );
}


function showHideCreateAccountDiv()
{
	if(document.getElementById("createAccountDiv").style.display == "none")
	{
		document.getElementById("createAccountDiv").style.display = "";
		document.getElementById("loginDiv").style.display = "none";
	}
	else
	{
		document.getElementById("createAccountDiv").style.display = "none";
	}
}

function showHideLoginDiv()
{
	if(document.getElementById("loginDiv").style.display == "none")
	{
		document.getElementById("loginDiv").style.display = "";
		document.getElementById("createAccountDiv").style.display = "none";
	}
	else
	{
		document.getElementById("loginDiv").style.display = "none";
	}
}
