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; if (self.innerHeight) // all except Explorer { x=self.innerWidth; } else if (document.documentElement && document.documentElement.clientHeight) //Explorer 6 strict mode { x=document.documentElement.clientWidth; } else if (document.body) // other Explorers { x=document.body.clientWidth; } $width= 0.98*(x-20) //subtract space for borderstripe.gif if ($imageframe) //if imageframe is specfied { $width=$width/2.02; //use only half the width } else { $imageframe="imageframe"; } var y = 0; if (self.innerHeight) { y = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { y = document.documentElement.clientHeight; } else if (document.body) { y = document.body.clientHeight; } if ($options.indexOf("scale=") != -1) { $scale=$options.split("scale=")[1]; //portion that follows scale= $scale=$scale.split(" ")[0]; //up to next blank $width=$scale*x; } if ($width*$aspect > y - 72) { $width=(y-72)/$aspect; } var $code = ''; // alert($code); document.getElementById($imageframe).innerHTML = $code; }