<%@ LANGUAGE="VBSCRIPT" %>
<%
Set Obj = Server.CreateObject("WebHW.problem")
Obj.Problem_init
%>
<html>
<head>
<title>WebHW Problem</title>
<LINK REL=STYLESHEET HREF=<%= Session("VRoot") & "styles.css" %> TYPE="text/css">

<script language="JavaScript">
function setup(){
    document.webhw.setAutoRefresh(false);
    document.webhw.setDefault();
    document.webhw.shiftPixOrigin(-200,0);
    document.webhw.setPixPerUnit(5);
    document.webhw.setGridUnit(0);
    document.webhw.addObject("rectangle","h=100, w=600, x=30, y=-12");
    id1=document.webhw.addObject("rectangle","h=20, w=20");
    document.webhw.setTrajectory(id1, "<%= 20 + Session("R1") %>*t","0");
    document.webhw.setRGB(id1, 0,0,255);
    document.webhw.setTimeOneShot(10, "End of Animation");
    document.webhw.setAutoRefresh(true);
}
</script>

</head>

<body onload="setup()">

<% Obj.Problem_Begin %>

<center>
<applet codebase="<%= Session("VRoot")& "Physlet_classes" %>"
    archive="Animator4_.jar,STools4.jar"
    code="animator4.Animator.class" align="baseline" width="500" height="200" id="webhw"
    name="webhw">
    <param name="FPS" value="50">
    <param name="dt" value="0.02">
    <param name="showControls" value="true">
</applet>
</p>
</center>

<p>Left-click anywhere inside the applet window for position readout. Unless
noted otherwise, always assume the position readout is in meters.
<hr>
<p>How far does the block move in three seconds? Assume SI units.

<% Session("whw_N1_Answer") = 3 * (20 + Session("R1")) %>
<% Obj.Output_numeric_question(1) %>m

<% Obj.Problem_End %>
<hr>
<% Obj.Problem_status %>
</body>
</html>