I am new to JavaScript and am copying and pasting scripts and have one that works in IE9, FF, Chrome, but not Safari. The code initially wasn't working in Chrome but cleaning up this and that (like closing tags properly such as ">" to " />" and adding a semi-colon after things like document.cookie="ready=yes";) has it working now in Chrome.

In looking at this quiz's main JS as well as a page level JS, it seems like the lines of code are not properly closed with things like semi-colons. I don't know if that has anything to do with the Safari issue but I want to learn to code neatly.

If you could show me what I need to add, I'd appreciate it and if you happen to see something that screams out a Safari issue, let me know! Thanks! =)

Here are two snippets that I think should have some end of line syntax additions:

Code:
<script type="text/javascript">
function gradeit(){
var incorrect=null
for (q=1;q<=totalquestions;q++){
	var thequestion=eval("document.myquiz.question"+q)
	for (c=0;c<thequestion.length;c++){
		if (thequestion[c].checked==true)
		actualchoices[q]=thequestion[c].value
		}
	if (actualchoices[q]!=correctchoices[q]){
		if (incorrect==null)
		incorrect=q
		else
		incorrect+="/"+q
		}
	}
if (incorrect==null)
	incorrect="a/b"
	document.cookie='q='+incorrect
if (document.cookie=='')
	alert("Your browser does not accept cookies. Please adjust your browser settings.")
	else
window.location="results.htm"
}
</script>
and

Code:
<script type="text/javascript">
var wrong=0
	for (e=0;e<=2;e++)
		document.result[e].value=""
var results=document.cookie.split(";")
	for (n=0;n<=results.length-1;n++){
		if (results[n].charAt(1)=='q')
			parse=n
}
var incorrect=results[parse].split("=")
	incorrect=incorrect[1].split("/")
	if (incorrect[incorrect.length-1]=='b')
		incorrect=""
		document.result[0].value=totalquestions-incorrect.length+" out of "+totalquestions
		document.result[2].value=(totalquestions-incorrect.length)/totalquestions*100+"%"
	for (temp=0;temp<incorrect.length;temp++)
		document.result[1].value+=incorrect[temp]+", "
</script>