
<!-- Hide from old browsers
//Routine for shuffling trevdas
shuffle = function(a){
	for(var b, c, d = a.length; d; b = parseInt(Math.random() * d), c = a[--d], a[d] = a[b], a[b] = c);
        return a;
};
//End of shuffling Routine
// ......................................................................

//Display the trevdas
display = function(){
  firstbit='<a href="http://www.tandem-club.org.uk/redirect.php?page=http://' + url + '&name='+ name +'" '
  mouseoverbit='onMouseOver=\'window.status="http://' + url + '"; return true \' ';
  mouseoutbit='onMouseOut=\'window.status=""; return true\' target="_blank" alt="' + alt + '" title="' + alt + '">';
  logobit='<img src="http://www.tandem-club.org.uk/nf2007/opportunities/' + logo + '" width="100" height="110" align="absmiddle" border="1"></a>';

  document.write('<table bgcolor="white" cellspacing="0" cellpadding="0"><tr><td>');
  document.write(firstbit + mouseoverbit + mouseoutbit + logobit);
  document.write('</td></tr></table>');
  document.write('<img src="http://www.tandem-club.org.uk/nf2007/assets/space.gif"+ border=0 width="102" height="3">');
};
//End of display Routine
// ......................................................................

// To add more items, change the script below, as follows:-
// Following the line "items = new Array" add, change or delete the item file names listed. More or less items in the list are automatically accomodated.


items = new Array("",  // this line starts the array of items. DO NOT remove or change it!
// items below can be changed at will, including the number of entries
// the fields are: - graphic name, company name, URL/status bar name, alt text
// ......................................................................

  "discover-tandeming-button-new.gif","Discover Tandeming","www.discovertandeming.co.uk","Try tandeming in the beautiful surroundings of the Sussex Coast or the Yorkshire Dales",

  "jdtandemslogo.gif","J D Tandems","www.tandems.co.uk","Cannondale, Dawes, Hase, Multicycle, Orbit, Santana, Santos and Ventana tandems. Free test rides available.",

  "msglogo.gif","MSG Bikes","www.msgbikes.com","Specialising in ergonomic tandem fitting",

//  "texperiencelogo.gif","Tandem Experience","www.tandeming.co.uk","The original try before you buy company",

  "thetandemshoplogo.gif","The Tandem Shop","www.thetandemshop.com","Suppliers of Raleigh, Dawes, KHS, Landescape, Co&shy;Motion &amp; part exchange",

//  "cleanwheelslogo.gif","Pedego","www.pedegoeurope.com/tandem.html","European distributor of Pedego electric bikes  &amp; tandems",
// ......................................................................
// items above can be changed at will, including the number of entries
"") // this line completes the array.  DO NOT remove or change it!

//The following 'if' deals with situ when only one trevda is in the list
if([items.length-2]/4==1){
  logo=items[1];
  name=items[2];
  url=items[3];
  alt=items[4];
  display();
}
else{

// If more than one trevda in the list...
// entries in the line below must be kept in step with the number of trevdas above
  list = new Array(1,2,3,4);
//document.write("&nbsp;&nbsp;input array = ", list.join(","), "<br />output array = ", shuffle(list));
// ......................................................................

  shuffle(list);
  var ItemstrevdaCount = [items.length-2]/4; // ItemstrevdaCount holds number of trevdas in 1st array
  var ListtrevdaCount = [list.length]; // ListtrevdaCount holds number of items in 2nd array

  if(ItemstrevdaCount != ListtrevdaCount){
    alert("Counts disagree in trevdas tables \n ItemstrevdaCount = " + ItemstrevdaCount + " \n ListtrevdaCount = " + ListtrevdaCount);
  }
  var CountDown = ListtrevdaCount;
  while(CountDown > 0) {
    logo=items[[list[CountDown-1]*4]-3];
    name=items[[list[CountDown-1]*4]-2];
    url=items[[list[CountDown-1]*4]-1];
    alt=items[list[CountDown-1]*4];
    display();
    CountDown = CountDown-1;
  };//end of while loop

};//end of if/else


// -- End Hiding Here -->

