// JavaScript Document

// Example:

// simplePreload( '01.gif', '02.gif' ); 

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];

  }

}


function switchImage(imgName, imgSrc) 

{

  if (document.images)

  {

    if (imgSrc != "none")

    {

      document.images[imgName].src = imgSrc;

    }

  }

}

function changeText(node, newtext) {
	document.getElementById(node).firstChild.nodeValue = newtext;
}

function switchAltText(imgName, newText) {
	document.images[imgName].alt = newText;	
}

function swapImageAndCaption(imgName, x, txtName, newText) {
	switchImage(imgName, document.imageArray[x].src);
	switchAltText(imgName, newText);
	changeText(txtName,newText);
}
function changeCursor(type){
	document.body.style.cursor= type;		
}
