here this makes a random number and using a switch statement it chooses one of the videos
PHP Code:
<script language="javascript" type="text/javascript">
function get_random(n)
{
var ranNum = (Math.floor(Math.random()* n + 1 ) );
var docId
switch(ranNum)
{
case 1:
docId = 4203295387902104151;
break;
case 2:
docId = 8909400237855893347;
break;
case 3:
docId = 1446340990435255030;
break;
}
document.getElementById("VideoPlayback").src = "http://video.google.com/googleplayer.swf?docId=-" + docId + "&hl=en";
}
</script>
Code:
<!-- change this number depending on the amount of cases you have in the switch statement (reflects the amount of movies you want to display-->
<body onLoad="get_random(3)">
<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src=""></embed>
</body>