
function OpenWin(url,name,width,height,screenx,screeny,p1,p2,p3,p4,p5,p6,p7)
{

    var wf = "";	

	wf = wf + "width=" + width;

	wf = wf + ",height=" + height;

	wf = wf + ",screenx=" + screenx;
    
	wf = wf + ",screeny=" + screeny;

	wf = wf + ",resizable=" + (p1 ? "yes" : "no");

	wf = wf + ",scrollbars=" + (p2 ? "yes" : "no");

	wf = wf + ",menubar=" + (p3 ? "yes" : "no");

	wf = wf + ",toolbar=" + (p4 ? "yes" : "no");

	wf = wf + ",directories=" + (p5 ? "yes" : "no");

	wf = wf + ",location=" + (p6 ? "yes" : "no");

	wf = wf + ",status=" + (p7 ? "yes" : "no");		

    return window.open(url,name,wf);

}
// -----------------------------------------------------------------------------------
function OpenCenterWin(url,name,width,height,p1,p2,p3,p4,p5,p6,p7)
{

  var mwin;

  var centerx = (screen.width/2)-(width/2);
  var centery = (screen.height/2)-(height/2);

  if (width > screen.width-10) { width = screen.width-10; p2 = 1; centerx = 0; }
  if (height > screen.height-50) { height = screen.height-50; p2 = 1; centery = 0; }

  mwin = OpenWin(url,name,width,height,centerx,centery,p1,p2,p3,p4,p5,p6,p7);
  mwin.moveTo(centerx,centery);
  
  return mwin;

}
// -----------------------------------------------------------------------------------
function OpenCenterWinNoRet(url,name,width,height,p1,p2,p3,p4,p5,p6,p7)
{

  OpenCenterWin(url,name,width,height,p1,p2,p3,p4,p5,p6,p7);

}
// -----------------------------------------------------------------------------------
function OpenMaxWinNoRet(url,name,p1,p2,p3,p4,p5,p6,p7)
{

  var mwin;

  var width = screen.width-10;
  var height = screen.height-50;

  mwin = OpenWin(url,name,width,height,0,0,p1,p2,p3,p4,p5,p6,p7);
  mwin.moveTo(0,0);

}
// -----------------------------------------------------------------------------------


