// JavaScript Document
var popupWindow=null;

function openPopupWindow(url,w,h,features) {
	if (w == null || w=='') w = 400;
	if (h == null || h=='') h = 400;
	if (features == null) features = ",menubar=0,status=0,location=0,directories=0,resizable=1,scrollbars=1";
	
	if (url) {

		if ( (popupWindow!=null) && !popupWindow.closed && popupWindow.location ){
			popupWindow.location.href = url;
			popupWindow.focus();
		} else {
			popupWindow = window.open(url,'popupWindow','width='+w+',height='+h+features);
			popupWindow.focus();
			if (!popupWindow.opener) popupWindow.opener = self;
		}

	}
}
