function random_ad( toFindCount,totalCount )
{
var foundCount = 0 ;
var detectElement ;
var randy = 0 ;

do 
{
  do   
    {
    randy = Math.random () ;
    randy = randy * 100 ;
    randy = Math.round (randy );  
    //alert ( "randy = " + randy );
    randy = randy % totalCount + 1 ;
    }
  while (randy==0 || randy > totalCount) ;

detectElement=document.all( "ad" + randy );

if  (detectElement != null )
  {
    if ( detectElement.style.display=="none" )
      {
      detectElement.style.display="" ;
      foundCount += 1 ; 
      //alert ( foundCount + ":" + randy ) ;
      }
  }
}
while ( foundCount < toFindCount ) ;
}
