// flash.js

// Some picture manipulation routines
// (c) 2005 Simeon Veldstra

// loadpic(name, url)
//   This function preloads an image from the given 'url' argument
//   and saves it in a global object under the attribute 'name' so that
//   it can be loaded into an IMG tag later.
//   If you use the same name again, the preloaded image will be 
//   overwriten. 

// showpic(picname, imgname) 
//   This function puts an image that has been preloaded with 'loadpic()'
//   into the IMG on the page that has the name attribute set to 'imgname'


picset = new Object(); 

function loadpic(picname, url) {
	if (document.images) {
		picset[picname] = new Image();
		picset[picname].src = url;
	}
}

function showpic(picname, imgname) {
	if (document.images && picset[picname]) {
		document.images[imgname].src = picset[picname].src;
	}
}

