<html xmlns:t ="urn:schemas-microsoft-com:time" >
<head>
<style>
	 .time    { behavior: url(#default#time2);}
</style>
<?IMPORT namespace="t" implementation="#default#time2">
<script>
function startTimer(){ setInterval(doTimer,100);}
function doTimer(){ document.all.Timer.innerText =parseInt(document.body.currTimeState.activeTime) }
</script>
</head>
<body timecontainer="seq" onbegin="startTimer()" >
<font style="color:black; font-size:16"><b>
Timer:
<span id="Timer" >0</span>
</b></font>
<br><br>
<DIV align="left" style="position:absolute; top:40; left:300;"><pre>Copyright: Copyright 1998-2001 W3C (MIT, INRIA, Keio), All Rights Reserved.
See http://www.w3.org/Consortium/Legal/.
Author: Muriel Jourdan, Muriel.Jourdan@inrialpes.fr
File Name: restart-fill-3.smil 
Version: Apr. 4, 2000, v1
Module: SMIL Timing & Sync Module
Feature: restart attribute and fill attribute
Media Components: 1 MPG (Intr Dur 5.6s) , 2 JPG 
Expected Behavior: show image1 for 16s. 
When image1 is clicked 
then start (or restart) img1 for 7s 
if and only if it is not already active  
then freeze it.  
Start (or restart) vid1 when img2 ends.
Two relevant executions to test: 
#a : click img1 at 2s and at 4s : vid1 must start only once
#b : click img1 at 2s and 10s : vid1 must be shown twice
<t:par dur="20s">
<t:img style="width:100;height:100" id="img1" src="../images/frown.jpg" />
<t:img style="width:100;height:100" id="img2" src="../images/smile.jpg" begin="img1.click" dur="7s"
fill="freeze" restart="whenNotActive" />
<t:video style="width:100;height:100" id="vid1" src="../videos/nist.mpg" begin="img2.end" 
fill="remove" />
</t:par>
</pre>
</DIV>
<t:par dur="20s">
<t:img style="width:100;height:100" id="img1" src="../images/frown.jpg" />
<t:img style="width:100;height:100" id="img2" src="../images/smile.jpg" begin="img1.click" dur="7s"
fill="freeze" restart="whenNotActive" />
<t:video style="width:100;height:100" id="vid1" src="../videos/nist.mpg" begin="img2.end" 
fill="remove" />
</t:par>
</body>
</html>