Hi, I need help debugging this script:

<script>
function room1() {
var command = document.former.command.value;
var gotkey = document.hide.A1.value;
var dooropen = document.hide.A2.value;
var x = document.former.info.value;
var y = document.former.inv.value;
{document.former.stats.value="You are in a room. A key is to your left and a door infront."}
{document.hide.A1.value="0"}
{document.hide.A2.value="0"}
if (command == "get key" && gotkey == "0") {document.former.info.value=x +"\n You got the key."} {document.former.inv.value=y +"\n key"} {document.hide.A1.value="1"} {document.former.stats.value="You are in a room. A door is infront of you"}
else if (command == "get key" && gotkey == "1") {document.former.info.value=x +"\n There is no key anywhere in the area"}
else if (command == "open door" && gotkey == "0") {document.former.info.value=x +"\n The door is locked"}
else if (command == "open door" && gotkey == "1" && dooropen == "0") {document.former.info.value=x +"\n You opened the door!"} {document.hide.A2.value="1"}
else if (command == "open door" && dooropen == "1") {document.former.info.value=x +"\n The door is already opened!"}
else if (command == "go door" && dooropen == "1") {document.former.info.value=x +"\n You walk into the next room."}
else if (command == "go door" && dooropen == "1") {document.former.info.value=x +"\n The door is locked."}
</script>






<form name="former">
<input type="textarea" name="stats" value="Game Loaded!" size="84" onFocus="this.blur()">
<p>
<textarea rows="12" name="info" cols="52" onFocus="this.blur()"></textarea>
</p>
<p>
<input type="text" name="command" size="20">
</p>
<p>
<input type="button" value="Submit" onClick="room1()" name="submit">
<p><font color="#FF0000" size="4">Inventory</font>
<p>
<textarea rows="4" name="inv" value="Shoes" cols="29" onFocus="this.blur()"></textarea></form>
</form>
<form name="hide">
<input type="hidden" name="A1" value="0">
<input type="hidden" name="A2" value="0">
<input type="hidden" name="A3" value="0">
<input type="hidden" name="A4" value="0">
<input type="hidden" name="A5" value="0">
<input type="hidden" name="A6" value="0">
<input type="hidden" name="A7" value="0">
<input type="hidden" name="A8" value="0">

</form>