<!--
  var bans=["st", "sp", "se", "sn", "sw"]
  var banweight=[1, 1, 1, 1, 1] //weight of each element above
  var totalweight=eval(banweight.join("+")) //get total weight (in this case, 10)
  var weighedbans=new Array() //new array to hold "weighted" bans
  var currban=0

  while (currban<bans.length){ //step through each fruit[] element
    for (i=0; i<banweight[currban]; i++)
      weighedbans[weighedbans.length]=bans[currban]
    currban++
  }
 
 var randomnumber=Math.floor(Math.random()*totalweight)
 //document.write('weighedbans[randomnumber] = ' + weighedbans[randomnumber])
 
switch (weighedbans[randomnumber]){
  case "st":
    document.write ('<a href="solidworks-hw-spaceTraveler.htm"><img src="images/ban3dconnexion-SpaceTraveler.gif" width="468" height="60" alt="3DConnexion - SpaceTraveler: 3D Motion Device" border="0"></a>');
    break
  case "sp":
    document.write ('<a href="solidworks-hw-spacePilot.htm"><img src="images/ban3dconnexion-SpacePilot.gif" width="468" height="60" alt="3DConnexion - SpacePilot: 3D Motion Device" border="0"></a>');
    break
  case "se":
    document.write ('<a href="solidworks-hw-spaceExplorer.htm"><img src="images/ban3dconnexion-SpaceExplorer.gif" width="468" height="60" alt="3DConnexion - SpaceExplorer: 3D Motion Device" border="0"></a>');
    break
  case "sn":
    document.write ('<a href="solidworks-hw-spaceNavigator.htm"><img src="images/ban3dconnexion-SpaceNavigator.gif" width="468" height="60" alt="3DConnexion - SpaceNavigator: 3D Motion Device" border="0"></a>');
    break
  case "sw":
    document.write('<a href="http://www.solidworks.co.uk/cosmos_nt" target="_blank"><img  src="images/COSMOSWorks-Professional-Challenge.gif" width="468"  height="60" alt="COSMOSWorks Professional Challenge" border="0"></a>');
    break
  default:
    //not using default
    break
}
//-->
