	
var showcaseIndex=(Math.floor(Math.random()*maxShowItems));  // where should we start (0 to (max-1))
if (showcaseIndex > (maxShowItems-1)) showcaseIndex=0;

var showMore='<a href="javascript:drawShowcase();" class="link" rel="nofollow">See Next >>&nbsp;</a>';

function drawShowcase () {
  showcaseHTML='<table cellpadding="0" cellspacing="0" border="0" width="501">';
  showcaseHTML+='<tr><td colspan="3" align="right" width="501">'+showMore+'&nbsp;&nbsp;</td></tr>';
  
  var showcaseIMG='';
  if (showcaseLink[showcaseIndex] != "") showcaseIMG+='<a target="_blank" href="'+showcaseLink[showcaseIndex]+'">';
  showcaseIMG+='<IMG src="'+showcaseImage[showcaseIndex]+'" border=0>';
  if (showcaseLink[showcaseIndex] != "") showcaseIMG+='</a>'; 
  
  //position image either at top or left of text
  if (showcaseImgPosition[showcaseIndex]=='left') { 
	showcaseHTML+='<tr><td colspan="3" align="center"><font class=plaintext color="#006c52"><b>'+showcaseTitle[showcaseIndex]+'</b></font></center><br></td></tr>';
    showcaseHTML+='<tr><td align="left">'+showcaseIMG+'<br><br></td><td width="10"></td><td>'; //img + spacer column +text
  }
  else {
    showcaseHTML+='<tr><td align="center">'+showcaseIMG+'</td></tr><tr><td align=center></td></tr><tr><td align="center" valign="top"><br>'; 
  	showcaseHTML+='<font class=plaintext color="#006c52"><b>'+showcaseTitle[showcaseIndex]+'</b></font>';  
  	showcaseHTML+='</td></tr><tr><td align=left><br>';   
  }    
  
  showcaseHTML+='<font class=plaintext>'+showcaseText[showcaseIndex]+'</font>';
  showcaseHTML+='<br><br></td></tr></table>';
  
  showcaseIndex++;  // setup for next shocase to be displayed
  if (showcaseImage[showcaseIndex]==undefined) showcaseIndex=0;  // start over

  document.getElementById("showcaseDIVtag").innerHTML=showcaseHTML;  
}
  

