function ARR_Empty( v )
{
    if( v.constructor != Array )
        return true;
    return ( v.length <= 0 );
}
function ARR_Rand( theList )
// Picks a random element from the array <theList> and returns it.
{
    if( ARR_Empty(theList) )
        return 0;
    return theList[Math.round(Math.Rand()*theList.length)];
}
