function simplePreload()
{ 
  var args = simplePreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}

//Main navigation rollovers
function switchImage(imgName, imgSrc) 
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images[imgName].src = imgSrc;
    }
  }
}

//Welcome image random swap
function swapImg(){
var pic1, alt1;
pic1 = new Array;
pic1[0] = "/system/modules/com.cida.site/resources/welcome_cats.jpg";
pic1[1] = "/system/modules/com.cida.site/resources/welcome_camera.jpg";
pic1[2] = "/system/modules/com.cida.site/resources/welcome_typewriter.jpg"; 

alt1 = new Array;
alt1[0] = "A group of dancers jumping upward with arched backs looking like cats with the word: Welcome. If you are, or know, the copyright owner of this image, please use the Contact Us link at the top of the page to get in contact";
alt1[1] = "A close-up of shiny retro camera with the word: Welcome";
alt1[2] = "A retro typewriter with a pile of paper beside it with the word: Welcome"; 

function rand ( n )
{
  return ( Math.floor ( Math.random ( ) * n + 1 ) );
}

var num1 = rand(3)-1;
var num2
var num2 = num1

document.images["SwapThisImage"].alt=alt1[num2];
document.images["SwapThisImage"].title=alt1[num2];
document.images["SwapThisImage"].src=pic1[num2];
}

//Sidebar random swap
function swapImg2(){
var pic2, alt2;
pic2 = new Array;
pic2[0] = "/system/modules/com.cida.site/resources/sidebar_teapots.jpg";
pic2[1] = "/system/modules/com.cida.site/resources/sidebar_tailors_dummy.jpg";
pic2[2] = "/system/modules/com.cida.site/resources/sidebar_headphones.jpg"; 

alt2 = new Array;
alt2[0] = "Three small teapots made in the shape of toasters with the words: If you make something, make something of it. Thanks to The Tea Pottery, Wensleydale, North Yorkshire for the image.";
alt2[1] = "An undressed tailor's dummy with the words: Whatever creative industry you're in... We can help. ";
alt2[2] = "A pair of headphones with the words: If you know you're good, take yourself to the next level."; 


function rand2 ( n )
{
  return ( Math.floor ( Math.random ( ) * n + 1 ) );
}

var num3 = rand2(3)-1;
var num4
var num4 = num3

document.images["SwapThisImage2"].alt=alt2[num4];
document.images["SwapThisImage2"].title=alt2[num4];
document.images["SwapThisImage2"].src=pic2[num4];
}