﻿// Generate a Random Number
var randomnumber = Math.round(Math.random()*3);

// Select a movie and execute the corresponding function
if (randomnumber == 1)

{movie1();}

else if (randomnumber == 2)

{movie2();}

else {movie3();}

//Functions to write out the correct flash movie resource.

function movie1(){
document.write('<embed src="/parts/swf/1.swf" quality="high" wmode="transparent" name="1.swf" allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="150"/>')
}

function movie2(){
document.write('<embed src="/parts/swf/2.swf" quality="high" wmode="transparent" name="2.swf" allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="150"/>')
}

function movie3(){
document.write('<embed src="/parts/swf/3.swf" quality="high" wmode="transparent" name="3.swf" allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="150"/>')
}