/*
 * $Id: window.js,v 1.1 2009/05/29 14:38:55 jar2 Exp $
 * Copyright (c) 2003-2007 Carnegie Mellon University.
 */
var stdOpt = "resizable=1,scrollbars=1,titlebar=1,menubar=1,location=0,toolbar=0,directories=0,status=0,";
function openLgWin(href, name) {
	var w = 760, h = 475, left = 25, top = 15;
	if (screen.availWidth) {
		w = Math.min(screen.availWidth - 40, 924);
		left = (screen.availWidth - w) / 2;
	}
	if (screen.availHeight) {
		if ((navigator.userAgent.indexOf("MSIE") != -1) && (navigator.userAgent.indexOf("opera") == -1)) {
			h = Math.min(screen.availHeight - 65, 768);
		} else {
			h = Math.min(screen.availHeight - 95, 768);
		}
	}
	var opt = stdOpt + "width=" + w + ", height=" + h;
	if (w < 1024 || h < 768) opt += ",left=" + left + ",top=" + top;
	var win = window.open(href, name, opt);
	if (window.focus) win.focus();
	return false;
}
function openMdWin(href, name) {
	var opt = stdOpt + "width=600,height=400,left=25,top=15";
	var win = window.open(href, name, opt);
	if (window.focus) win.focus();
	return false;
}
function openSmWin(href, name) {
	var opt = stdOpt + "width=500,height=300,left=25,top=15";
	var win = window.open(href, name, opt);
	if (window.focus) win.focus();
	return false;
}
