roll-over image for result 
script Random material ID
what it does
This script randomizes the material ID's in an editable poly by sub-object element. Just select an editable poly (editable meshes will be converted to editable poly), run the script, assign a Multi/sub material to the object.
action
download script