// ---------------------------------------------------------------------------
// Modifications by Morgan Davis to make this work in non-IE browsers   

// ---------------------------------------------------------------------------

// on images

prev_on = new Image;
prev_on.src = "images/prev_on.gif" 

pause_on = new Image;
pause_on.src = "images/pause_on.gif" 

next_on = new Image;
next_on.src = "images/next_on.gif" 

hide_on = new Image;
hide_on.src = "images/hide_zoomfinder_on.gif"

show_on = new Image;
show_on.src = "images/show_zoomfinder_on.gif"


// off images

prev_off = new Image;
prev_off.src = "images/prev.gif" 

pause_off = new Image;
pause_off.src = "images/pause.gif" 

next_off = new Image;
next_off.src = "images/next.gif" 

hide_off = new Image;
hide_off.src = "images/hide_zoomfinder.gif"

show_off = new Image;
show_off.src = "images/show_zoomfinder.gif"


// -------------------------------------
// functions
// -------------------------------------

function button_on(imgName) {
   butOn = eval(imgName + "_on.src");
   document [imgName].src = butOn;
}

function button_off(imgName) {
   butOff = eval(imgName + "_off.src");
   document [imgName].src = butOff;
}

function checkIt() {
  if(window.status=='on') {
   setVisibility('zoomfinderLayer',true);
   setVisibility('showZoomFinderLayer',false);
  }
  else {
   setVisibility('zoomfinderLayer',false);
   setVisibility('showZoomFinderLayer',true);
  }
}


var ranNum = Math.round(Math.random()*5000);
var win = null;

function NewWindow(mypage,myname,w,h,scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;

	var settings =	'height=' + h + ',' +
					'width=' + w + ',' +
					'top=' + wint + ',' +
					'left=' + winl + ',' +
					'scrollbars=' + scroll + ',' +
					'resizable=no,' +
					'screenX=' + winl + ',' +
					'screenY=' + wint;

	win = window.open(mypage, 'myname' + ranNum, settings);
	win.window.focus();
}
