function DoWin(urlx, opt, size)
{
var sw = new Object();	

sw = SetChildWinSize(urlx, size); 	
OpenWin(urlx, sw, opt);
return;
}
// *****
function OpenWin(urlx, sw, opt)
{
if (top.child_win != null) 
	top.child_win.close();		
	
if (top.is_ie == true || top.is_opera8up) 				
	top.child_win = window.open(urlx,"pop","left=" + sw.left + ",top=" + sw.top + ",height=" + sw.height + ",width=" + sw.width + ",resizable=yes,toolbar=yes" + opt);
  else 
	top.child_win = window.open(urlx,"pop","screenX=" + sw.left + ",screenY=" + sw.top + ",height=" + sw.height + ",width=" + sw.width + ",resizable=yes,toolbar=yes" + opt); 
return(true);
}	
// *****
function SetChildWinSize(urlx, size) 
{   
var sw = new Object();	
var s = new String(urlx);
var mid;

s = s.toUpperCase();
switch (size) {
	case 1: // min window
		sw.width = 800;	
		mid = screen.width / 2;  
		sw.left = (mid - (sw.width / 2)); 
		sw.height = screen.height * .8;		
		sw.top = 30;					
		break
	case 0:	 		
	default: // large widow
		sw.width = screen.width * .9;		  	  	
		mid = screen.width / 2;  
		sw.left = (mid - (sw.width / 2)); //  + ((sw.width * .1) / 2); 			
		sw.height = screen.height * .8;		
		sw.top = 30;					
//		alert("Invalid SIZE for child window!");
		break;
}							
return(sw);
}
