// PORTFOLIO IMAGE SWAP

// I grabbed this from a fun site called
// Mr. T and Me (http://www.mrtandme.com/),
// who in turn got it from 
// DHTML Kitchen (http://www.dhtmlkitchen.com/).
  
function loadimages() {

	for (var i = 0; i < arguments.length; i++) {
		var temp = makeId(arguments[i]);
		eval(temp +"= new Image()");
		eval(temp+".src ='"+ arguments[i] +"'");

	}
}


// Used above

function makeId(path) {
	return path.substring(path.lastIndexOf("/")+1, path.lastIndexOf("."));
}


// The image swap function used in the Portfolio section,
// where "newimg" is the image's name minus its file extension.

function swap(id, newimg) {
	var me = document.getElementById(id);	
	me.src = newimg.src;
}

