var	w = null;
WinInfo = new Array();

function MM_openBrWindow(theURL,wid,hei){
	theName="sub";
	SetupWin (theName,"scrollbars=no",wid,hei);
	if (theURL){
		w = open(theURL,theName,WinInfo[theName]);	
	}else{
		if(w) w.close();
	}
	if (w.focus) w.focus();
}

function SetupWin(theName,theScrollbars,W,H){
	X=0;Y=0;
	if(theName!="pop" && screen.availWidth){
		X=(screen.availWidth-W)/2;
		Y=(screen.availHeight-H)/2;
	}
	WinInfo[theName] = "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,dependent=yes,";
	WinInfo[theName]+= theScrollbars+",width="+W+",height="+H+",screenX="+X+",screenY="+Y+",left="+X+",top="+Y;
}
