var globalImages = new Array(
	''
);

var localImages; 

var imageObjects = new Array();

/**
 * Changes the source URI for a given Image-object. Supports multiple
 * simultaneous images on one call.
 *
 * @param image		a reference to an image object
 * @param URI		URI of the new image resource
 */

function toggleImage() {
	if (document.images) {
		var i = 0;
		var arg = toggleImage.arguments;
		while (i < arg.length) {
			var img = arg[i];
			var src = arg[i+1];
			if (!(img.src)) {
				if (document.getElementById) {
					img = document.getElementById(img);
				}
			}
			if (img && img != null && src != null) img.src = src;
						
			i += 2;
		}
	}
}


function preloadImages() {
	var allImages = (localImages == undefined) ? globalImages : globalImages.concat(localImages);

	for(var index in allImages) {
		imageObjects[index] = new Image();
		imageObjects[index].src = allImages[index];		
	}
	
	//alert("loaded " + allImages.join(",") + " into " + imageObjects.join(","));
}

function openWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


