/*<div style="position: absolute; top: 10px; right: 20px; background-color: white;" align="right">
<button id="loginbutton" onclick="hidetoggle('loginbox')" style="border: solid 2px white; color: black; padding:4px;" >
login/signup ▼</button>
<div id="loginbox" style="display: none; padding: 4px;"><form method="post" action="">
	<input autocomplete="off" type="text" name="username" /><br><br>
	<input autocomplete="off" type="password" name="password" /><br><br>
	<div align="left">
		<input autocomplete="off" type="submit" value="login" />
		<span style="padding-left: 20px" />
		<a href="../register/register.php" style="text-decoration: none; border: solid 1px gray; border-radius: 1px; padding-bottom: 2px; padding-left: 5px; padding-right: 5px; color: black;">register</a>
	</div>
</form></div>
</div>*/


//removed until database is fixed
/*document.write('<div style="position: absolute; top: 10px; right: 20px; background-color: white;" align="right">'+
'<button id="loginbutton" '+"onclick=\"hidetoggle('loginbox')\""+' style="border: solid 2px white; color: black; padding:4px;" >'+
'login/signup ▼</button>'+
'<div id="loginbox" style="display: none; padding: 4px;"><form method="post" action="">'+
'<input autocomplete="off" type="text" name="username" /><br><br>'+
'<input autocomplete="off" type="password" name="password" /><br><br>'+
'<div align="left">'+
'<input autocomplete="off" type="submit" value="login" />'+
'<span style="padding-left: 20px" />'+
'<a href="../register/register.php" style="text-decoration: none; border: solid 1px gray; border-radius: 1px; padding-bottom: 2px; padding-left: 5px; padding-right: 5px; color: black;">register</a>'+
'</div></form></div></div>');*/

loginboxtext='<form method="post" action="">'+
'<input autocomplete="off" type="hidden" name="logout" value="true" /><br>'+
'<div align="center">'+
'<input autocomplete="off" type="submit" name="logout" value="logout" />'+
'</div></form></div>';
if(username!="guest"){
	$("#loginbox").html(loginboxtext);
	$("#loginbutton").html("logout ▼");
}

function hidetoggle(data){
	if($("#"+data).css("display")=="none"){
		$("#"+data).css("display","block");
	} else {
		$("#"+data).css("display","none");
	}
}
