 (j11 '#initi').click initialize
 (j11 '#save_setting').click ->
     v = (j11 '#formhp').val()
-    document.cookie = 'hp_point=' + v if v
+    document.cookie = 'hp_point=' + v unless isNaN Number v
+    (j11 '#setwindow').modal('hide')
 
 # prevent bootstrap modal from steal focus.
 (j11 '#setwindow *').bind 'click mouseup mousedown keypress keydown keyup', (e) ->

j11 = jQuery.noConflict true
j11.blockUI.defaults.css = cursor: 'auto'

# control function

bane =

target = null

pop_widget = (wid) -> (e) ->
    target = j11 @
    return j11.unblockUI() if 1000 < target.css 'z-index'
    target.css('z-index', 1011)
    wid.css('opacity', 0)
    j11.blockUI
