// JavaScript Document - PopUp Functions

function popup(url, w, h, loc) {
	// javascript:popup('PAGE_NAME.htm', 'INSERT WIDTH', 'INSERT HEIGHT');
	
	var wid = w;
	var hi = h;
	
	var scroll = true;
	
	var winl = (screen.width-w) / 2;
	var wint = (screen.height-h) / 2;
	
	new_spec = wid + "_" + hi + scroll;
	
	scrolling = scroll? "yes": "no";
	if(scroll && document.all && (navigator.userAgent.indexOf("Mac") > -1)) wid = wid + 17;
	
	if(loc == "") {
		newwin = window.open(url, new_spec, "WIDTH=" + wid + ",HEIGHT=" + hi + ",scrollBars=" + scrolling + ",resizable=no,screenX=" + winl + ",screenY=" + wint + ",left=" + winl + ",top=" + wint);
	} else {
		newwin = window.open(url + "?" + loc, new_spec, "WIDTH=" + wid + ",HEIGHT=" + hi + ",scrollBars=" + scrolling + ",resizable=no,screenX=" + winl + ",screenY=" + wint + ",left=" + winl + ",top=" + wint);
	};
	newwin.focus();
};

function closePopup() {
	self.close();
};