Randam redirecter

liunx

Guest
Hi people<br />
<br />
can anybody tell me of a script which will redirect you randomly to any number of pages,from the index page without the user knowing, i know of scripts which redirect depending on browser or screen size. But i just want to redirect everybody to a choice of maybe 3 or 4 servers in order that i do not use up my allocation per month from tripod. <br />
Thanks in advance<br />
<br />
John<!--content--><script language="javascript"><br />
function randomRange(inMin,inMax) {<br />
var min = 0, max = 0;<br />
if (inMin) min = inMin;<br />
if (inMax) max = inMax;<br />
if (min > max) {<br />
var swop = min<br />
min = max<br />
max = swop<br />
}<br />
return min + Math.floor(Math.random() * (max - min + 1))<br />
}<br />
<br />
function reDirect() {<br />
var choices = new Array();<br />
choices[0] = "www.somesite.com/somePage.html"<br />
choices[1] = "www.someOthersite.com/newPage.html"<br />
choices[2] = "www.someNewsite.com/samplePage.html"<br />
choices[3] = "www.anotherSite.com/someOtherpage.html"<br />
var randomSlot = randomRange(choices.length - 1)<br />
window.location.replace(choices[randomSlot])<br />
}<br />
<br />
reDirect();<br />
</script><!--content-->Cheers thanks a lot<!--content-->
 
Back
Top