I am trying to get this script to open the random page in a new window/tab. Not having much luck. Suggestions gratefully received.


<!--
/*
Random link button- By JavaScript Kit (http://javascriptkit.com)
Over 300+ free scripts!
This credit MUST stay intact for use
*/

//specify random links below. You can have as many as you want
var randomlinks=new Array()

randomlinks[0]="http://www.buildingapc.co.uk/index.php"
randomlinks[1]="http://www.buildingapc.co.uk/hardware.php"
randomlinks[2]="http://www.buildingapc.co.uk/harddisk.php"
randomlinks[3]="http://www.buildingapc.co.uk/memoryfit.php"
randomlinks[4]="http://www.buildingapc.co.uk/processor.php"

function randomlink(){
window.location=randomlinks[Math.floor(Math.random()*randomlinks.length)]
}
//-->
</script>
<form>
<p><center><input type="button" name="B1" value="Random Link >" onclick="randomlink()"></center></p> </form>

<!--Uncomment below to use a regular text link instead
<a href="javascript:randomlink()">Random Link</a>
-->