/**
 * This method opens a popup window with the given url, width, height and window name
 */
var sWinURL="";
var oWin=null;
function openWindow(url,width,height, name)
{
    sWinURL=url;
    var sFeatures="width="+width+",height="+height+",resizable,status=0,scrollbars=1";
    if(oWin==null || oWin.closed)
    {
        //open new window
        oWin=window.open(sWinURL, name, sFeatures);
    }
    else
    {
        // close last window - open new
        oWin.close();
        oWin=null;
        oWin=window.open(sWinURL, name, sFeatures);
    }
}
/**
 * Call this method to close the currently open window
 */
function closeWindow()
{
    if(!(oWin==null || oWin.closed))
    {
        oWin.close();
        oWin=null;
    }

}
/**
 * This method opens the popup help
 */
function openHelp()
{
    openWindow('view_help.htm',400, 320, 'Help');
}


