var x = 4; //set this to the number of images you have to be randomized
function randInt (Num) {
 	var now = new Date();
 	var rand = Math.round(Num * Math.cos(now.getTime()));
 	if (rand < 0) rand = - rand; 
 	if (rand == 0) rand++;
  return rand;
}
var rInt = randInt(x);