<!--
/*********************************************************************************
** Warning!! all coding copyright of C.Odukwe - webmaster for CNO Designs Ltd.  **
** To copy, modify or use any code e-mail "chiedu@cnodesigns.co.uk"             **
** Random Link Generator V3.002a                                                **
*********************************************************************************/

// Generates two random linked images on every reload
// image selection - must be jpg or gif
// Format picname---alt tag---URL to go to

var AdFacts, PicCount, NewAd, adURL, parts, randonNum, Gone

AdFacts = new Array(
"anim134.gif---King",
"anim256.gif---King",
"anim789.gif---King",
"animlast.gif---Ces",
"1.jpg---Alare",
"2.jpg---Alare",
"3.jpg---Alare",
"4.jpg---Alare",
"5.jpg---Alare",
"6.jpg---Alare",
"7.jpg---Alare",
"8.jpg---Alare",
"9.jpg---Alare",
"10.jpg---Alare",
"11.jpg---Alare",
"12.jpg---Alare",
"13.jpg---Alare"
);

PicCount = AdFacts.length;
Gone = new Array(PicCount);

for (x=1; x<=3; x++){
randomNum = Math.floor((Math.random() * PicCount)); // generate random number
NewAd = AdFacts[randomNum]; // choose link from array
parts = NewAd.split("---"); // split chosen link into parts using --- as a guide

adURL = ("<img src='http://www.aeorg.com/cfsdev/sidepics/" + parts[0] + "' width=100 height=100><br><br>");

	if (Gone[randomNum] != 1) {
		document.write(adURL);
		Gone[randomNum] = 1;
				 }
	else {
		x = x-1; // resetting x back to previous value to try again
		}
}
// -->
