<!--
var rootpath = "http://freespace.virgin.net/james.whitehead/"

function preview(pic,swf) {
   this.pic = new Array();
   this.swf = new Array();
}

var previewlist = new preview();

previewlist.pic[0] = rootpath+"screensavers/warp/preview.jpg";
previewlist.swf[0] = rootpath+"screensavers/warp/preview.swf";
previewlist.pic[1] = rootpath+"screensavers/walkies/preview.jpg";
previewlist.swf[1] = rootpath+"screensavers/walkies/preview.swf";
previewlist.pic[2] = rootpath+"screensavers/bond/preview.gif";
previewlist.swf[2] = rootpath+"screensavers/bond/preview.swf";
previewlist.pic[3] = rootpath+"screensavers/chupenebre/preview.jpg";
previewlist.swf[3] = rootpath+"screensavers/chupenebre/preview.swf";
previewlist.pic[4] = rootpath+"screensavers/bond/preview.gif";
previewlist.swf[4] = rootpath+"screensavers/bond/preview2.swf";
previewlist.pic[5] = rootpath+"screensavers/sw/preview.jpg";
previewlist.swf[5] = rootpath+"screensavers/sw/preview.swf";
previewlist.pic[6] = rootpath+"screensavers/sw/preview.jpg";
previewlist.swf[6] = rootpath+"screensavers/globe/globe.swf";
previewlist.pic[7] = rootpath+"screensavers/computerstore/preview.jpg";
previewlist.swf[7] = rootpath+"screensavers/computerstore/preview.swf";


function BrowserVersion() {
   var a=navigator.appName;
   var u=navigator.userAgent;
   var v=parseFloat(navigator.appVersion);
   if (u.indexOf("MSIE") != -1) {
      v=parseFloat(u.substring((u.indexOf("MSIE")+ 5),u.length));
      return(v);
    } else if (a.indexOf("Netscape") != -1) {    
      return(v);
    } else if (a.indexOf("Opera") != -1) {
      return(v);
    } else {
      return(0);
    }
}

function BrowserType() {
   var a=navigator.appName;
   var u=navigator.userAgent;
   if (u.indexOf("MSIE") != -1) {
      return("msie")
    } else if (a.indexOf("Netscape") != -1) {    
      return("netscape")
    } else if (a.indexOf("Opera") != -1) {
      return("opera")
    } else {
      return("unknown")
    }
}

function playflashfile(shockwaveflashfile,noflashpicture) {
   var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
   if (noflashpicture == "undefined") {
   noflashpicture = rootpath+"screensavers/bond/leelabond-preview.gif";
   }
   if (BrowserType() == "msie" && BrowserVersion() >= 4) {
      document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="153" height="112" vspace="0" hspace="0" border="0">');
      document.write('<param name=movie value=' + shockwaveflashfile + '><param name=menu value=false><param name=quality value=high><param name=scale value=noborder><param name=wmode value=Opec><param name=bgcolor value=#000000></Object>');
   } else if (((BrowserType() == "netscape") && (BrowserVersion() >= 4)) || (BrowserType() == "unknown") || (BrowserType() == "opera")) {
      if (plugin && parseFloat(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 5) {
         document.write('<embed src="' + shockwaveflashfile + '" menu=false quality="high" scale="exactfit" wmode="opaque" bgcolor="#000000" swLiveConnect="false" width="153" height="112"');
         document.write(' type="application/x-shockwave-flash" plauginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
      } else {
         document.write('<a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"><img src="'+noflashpicture+'" border="0" height="112" width="153" alt="Flash Plug-in rquired to view this bit."></a>'); 
      }
   }
}

function randomflashfile() {
   var thefunnynumber = Math.floor(Math.random() * previewlist.pic.length);
   playflashfile(previewlist.swf[thefunnynumber],previewlist.pic[thefunnynumber]);
}

if ((filetoplay < 0) || (filetoplay > (previewlist.pic.length - 1))) {
   randomflashfile();
} else {
   playflashfile(previewlist.swf[filetoplay],previewlist.pic[filetoplay]);
}

//-->
