Possible Duplicate:
JavaScript: Getting random value from an array
I have an external js with the following line:
var postmessage = "hi my favorite site is http://google.com";
but is there a way to pick a site a random from an array so like this
var postmessage = "hi my favorite site is +'random'";
random= http://google.com, http://yahoo.com, http://msn.com, http://apple.com
how do i make it work?