RD_DATA = [
  {
    id:   'b003',
    ext:  'MB',
    text: 'CX Concept Excavator - More information...'
  },
  {
    id :  'b004',
    ext:  "MB",
    text: "Audi Snook - Mono Spherewheel Vehicle - More information... "
  },
  {
    id :  'b005',
    ext:  "BR",
    text: "Another Bathroom - More information... "
  },
  {
    id :  'b010',
    ext:  "WP",
    text: "USB-Clip - More information... "
  },
  {
    id :  'b013',
    ext:  "IC",
    text: "ondo - music editing phone - More information... "
  },
  {
    id :  'b014',
    ext:  "EN",
    text: "Flexio - More information... "
  },
  {
    id :  'b016',
    ext:  "LS",
    text: "SIRIUS Breast Cancer Scanner - More information... "
  },
  {
    id :  'r003',
    ext:  "PS",
    text: "Eko - More information... "
  },
  {
    id :  'r018',
    ext:  "MB",
    text: "ENERGYA - More information... "
  },
  {
    id :  'r025',
    ext:  "MB",
    text: "Giraf - More information... "
  },
  {
    id :  'r026',
    ext:  "MB",
    text: "Skywalker - More information... "
  },
  {
    id :  'r032',
    ext:  "EG",
    text: "Hybrid2 - More information... "
  },
  {
    id :  'r033',
    ext:  "EG",
    text: "HUMAN ENERGY RECYCLE SYSTEM - More information... "
  },
  {
    id :  'r059',
    ext:  "DA",
    text: "Dose & Serve  - More information... "
  },
  {
    id :  'r060',
    ext:  "DA",
    text: "Letout Outlet - More information... "
  },
  {
    id :  'r065',
    ext:  "IA",
    text: "Trash Know - More information... "
  },
  {
    id :  'r073',
    ext:  "IA",
    text: "Trash Know - More information... "
  },
  {
    id :  'r080',
    ext:  "IA",
    text: "Cipher  - More information... "
  },
  {
    id :  'r083',
    ext:  "IL",
    text: "Bamboo Torch - More information... "
  },
  {
    id :  'r086',
    ext:  "IL",
    text: "luminous instant paster - More information... "
  },
  {
    id :  'r090',
    ext:  "IL",
    text: "Shadow of time - More information... "
  },
  {
    id :  'r091',
    ext:  "HF",
    text: "One box, one chair - More information... "
  },
  {
    id :  'r093',
    ext:  "HF",
    text: "Form_Z01 - More information... "
  },
  {
    id :  'r095',
    ext:  "HF",
    text: "Extensions - More information... "
  },
  {
    id :  'r097',
    ext:  "HF",
    text: "Bambool - More information... "
  },
  {
    id :  'r098',
    ext:  "HF",
    text: "Breathing - More information... "
  },
  {
    id :  'r100',
    ext:  "HF",
    text: "Elephant Seating - More information... "
  },
  {
    id :  'r103',
    ext:  "PD",
    text: "ball cactus - More information... "
  },
  {
    id :  'r113',
    ext:  "PD",
    text: "Tooth Brush - More information... "
  },
  {
    id :  'r114',
    ext:  "PD",
    text: "Double Side Umbrella Strap - More information... "
  },
  {
    id :  'r121',
    ext:  "PD",
    text: "Rambler Socket - More information... "
  },
  {
    id:   "r122",
    ext:  "PD",
    text: "Compressed Water Bucket - More information... "
  },
  {
    id:   "r136",
    ext:  "WP",
    text: "Third vision system - More information... "
  },
  {
    id:   "r156",
    ext:  "LS",
    text: "peepoGPS - More information... "
  },
  {
    id:   "r163",
    ext:  "LS",
    text: "Blood Pressure Monitor for the Blind - More information... "
  },
  {
    id:   "r167",
    ext:  "IC",
    text: "Dial (Phone) - More information... "
  },
  {
    id:   "r170",
    ext:  "IC",
    text: "Looking Glass Concept - More information... "
  },
  {
    id:   "r172",
    ext:  "IC",
    text: "Visual Sound - More information... "
  },
  {
    id:   "r177",
    ext:  "IC",
    text: "SENSE - More information... "
  },
  {
    id:   "r178",
    ext:  "EN",
    text: "MEGASOUND - More information... "
  },
  {
    id:   "r181",
    ext:  "EN",
    text: "Melted Clock - More information... "
  },
  {
    id:   "r202",
    ext:  "RC",
    text: "Sea Scooter - More information... "
  },
  {
    id:   "r208",
    ext:  "RC",
    text: "Colored - More information... "
  }
  ]

// roll 3 random numbers
var INDEX = []

while(INDEX.length < 3){
  var num = Math.floor(Math.random()*RD_DATA.length)
  if(num == INDEX[0] || num == INDEX[1] || num == INDEX[2]){
    continue
  }else {
    INDEX.push(num)
  }
}
var css = "<style>\
.winner a img {border:0px;}\
.winner .winner-desc {padding:5px;background-color:#cccccc;}\
.winner .winner-desc a {color:#6A6A6A;text-decoration:none;}\
.winner .winner-desc a:hover {color:red}\
</style>"
document.write(css)

for(var i=0;i<INDEX.length;i++){
  var data = RD_DATA[INDEX[i]]
  var linkURL = 'http://red-dot.sg/concept/porfolio/o_e/'+ data.ext + '/'+data.id.toUpperCase()+'.htm'
  var imageURL = 'http://red-dot.sg/concept/in_wbnr/wbnr/'+data.id+'.jpg'
  var html = "<div class='winner'>"+
  "<a href='"+linkURL+"'><img src='"+imageURL+"' /></a>"+
  "<div class='winner-desc'><a href='"+linkURL+"'>"+data.text+"</a></div></div>"
  
  document.write(html)
  
}
