function PopupWindow(href, w, h, settings)
    {
        leftpos = (screen.width) ? (screen.width/2)-(w/2) : 0;
        toppos = (screen.height) ? (screen.height/2)-(h/2) : 0;
        settings = 'height='+h+',width='+w+',top='+toppos+',left='+leftpos+','+settings;
        var popupwindow = window.open(href, 'popupwindow', settings);
        popupwindow.focus();
       
    }