
var Progress = "1";

function Clicked()
{
	if (document.form1.CheckMe.value == "")
		{alert("\nYou need to answer the question to continue.")}
	else
		{
			if (Progress == "1")
			{if (document.form1.CheckMe.value == CorrectAnswer) 
				{DisplayFeedback('Correct',Feedback);	}
			  else
			  	{DisplayFeedback('Incorrect',Feedback)}
			}
			if (Progress == "2")
			{self.location = NextPage}
			if (Progress == "3")
			{parent.location = NextPage}
		}	
}

function SwapMe()
{self.location = NextPage}




function DisplayFeedback(Response,Feedback)
{
	if(Response == "Correct") {Answer = '<img src="images/correct.gif" WIDTH=500 HEIGHT=40 BORDER=0 alt="Correct:  Review the feedback and additional information provided.  Click on the Close button when you are ready to proceed.">'};
	if(Response == "Incorrect") {Answer = '<img src="images/correctNot.gif" WIDTH=500 HEIGHT=40 BORDER=0 alt="Incorrect:  Review the feedback and additional information provided.  Click on the Close button when you are ready to proceed.">'};
		

		vwidth = 570;
		vheight = 450;
		sWidth = screen.width;
		tWidth = (sWidth/2);
		hWidth = (vwidth/2);
		uWidth = (tWidth-hWidth);
		

			
	FBwin=window.open("","Feedback2","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=no,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=50");
	if (FBwin != null)
	{
	if (FBwin.opener == null) {FBwin.opener = window};
		FeedBackText = ''
		FeedBackText = FeedBackText + '<html><head><title>Feedback &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</title>';
		FeedBackText = FeedBackText + '</head><link rel="stylesheet" href="Feedback.css">';
		FeedBackText = FeedBackText + '<body bgcolor="F9F3E9" onload="self.focus()"  LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>';
		FeedBackText = FeedBackText + '<table width="100%" height="54" border="0" cellspacing="0" cellpadding="0"><TR><TD valign="top"><IMG SRC="images/PUquizFB.gif" WIDTH="475" HEIGHT="54" ALT="Feedback" border="0"></TD><TD valign="top"><a href="javascript:opener.SwapMe();self.close()" onMouseOver="document.closeme.src=\'images/PU_print_closeHi_02.gif\';" onMouseOut="document.closeme.src=\'images/PU_print_close_02.gif\';"><IMG SRC="images/PU_print_close_02.gif" WIDTH="65" HEIGHT="54" ALT="Close" border="0" name="closeme"></a></TD><td valign="top" width="100%" background="images/PU_print_close_ext.gif">&nbsp;     </td></TR></TABLE>';
		FeedBackText = FeedBackText + '<table width="100%" border="0" cellspacing="0" cellpadding="12"><tr bgcolor="#F9F3E9">	<td><p>';
		FeedBackText = FeedBackText + Answer;
		FeedBackText = FeedBackText + '<p>';
		FeedBackText = FeedBackText + Feedback;
		FeedBackText = FeedBackText + '<p><CENTER><A HREF="javascript:opener.SwapMe();self.close()"><IMG SRC="images/spacer.gif" WIDTH="1" HEIGHT="1" BORDER="0" ALT="Click here to close this window"></A></CENTER><br>';
		FeedBackText = FeedBackText + '</td></tr></table></body></html>';
	
		FBwin.document.write(FeedBackText);
		FBwin.document.close();
	}	
}



