var windowHeight;
var windowWidth;
var windowAttr;
var newWindow;


if ((screen.availHeight) - 10 >= 728) {
  windowHeight = 728;
} else {
  windowHeight = (screen.availHeight) - 10;
}

if ((screen.availWidth) - 10 >= 1014) {
  windowWidth = 1014;
} else {
  windowWidth = (screen.availWidth) - 10;
}


windowAttr = "height=" + windowHeight + ",width=" + windowWidth + ",resizable";



function open_workwindow() {
	if (!newWindow || newWindow.close) {
		newWindow = window.open("","workwindow",windowAttr);
		newWindow.moveTo(0,0);
		if (!newWindow.opener) {
			newWindow.opener = window;
		}
	}
	else {
		newWindow.focus();
	}
}

function goto_collection() {
	var collection_list = document.browse_collection.collection;
	if (collection_list.options[collection_list.selectedIndex].value != 'none') {
		open_workwindow();
		document.browse_collection.submit();
	}
}

function self_refresh() {
	window.refresh();
	window.focus();
}