promos = new Array();

/* promo sctructure:
    new Array(id,imageURL,imageAlt,title,text,targetURL,openWin)
*/
i = 0;
promos[i++] = new Array("40%", "library/chart.gif", "Massive Commissions", "Earn up to a massive <span class='hilite'>40%</span> Commission for referrals!", "", "https://sports.centrebet.com/models.html", 0);
promos[i++] = new Array("subaff","library/Cheque.jpg","Refer And Earn!","Earn Up to <span class='hilite'>2%</span> for Sub affiliate commissions!","","https://sports.centrebet.com/models.html",0);
promos[i++] = new Array("promote","library/chip-n-dice.jpg","Casino and Poker","Promote Top Tier Reputable Casino and Poker Clients!","","https://sports.centrebet.com/products.html",0);
promos[i++] = new Array("asxlisted","library/ListedCompanyEmblem-70.jpg","Publicly listed Company on the ASX","Publicly listed company on the Australian Stock Exchange (ASX).","","http://www.asx.com.au/asx/research/CompanyInfoSearchResults.jsp?searchBy=asxCode&allinfo=on&asxCode=CIL&companyName=&principalActivity=&industryGroup=NO",1);
//promos[i++] = new Array("nospam","library/no-spam.gif","Zero Spam Tolerance","Zero tolerance for spam of any kind. Affiliates using spam will be banned.","","",0);

function showPromos(promoId) {
  html = "";
  if (promoId) {
    for (i=0; i<promos.length; i++) {
      if (promoId == promos[i][0]) {
        addPromo(i);
      }
    }
  }

  if (!promoId || html == "") {
    for (i=0; i<promos.length; i++) {
        addPromo(i);
    }
  }
  document.writeln("<div style='position:relative'>" + html + "</div"); // wrap it again for IE
}

function addPromo(i) {
  html += '<div class="rightBox" id="' + promos[i][0] + '"><table cellpadding="4" cellspacing="0" border="0"><tr><td>';
  html += '<img src="images/picborder_simple.gif" style="background-image:url(images/' + promos[i][1] + ')" title="' + promos[i][2] + '" height="70" width="70">';
  html += '</td><td><strong>' + promos[i][3] + '</strong><br>' + promos[i][4] + '</td></tr></table>';
  html += '<div style="position:absolute;top:0;left:0;width:206px;height:100%;"><a href="' + promos[i][5] + '" onmouseover="document.getElementById(\'' + promos[i][0] + '\').className=\'rightBoxHover\'" onmouseout="document.getElementById(\'' + promos[i][0] + '\').className=\'rightBox\'"' + (promos[i][6]>0?' target="_blank"':'') + '><img src="images/nil.gif" width="206" height="77"></a></div></div>';
}
