/* General Open Window Function... 
Arguments: url, name, width (int), height (int), scrollbars (boolean 0 or 1)--
width, height, and scrollbars values are optional.*/
function openWin(url, name, w, h, s) {
	if (w) { w = "width=" + w; } else { w = "width=300" }
	if (h) { h = "height=" + h; } else { h = "height=400"}
	if (s) { s = "scrollbars=" + s } else { s = "scrollbars=0" }
	messagewindow = window.open(url, name, ""+w+","+h+","+s+",menubar=no,top=50,left=50,resizable=yes");
	messagewindow.focus();
}

/* Swap Image.
image   = to be efficient, this is part of the actual graphic's filename, 
          minus the "_A" or "_B", AND part of the image's "name=" parameter
state   = either 0 (Off, default state) or 1 (On)
*/
function chgImg(image,state,type) {
	var imgName = image;
	var status  = state;
	var imgType = (!type)?"gif":type;
	if(document.images) {
		if (status == 1) {
			document.images[imgName].src = "/images/"+imgName+"_OVER."+imgType;
		}
		else {
			document.images[imgName].src = "/images/"+imgName+"_UP."+imgType;
		}
	}
}