//<!--

//
// (c)2002-2006 plumsoft Systemhaus GmbH, Regensburg, Germany
// All rights reserved    
//
// $Id: popup.js,v 1.2 2006/04/30 14:53:38 juergen Exp $
//
// popup windows
// mk / jw 02/2002
//

// open a centerend popup
function _popup_(url,name,width,height,scrolling,attr,center,top,left) {
    if (typeof(center)=="undefined") center = true ;
    if (typeof(scrolling)=="undefined") scrolling = false ;
    if (!attr) attr = "resizable=yes,location=no,menubar=no,toolbar=no,status=no" ;
    if (scrolling) attr = attr+",scrollbars=yes" ;
    if (width) attr = attr+",width="+width ;
    if (height) attr = attr+",height="+height ;
    if (top && left)
        attr = attr + ",top="+top+ ",left="+left ;
    else if (center && width && height)
        attr = attr + ",top="+((screen.height-height)/2)+ ",left="+((screen.width-width)/2) ;
    var w = window.open(url,name,attr) ;
    w.focus() ;
    return w ;
}

// alias with no return value
function _popupnr_(u,n,w,h,s,a,c) { _popup_(u,n,w,h,s,a,c) ; }

// -->
