function getRandomPic1(){
	var myimages=new Array()
	myimages[0]="includes/swap/HNS&P-066.jpg";
	myimages[1]="includes/swap/HNS&P-068.jpg";
	myimages[2]="includes/swap/HNS&P-070.jpg";
	myimages[3]="includes/swap/ICCH-001.jpg";
	myimages[4]="includes/swap/ICGS-053.jpg";
	
	var ry=Math.floor(Math.random()*myimages.length);
	
	return myimages[ry]
}

function getRandomPic2(){
	var myimages=new Array()
	myimages[0]="includes/swap/ICHO-005.jpg";
	myimages[1]="includes/swap/ICHO-008.jpg";
	myimages[2]="includes/swap/ICS&P-025.jpg";
	myimages[3]="includes/swap/ICSC-002.jpg";
	myimages[4]="includes/swap/ICSO-003.jpg";
	
	var ry=Math.floor(Math.random()*myimages.length);
	return myimages[ry]
}

function getRandomPic3(){
	var myimages=new Array()
	myimages[0]="includes/swap/ICSWAK-001.jpg";
	myimages[1]="includes/swap/ICSWAK-004.jpg";
	myimages[2]="includes/swap/ICSWAK-022.jpg";
	myimages[3]="includes/swap/ICSWAK-025.jpg";
	myimages[4]="includes/swap/ICS&P-068.jpg";
	
	var ry=Math.floor(Math.random()*myimages.length);
	return myimages[ry]
}


function getObject(name)
{
       if(typeof name == "string") {
         if (document.getElementById)
         {
               return document.getElementById(name);
         }
         else if (document.all)
         {
               return document.all[name];
         }
         else if (document.layers)
         {
               return document.layers[name];
         }
       }
       else {
               return name;
       }
       return null;
}



function setRandPic() {

	// alert("Setting Random Pictures")

        var randPic = getRandomPic1(); //which calles your randomising code and returns an image name
        var picName = getObject("pic1"); // find the pic1 object on the page
        if (picName != null)  {  //check that image object is not null
                picName.src = randPic; // changes the source of pic1 to the random image
        }
        var randPic = getRandomPic2(); //which calles your randomising code and returns an image name
        var picName = getObject("pic2"); // find the pic1 object on the page
        if (picName != null)  {  //check that image object is not null
                picName.src = randPic; // changes the source of pic1 to the random image
        }
        var randPic = getRandomPic3(); //which calles your randomising code and returns an image name
        var picName = getObject("pic3"); // find the pic1 object on the page
        if (picName != null)  {  //check that image object is not null
                picName.src = randPic; // changes the source of pic1 to the random image
        }
}
