// Hang all our objects off this
var JA = new Object();

/// Preload passed images
function loadImages() {
	var url;
	for(var i=0; i<arguments.length; i++) {
		url = arguments[i];
		JA[url] = new Image();
		JA[url].src = url;
	}
}


// Swap current image for one with given suffix (often used to rollover images)
// Inputs -- el must have ID corresponding to file name with no suffix
function imgSwap(el, suffix){
	var name_comps = el.src.split('.');
	var type = name_comps[ name_comps.length - 1 ];
	el.src = "images/" + el.id + (suffix ? suffix : "") + "." + type;
}


function init() {
	loadImages("images/download_on.gif", "images/buynow_on.jpg",
			   "images/backgrnd_PC.jpg", "images/backgrnd.jpg");
}
