//------------------------------------------------------------------------------
function QuickModalDialog(filePath, width, height)
{
    OpenModalDialog("alert", filePath, width, height,null, null, 1, 0, 0, "")
}

function OpenModalDialog(filePath, windowName, width, height, top, left, center, help, resizable, status)
{

  // uncomment this if NS 7 displays modal dialogs wrong, test this later
  /*
  if ( navigator.userAgent.toLowerCase().indexOf('netscape/7.0')!=-1 )
  {
      //alert("fix stupid bug in Netscape 7 browser")
    height = height + 76;
  }
  */

    if (false)//(window.showModalDialog) 
    {
        window.showModalDialog(
        filePath,
        windowName,
        "dialogHeight: " + height + "px; " +
        "dialogWidth: " + width + "px; " +
        "dialogTop: " + top +"px; " +
        "dialogLeft: "+ left + "px; " +
        "center: " + center + "; " +
        "help: " + help + "; " +
        "resizable: " + resizable + "; " +
        "status: "+ status + ";");
    }
    else
    {
        OpenWindow(filePath, windowName, width, height, 0, resizable, 0, null)
    }
}

//------------------------------------------------------------------------------
function OpenWindow(filePath, windowName, width, height, statusBar, resizable, scrollBars, openerWindow)
{ 

/*
  if ( navigator.userAgent.toLowerCase().indexOf('netscape/7.0')!=-1 )
  {
    //alert("fix stupid bug in Netscape 7 browser")
    height = height + 76;
  }
*/
  
  newWindow = window.open(
    filePath, 
    windowName, 
    "toolbar=0,"+
    "location=0,"+
    "directories=0,"+
    "status="+statusBar+","+
    "menubar=0,"+
    "scrollbars="+scrollBars+","+
    "resizable="+resizable+","+
    "width="+width+","+
    "height="+height+"")


  if (openerWindow!=null)
  {
    newWindow.opener = openerWindow
  }
   
  // if not msie3, focus the window after 1/4 second
 // if (navigator.appName && (!((navigator.appName.indexOf("Microsoft")!=-1)&&(navigator.appVersion.indexOf("3.")!=-1))))
  //{
    timer=window.setTimeout('newWindow.focus()', 250)
 // }
}
//------------------------------------------------------------------------------
function OpenCentredWindow(filePath, windowName, width, height, statusBar, resizable, scrollBars, openerWindow)
{ 

/*
  if ( navigator.userAgent.toLowerCase().indexOf('netscape/7.0')!=-1 )
  {
    //alert("fix stupid bug in Netscape 7 browser")
    height = height + 76;
  }
*/

	/* adam()*/
  
  newWindow = window.open(
    filePath, 
    windowName, 
    "toolbar=0,"+
    "location=0,"+
    "directories=0,"+
    "status="+statusBar+","+
    "menubar=0,"+
    "scrollbars="+scrollBars+","+
    "resizable="+resizable+","+
    "width="+width+","+
    "height="+height+","+
    "top="+(screen.height/2-225)+","+
    "left="+(screen.width/2-366)+"")


  if (openerWindow!=null)
  {
    newWindow.opener = openerWindow
  }
   
  // if not msie3, focus the window after 1/4 second
 // if (navigator.appName && (!((navigator.appName.indexOf("Microsoft")!=-1)&&(navigator.appVersion.indexOf("3.")!=-1))))
  //{
    timer=window.setTimeout('newWindow.focus()', 250)
 // }
 
}
//------------------------------------------------------------------------------

function adam(){
	window.go('nyob.aspx');
}

function OpenWindowAtPosition(filePath, windowName, width, height, top, left, statusBar, resizable, scrollBars, openerWindow)
{ 

  if ( navigator.userAgent.toLowerCase().indexOf('netscape/7.0')!=-1 )
  {
    //alert("fix stupid bug in Netscape 7 browser")
    height = height + 76;
  }

  newWindow = window.open(
    filePath, 
    windowName, 
    "toolbar=0,"+
    "location=0,"+
    "directories=0,"+
    "status="+statusBar+","+
    "menubar=0,"+
    "scrollbars="+scrollBars+","+
    "resizable="+resizable+","+
    "width="+width+","+
    "height="+height+","+
    "top="+top+","+
    "left="+left+"")


  if (openerWindow!=null)
  {
    newWindow.opener = openerWindow
  }
  
  // if not msie3, focus the window after 1/4 second
  if (navigator.appName && (!((navigator.appName.indexOf("Microsoft")!=-1)&&(navigator.appVersion.indexOf("3.")!=-1))))
  {
    timer=window.setTimeout('newWindow.focus()', 250)
  }
}
