if (document.captureEvents) document.captureEvents(Event.KEYDOWN); //KEYPRESS does not see arrows
document.onkeydown = processKeypresses;
var $opacity=0; //0.1;
document.write('');
document.write('
');
function processKeypresses(e) {
//alert(navigator.appName);
if(navigator.appName == "Netscape") k = e.which; // key's ASCII code (Netscape and Mozilla and Safari)
else k=event.keyCode; // key's ASCII code (IE and Opera)
//alert(k);
//if (k==13) forward(); // return
if (k==27) history.back(); // esc
if (k==32) step(0); // space
//if (k==37) backward(); // arrow left
if (k==38) zoom(2); // arrow up
//if (k==39) forward(); // arrow right
if (k==40) zoom(1); // arrow down
if (k==90) window.parent.frames['contents'].focus(); // z to move focus back to upper frame
if (k==188) step(-1); //, lower case <
if (k==190) step(1); //. lower case >
if (k==191) step(0); // lower case ?
if (k==219) step(-2); // [
if (k==221) step(2); // ]
return false;
}
function insertmovie($filename,$aspect,$options,$imageframe)
{
scroll(0,0); //scroll back to top of page
// www.geekpedia.com/code100_Get-window-width-and-height.html
var $x=0;
var $y=0;
if (self.innerHeight) // all except Explorer
{
$x=self.innerWidth;
$y=self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight) //Explorer 6 strict mode
{
$x=document.documentElement.clientWidth;
$y=document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
$x=document.body.clientWidth;
$y=document.body.clientHeight;
}
// Set font relative to window size
var P = Math.sqrt ($x*$x+$y*$y);
P = Math.floor (8+P/125);
document.body.style.fontSize = P + 'px';
// alert(" "+P);
$width= 0.98*$x;
if (!$imageframe) {$imageframe="imageframe";}
$otherlines=$options.split(" ")[0]+''; //get up to first blank, usually "4.2 controller autoplay"
if ($options.indexOf(",") != -1) //if contains comma then use "lines of text, fraction of vertical height, fraction of horizontal width". Fraction can be larger than 1.
{
$y2 = $otherlines.split(",")[1]*($y - $otherlines.split(",")[0] * P - P);
if($otherlines.split(",")[2]) {$width = $otherlines.split(",")[2]*$width;}
}
else if ($otherlines < 1) //use fraction of vertical height
{
$y2 = $otherlines * $y;
}
else //use lines of text
{
$y2 = $y - $otherlines * P - P;
}
if ($width*$aspect > $y2) {$width=$y2/$aspect;}
$myFramerate=1;
if ($options.indexOf("framerate=") != -1)
{
$myFramerate=$options.split("framerate=")[1]; //portion that follows framerate=
$myFramerate=1/$myFramerate.split(" ")[0]; //up to next blank //25 fps becomes 0.04
}
var $code = '';
if ($options.indexOf("nocaption") == -1)
{
$code=$code+'