<!-- Begin

var randR = 0;
var rand1 = 0;
var rand2 = 0;
var rand3 = 0;

var useRandR = 0;
var useRand1 = 0;
var useRand2 = 0;
var useRand3 = 0;

imageR = new Array;
imageR[1] = new Image();
imageR[1].src = "1.jpg";
imageR[2] = new Image();
imageR[2].src = "2.jpg";
imageR[3] = new Image();
imageR[3].src = "3.jpg";
imageR[4] = new Image();
imageR[4].src = "4.jpg";

image1 = new Array;
image1[1] = new Image();
image1[1].src = "11.gif";
image1[2] = new Image();
image1[2].src = "12.gif";
image1[3] = new Image();
image1[3].src = "13.gif";
image1[4] = new Image();
image1[4].src = "14.gif";

image2 = new Array;
image2[1] = new Image();
image2[1].src = "21.gif";
image2[2] = new Image();
image2[2].src = "22.gif";
image2[3] = new Image();
image2[3].src = "23.gif";
image2[4] = new Image();
image2[4].src = "24.gif";

image3 = new Array;
image3[1] = new Image();
image3[1].src = "31.gif";
image3[2] = new Image();
image3[2].src = "32.gif";
image3[3] = new Image();
image3[3].src = "33.gif";
image3[4] = new Image();
image3[4].src = "34.gif";

function swappic() {
var imgnum = imageR.length - 1;
do {
var randnum = Math.random();
randR = Math.round((imgnum - 1) * randnum) + 1;
} while (randR == useRandR);
useRandR = randR;
document.randimg.src = imageR[useRandR].src;
}

function swappics() {
var imgnum = image1.length - 1;
do {
var randnum = Math.random();
rand1 = Math.round((imgnum - 1) * randnum) + 1;
} while (rand1 == useRand1);
useRand1 = rand1;
document.top1.src = image1[useRand1].src;

var imgnum = image2.length - 1;
do {
var randnum = Math.random();
rand2 = Math.round((imgnum - 1) * randnum) + 1;
} while (rand2 == useRand2);
useRand2 = rand2;
document.top2.src = image2[useRand2].src;

var imgnum = image3.length - 1;
do {
var randnum = Math.random();
rand3 = Math.round((imgnum - 1) * randnum) + 1;
} while (rand3 == useRand3);
useRand3 = rand3;
document.top3.src = image3[useRand3].src;
}
//  End -->