Code:
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img src="'+myimages[ry]+'" border=0>')
is not random. Math.floor will generate 0,1,2,3 (never 4), and if ry == 0 then ry becomes 1, so you will get only 1,2 and 3 with twice as many 1's as 2's or 3's.
Use instead:-
Code:
var ry = Math.ceil(Math.random()*myimages.length);
document.write('<img src= ' + myimages[ry] + 'border=0>');
}
I don't understand what you mean by "merge" scripts. I see only one script.
But you "merge" two scripts simply by putting them both within the sme <script> tags.
<script type = "text/javascript">
function one() {
// content of function one
}
function two() {
//content of function two
}
</script>
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx