function domouse(where,which,what)
{
var path = "images/";
var ext = ".jpg";
var exts = "_m.jpg";
var fname = "";
if(where == 1)
	{ 
	fname = path + what + exts;
	}
else
	{
	fname = path + what + ext;
	}
document.images[which].src = fname;
}

function domouse2(where,which,what)     //back 1 directory
{
var path = "images/";
var ext = ".jpg";
var exts = "_m.jpg";
var fname = "";
if(where == 1)
	{ 
	fname = path + what + exts;
	}
else
	{
	fname = path + what + ext;
	}
document.images[which].src = fname;
}


function popupwindow(theurl, thewidth, theheight, scroll)
	{
		var winl = (screen.width - thewidth) / 2;
		var wint = (screen.height - theheight) / 2;
		winprops = 'height='+theheight+',width='+thewidth+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
		win = window.open(theurl, "popup", winprops)
		if (parseInt(navigator.appVersion) >= 4) 
			{ 
			win.window.focus(); 
			};
	}


function preload_image(thename)
	{
	var path = "images/";
	image1 = new Image();
	image1.src = path + thename;
	}
	
	
//example usage:
//<body onload = "preload_image('amica2_m.jpg')">




function swappicto(what)     //back 1 directory
	{
	if (what == "") {
		var what = "nothing.gif";
	}
	var which = "stockphoto";
	var path = "../stockpictures/";
	var fname = "";
	fname = path + what;
	document.images[which].src = fname;
	}
