var remote=null;

function rs(n,u) {
  args="toolbar=no, location=no, directories=no, status=no";
  
  remote=window.open(u,n,args);
  //if (remote != null) {
    //if (remote.opener == null)
    //  remote.opener = self;
      remote.focus();
  //}
  return true; 
}
function OpenPicture(url) 
{
	rs("_new",url);
	
	if(remote != null && remote.open && remote.focus)
	{
		remote.focus();
		return true;
		}
}
function OpenWindow(url, windowName, w, h) 
{
	window.open(url, windowName, 'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,fullscreen=no,channelmode=no,width='+w+',height='+h).focus();
}

function displayReport(url)
{
    if(window.showModelessDialog && false)
    {
        var str = new String("maximize:1; minimize:1; resizable:1; status:0; dialogtop:0px; dialogleft:0px");
		str = str + "; dialogwidth:" + screen.availWidth + "px; dialogheight:" + screen.availHeight + "px";		
		window.showModelessDialog(url, 0, str);
    }
    else
    {
        window.open(url,'report','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,fullscreen=no,channelmode=no,width='+screen.availWidth+',height='+(screen.availHeight-40)+',left=0,top=0').focus();
    }
    return false;
}
