function popUpWindow(targetURL, targetWindowName, targetWidth, targetHeight, customParameters, closeWindowFirst)
{
    var windowXPosition = 0 ;
    var windowYPosition = 0 ;
    var windowName		= "popUpWindow"
    var windowWidth		= 400 ;
    var windowHeight	= 400 ;
    var windowParams 	= "directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no" ;
    var newWindow		= "" ;
    
    if (!targetURL)
    {return false ;}
    else
    {
        //if there were any parsed option parameters then set the windows parameters to these
        if (targetWindowName)
        {windowName = targetWindowName ;}
        
        if (targetWidth)
        {windowWidth = targetWidth ;}
        
        if (targetHeight)
        {windowHeight = targetHeight ;}
        
        if (customParameters)
        {windowParams = customParameters ;}
        
        //set the new window with all the parameters and open the new window
        newWindow = window.open (targetURL, windowName, "toolbar=no,width=" + windowWidth + ",height=" + windowHeight + ",screenX=" + windowXPosition + ",screenY=" + windowYPosition + "," + windowParams) ;
        newWindow.focus() ;
    }
}