function changeImg(new_src,target_id){
	/*
		This function is called using the line at the bottom of this comment, make sure the target_id field matches the id of
		the large image.
		
		The new src needs to be a src relative to the currently viewed page, I would recommend something like /images/whatever
		so that it reads from the root of the site
		
		This function will preload the next large image, and upon completion of that load will make the large image the new one
		
		new_src is the path to the fullsized image
		target_id is the image element where the fullsize image goes
		
		atached image line (you can replace onmousedown with the event handler of your choice):
			onmousedown="changeImg('/path/to/image.type','id_of_target_element');" 
	*/
	
	// init
	new_image = new Image();
	
	// define loaded function
	new_image.onload = function (){
		
		// swap
		document.getElementById(target_id).src = new_image.src;
		
	}
	
	// trigger preload
	new_image.src = new_src;
}