  var howMany = 4
  var quote = new Array(howMany+1)
  quote[0]="<a href=http://loveplanet.ru/a-main/affiliate_id-1817/ target=_blank><img src=../../images/lp/1.gif width=468 height=60 border=0 alt='Хорошие Знакомства'></a>"
  quote[1]="<a href=http://loveplanet.ru/a-main/affiliate_id-1817/ target=_blank><img src=../../images/lp/2.gif width=468 height=60 border=0 alt='Хорошие Знакомства'></a>"
  quote[2]="<a href=http://loveplanet.ru/a-main/affiliate_id-1817/ target=_blank><img src=../../images/lp/3.gif width=468 height=60 border=0 alt='Хорошие Знакомства'></a>"
  quote[3]="<a href=http://loveplanet.ru/a-main/affiliate_id-1817/ target=_blank><img src=../../images/lp/4.gif width=468 height=60 border=0 alt='Хорошие Знакомства'></a>"
  quote[4]="<a href=http://loveplanet.ru/a-main/affiliate_id-1817/ target=_blank><img src=../../images/lp/5.gif width=468 height=60 border=0 alt='Хорошие Знакомства'></a>"

function rndnumber(){
        var randscript = -1
        while (randscript < 0 || randscript > howMany || isNaN(randscript)){
                randscript = parseInt(Math.random()*(howMany+1))
        }
        return randscript
}
     quo = rndnumber()
     quox = quote[quo]
document.write(quox)

