function openwin (url, target, width, height, scroll, resize)
{
    var new_win;
    var scrollbars = "1";
    var resizable = "1";

    if ( scroll && scroll != "" ) { scrollbars = scroll; }
    if ( resize && resize != "" ) { resizable = resize; }

    new_win = window.open (url,
	target,
	"width=" + width + 
	    ",height=" + height + 
	    ",location=0" + 
	    ",resizable=1" +
	    ",scrollbars=" + scrollbars + 
	    ",toolbar=0");

    // return new_win;
    return false;
}

function openparent (url, close)
{
    if ( self.opener && self.opener.location )
    {
	self.opener.location = url;
	if ( close ) self.close();
    }
    else
    {
	self.location = url;
    }
    return false;
}

function parent_login (close)
{
    var parent_url = "/hrtbin/userlogin?redir_url=";

    if ( self.opener && self.opener.location )
    {
	parent_url += self.opener.location
	    + ";redir_openwin=" + self.location;
	self.opener.location = parent_url;
	if ( close ) self.close();
    }
    else
    {
	parent_url += self.location;
	self.location = parent_url;
    }
    return false;
}
