views nivo slider how to do that would slide shows in order, randomly, and the first slide was also randomly

Can anyone come in handy, did a little bit perverted, but it works, sort, and finally finished the pattern

if(drupal_is_front_page()){
$sql = "SELECT nid FROM node WHERE TYPE =  'image_slider'";
$result = db_query($sql); 
while ($n = db_fetch_object($result)) {
db_query("UPDATE  `node` SET  `title` =  '".rand(1,100500)."' WHERE `nid` ='".$n->nid."';");
}}

the essence of all that the name node, which is sorted, renamed when visiting the home page. Accordingly, when sorting each time a new order will