function act(imgName) {
  if (document.images)
    document[imgName].src = eval(imgName + "a.src");
}

function inact(imgName) {
  if (document.images)
    document[imgName].src = eval(imgName + "b.src");
}

function DeleteConfirm(message) {
	var DelForum = confirm(message);
	return DelForum;
}

function popup(url, name, height, width, scrollbars, resize, statusbar, screenpos)
{
	// recalculate height & width
	var Xwin = width;
	var Ywin = height;
	
	// browser adds 29px in height and 10px in width for browser borders
	Ywin = Ywin - 29;
	Xwin = Xwin - 10;

	// scrollbars add 2px to each dimension
	scrollbars = scrollbars.toLowerCase();
	if (scrollbars == "yes"){
		Ywin = Ywin - 2;
		Xwin = Xwin - 2;
	}

	// statusbar adds 20px in height
	statusbar = statusbar.toLowerCase();
	if (statusbar == "yes"){
		Ywin = Ywin - 20;
	}

	if(screenpos == null)
		screenpos = '';
	var Xsize = screen.availWidth;
	var Ysize = screen.availHeight;
	var Xpos = 0;
	var Ypos = 0;
	switch(screenpos) {
		case 'topleft':
			// move window to the top-left of the screen
			Xpos = 0;
			Ypos = 0;
			break;
		case 'topright':
			// move window to the top-right of the screen
			Xpos = Xsize - width;
			Ypos = 0;
			break;
		case 'bottomleft':
			// move window to the bottom-left of the screen
			Xpos = 0;
			Ypos = Ysize - height;
			break;
		case 'bottomright':
			// move window to the bottom-right of the screen
			Xpos = Xsize - width;
			Ypos = Ysize - height;
			break;
		default:
			// move window to the middle of the screen
			Xpos = (Xsize - width) / 2;
			Ypos = (Ysize - height) / 2;
			break;
	}
	// debug
	// alert('XWin: ' + Xwin + ' YWin: ' + Ywin );

	var popwin;
  var opts = "toolbar=no,status=" + statusbar + ",location=no,menubar=no,resizable=" + resize + ",scrollbars=" + scrollbars + ",height=" + Ywin + ",width=" + Xwin + ",left=" + Xpos + ",top=" + Ypos;
  popwin = window.open("", name, opts);
  popwin.focus();
  popwin.location = url;
}

