function OpenPopup(name, url, width, height, opts)
{
//open a window (if required) and change the url (if required)
var dimensions=""
var newwindow

//if width and height are 0 then ignore

	if ((width > 0) && (height > 0)) { dimensions = "width=" + width + ",height=" + height + ","}

//get a handle to an existing window or create new one. note the '' url

	if ((dimensions = dimensions + opts) == ""){
		newwindow = window.open('', name)
	}else{
		newwindow = window.open('', name,  dimensions + opts)
	}

	//give the new window the focus, make the app seem more responsive!
	newwindow.focus()

	//only change the url if required
//	if (newwindow.location != url){newwindow.location = url}
	newwindow.location = url
}

function showPic (pic, alt) {
  //alert('trying to show ' + pic + ' ' + alt);
  elt = document.getElementById('mainImage');
  //  alert('trying to show ' + pic + ' ' + alt + ' ' + elt.src);
  elt.src = pic;
  elt.alt = alt;
}

function showHide(hideName, showName){
  elt = document.getElementById(hideName);
	elt.style.display = 'none';
  elt = document.getElementById(showName);
	elt.style.display = 'block';
}