Can anyone sort this out?
it keeps saying line 11 object required

Code:
<script type="text/javascript">
<!--
function togglemen()
{
 if (document.layers) 
 {
  var slider = document.layers[ted];
 } 
 else if (document.all) 
 {
  var slider = document.all(ted).style;
 }
 while(slider.left < 100)
 {
 setTimeout(slider.left++,1000);
 }
}
//-->
</script>
<div id="ted" name="ted" style="height:10;width:100;position:absolute;left:-100;top:0;background-color:red;">
Can You See Me!
</div>
<a href="#" onclick="togglemen(); return false;">Show Me</a>