function openSNavItem(i) {
	var newWind = window.open(i,"itemwindow","resizable,scrollbars,height=730,width=815");
}

function openSNavItemSmall(i) {
	var newWind = window.open(i,"itemwindow","resizable,scrollbars,height=640,width=640");
}
function openSNavItemLg(i) {
	var newWind = window.open(i,"itemwindow","resizable,scrollbars,height=640,width=1020");
}
function openGame(i) {
	var newWind = window.open(i,"gamewindow","resizable,scrollbars,height=850,width=850");
}




function popupWindow(page,w,h){
	popwin = window.open(page,'pwin','width=' + w + ',height=' + h + ',scrollbars=yes,resizable=yes')
	popwin.focus()
}
 
function checkScore1(Ans) {
	for (var i=0; i < document.q1.A.length; i++)
	   {
	   if (document.q1.A[i].checked)
	      {
	      var rad_val = document.q1.A[i].value;
	      }
	   }
	if (rad_val == Ans) {
		$('q1message').update("<h1>Right you are!</h1>");
		$('q1message').style.display='block';
		$('HL1').style.background='#fff';
		}
	else {
		$('q1message').update("<h1>Sorry...</h1><h4>Check the highlighted text and try again!</h4>");
		$('q1message').style.display='block';
		$('HL1').style.background='#ff6';
	}
	return false;
}

function checkScore2(Ans) {
	for (var i=0; i < document.q2.A.length; i++)
	   {
	   if (document.q2.A[i].checked)
	      {
	      var rad_val = document.q2.A[i].value;
	      }
	   }
	if (rad_val == Ans) {
		$('q2message').update("<h1>Correct!</h1>");
		$('q2message').style.display='block';
		$('HL2').style.background='#fff';
		}
	else {
		$('q2message').update("<h1>Sorry...</h1><h4>Check the highlighted text and try again!</h4>");
		$('q2message').style.display='block';
		$('HL2').style.background='#ff6';
	}
	return false;
}
function checkScore3(Ans) {
	for (var i=0; i < document.q3.A.length; i++)
	   {
	   if (document.q3.A[i].checked)
	      {
	      var rad_val = document.q3.A[i].value;
	      }
	   }
	if (rad_val == Ans) {
		$('q3message').update("<h1>Right you are!</h1>");
		$('q3message').style.display='block';
		$('HL3').style.background='#fff';
		}
	else {
		$('q3message').update("<h1>Sorry...</h1><h4>Check the highlighted text and try again!</h4>");
		$('q3message').style.display='block';
		$('HL3').style.background='#ff6';
	}
	return false;
}
