Patrick:

Sorry for that. Please see the correct lines 74-75 for the main loop below. I have also uploaded a corrected ZIP package under http://people.bu.edu/jenmeyer/kixtart/kixgolf_cd.zip

code:
    $iCDNum=rnd($iNumCDs-1)
$asIndices[$iCDNum]=CDSorter($asCDSongLenghts[$iCDNum],$iMediaLength)

_________________________
There are two types of vessels, submarines and targets.