diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b8b54e6 --- /dev/null +++ b/Makefile @@ -0,0 +1,96 @@ + +#DEVICE_MODEL ?= hi3507_inc +#DEVICE_MODEL ?= hi3518a_inc +DEVICE_MODEL ?= hi3518c_inc +#DEVICE_MODEL ?= hi3516c_inc + +INC_PATH := $(CURDIR)/include +LIB_PATH := $(CURDIR)/lib +BIN_PATH := $(CURDIR)/bin +DBG_PATH := $(CURDIR)/debug + +# Hisilicon Hi3507 inception +ifeq ($(DEVICE_MODEL),hi3507_inc) +PRODUCT_CLASS := ipcam +PRODUCT_MODEL := hi3507-inception +SOC_MODEL := HI3507 +CROSS := arm-hismall-linux- +endif +# Hisilicon Hi3518a inception +ifeq ($(DEVICE_MODEL),hi3518a_inc) +PRODUCT_CLASS := ipcam +PRODUCT_MODEL := hi3518a-inception +SOC_MODEL := HI3518A +CROSS := arm-hisiv100nptl-linux- +SERISE_CODE := C1 +endif + +ifeq ($(DEVICE_MODEL),hi3518c_inc) +PRODUCT_CLASS := ipcam +PRODUCT_MODEL := hi3518c-inception +SOC_MODEL := HI3518C +CROSS := arm-hisiv100nptl-linux- +SERISE_CODE := C2 +endif + +ifeq ($(DEVICE_MODEL),hi3516c_inc) +PRODUCT_CLASS := ipcam +PRODUCT_MODEL := hi3516c-inception +SOC_MODEL := HI3516C +CROSS := arm-hisiv100nptl-linux- +SERISE_CODE := C3 +endif + +MAKE := @make + +.PHONY: all src sdk api sdk_clean tarball image + +#info: +# @echo $(PRODUCT_CLASS) +# @echo $(PRODUCT_MODEL) +# @echo $(SOC_MODEL) +# + + +src: srclib + $(MAKE) -C src CROSS="@$(CROSS)" \ + PRODUCT_CLASS="$(PRODUCT_CLASS)" \ + PRODUCT_MODEL="$(PRODUCT_MODEL)" \ + SOC_MODEL="$(SOC_MODEL)" \ + INC_PATH="$(INC_PATH)" \ + LIB_PATH="$(LIB_PATH)" \ + BIN_PATH="$(BIN_PATH)" \ + DBG_PATH="$(DBG_PATH)" \ + SERISE_CODE="$(SERISE_CODE)" \ + +srclib: + rm -f $(BIN_PATH)/ipcam_app + $(MAKE) -C src srclib CROSS="@$(CROSS)" \ + PRODUCT_CLASS="$(PRODUCT_CLASS)" \ + PRODUCT_MODEL="$(PRODUCT_MODEL)" \ + SOC_MODEL="$(SOC_MODEL)" \ + INC_PATH="$(INC_PATH)" \ + LIB_PATH="$(LIB_PATH)" \ + BIN_PATH="$(BIN_PATH)" \ + DBG_PATH="$(DBG_PATH)" \ + SERISE_CODE="$(SERISE_CODE)" \ + +sdk: + $(MAKE) --directory=sdk SOC_MODEL="$(SOC_MODEL)" + +api: + $(MAKE) --directory=api CROSS=$(CROSS) + + +tarball: + $(MAKE) --directory=sdk clean + +image: src + #cd ../release + $(MAKE) -C ../release DEVICE_MODEL="$(DEVICE_MODEL)" + +all: clean sdk srclib src image + +clean: + rm -f $(shell find $(CURDIR) -name *.o) + rm -f $(shell find $(CURDIR) -name *.d) diff --git a/bin/font/asc16 b/bin/font/asc16 new file mode 100644 index 0000000..3527a68 Binary files /dev/null and b/bin/font/asc16 differ diff --git a/bin/font/asc32 b/bin/font/asc32 new file mode 100644 index 0000000..8705b53 Binary files /dev/null and b/bin/font/asc32 differ diff --git a/bin/font/hzk16 b/bin/font/hzk16 new file mode 100644 index 0000000..a6c0a53 Binary files /dev/null and b/bin/font/hzk16 differ diff --git a/bin/font/hzk32 b/bin/font/hzk32 new file mode 100644 index 0000000..8f64dc9 Binary files /dev/null and b/bin/font/hzk32 differ diff --git a/bin/ipcam_app b/bin/ipcam_app new file mode 100644 index 0000000..5c5ac8d Binary files /dev/null and b/bin/ipcam_app differ diff --git a/bin/web/Calendar/demos.css b/bin/web/Calendar/demos.css new file mode 100644 index 0000000..11d0d63 --- /dev/null +++ b/bin/web/Calendar/demos.css @@ -0,0 +1,336 @@ +body { + font-size: 62.5%; +} + +table { + font-size: 1em; + z-index:102; +} + +/* Site + -------------------------------- */ + +body { + font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; +} + +/* Layout + -------------------------------- */ + +.layout-grid { + width: 960px; +} + +.layout-grid td { + vertical-align: top; +} + +.layout-grid td.left-nav { + width: 140px; +} + +.layout-grid td.normal { + border-left: 1px solid #eee; + padding: 20px 24px; + font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; +} + +.layout-grid td.demos { + background: url('/images/demos_bg.jpg') no-repeat; + height: 337px; + overflow: hidden; +} + +/* Normal + -------------------------------- */ + +.normal h3, +.normal h4 { + margin: 0; + font-weight: normal; +} + +.normal h3 { + padding: 0 0 9px; + font-size: 1.8em; +} + +.normal h4 { + padding-bottom: 21px; + border-bottom: 1px dashed #999; + font-size: 1.2em; + font-weight: bold; +} + +.normal p { + font-size: 1.2em; +} + +/* Demos */ + +.demos-nav, .demos-nav dt, .demos-nav dd, .demos-nav ul, .demos-nav li { + margin: 0; + padding: 0 +} + +.demos-nav { + float: left; + width: 170px; + font-size: 1.3em; +} + +.demos-nav dt, +.demos-nav h4 { + margin: 0; + padding: 0; + font: normal 1.1em "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; + color: #e87b10; +} + +.demos-nav dt, +.demos-nav h4 { + margin-top: 1.5em; + margin-bottom: 0; + padding-left: 8px; + padding-bottom:5px; + line-height: 1.2em; + border-bottom: 1px solid #F4F4F4; +} + +.demos-nav dd a, +.demos-nav li a { + border-bottom: 1px solid #F4F4F4; + display:block; + padding: 4px 3px 4px 8px; + font-size: 90%; + text-decoration: none; + color: #555 ; + margin:2px 0; + height:13px; +} + +.demos-nav dd a:hover, +.demos-nav dd a:focus, +.demos-nav dd a:hover, +.demos-nav dd a:focus { + background: #f3f3f3; + color:#000; + -moz-border-radius: 5px; -webkit-border-radius: 5px; +} + .demos-nav dd a.selected { + background: #555; + color:#ffffff; + -moz-border-radius: 5px; -webkit-border-radius: 5px; +} + + +/* new styles for demo pages, added by Filament 12.29.08 +eventually we should convert the font sizes to ems -- using px for now to minimize style conflicts +*/ + +.normal h3.demo-header { font-size:32px; padding:0 0 5px; border-bottom:1px solid #eee; text-transform: capitalize; } +.normal h4.demo-subheader { font-size:10px; text-transform: uppercase; color:#999; padding:8px 0 3px; border:0; margin:0; } +.normal a:link, +.normal a:visited { color:#1b75bb; text-decoration:none; } +.normal a:hover, +.normal a:active { color:#0b559b; } + +#demo-config { padding:20px 0 0; } + +#demo-frame { float:left; width:540px; height:380px; border:1px solid #ddd; overflow: auto; position: relative; } +#demo-frame h3, #demo-frame h4 { padding: 0; font-weight: bold; font-size: 1em; } + +#demo-config-menu { float:right; width:180px; } +#demo-config-menu h4 { font-size:13px; color:#666; font-weight:normal; border:0; padding-left:18px; } + +#demo-config-menu ul { list-style: none; padding: 0; margin: 0; } + +#demo-config-menu li { font-size:12px; padding:0 0 0 10px; margin:3px 0; zoom: 1; } + +#demo-config-menu li a:link, +#demo-config-menu li a:visited { display:block; padding:1px 8px 4px; border-bottom:1px dotted #b3b3b3; } +* html #demo-config-menu li a:link, +* html #demo-config-menu li a:visited { padding:1px 8px 2px; } +#demo-config-menu li a:hover, +#demo-config-menu li a:active { background-color:#f6f6f6; } + +#demo-config-menu li.demo-config-on { background: url(images/demo-config-on-tile.gif) repeat-x left center; } + +#demo-config-menu li.demo-config-on a:link, +#demo-config-menu li.demo-config-on a:visited, +#demo-config-menu li.demo-config-on a:hover, +#demo-config-menu li.demo-config-on a:active { background: url(images/demo-config-on.gif) no-repeat left; padding-left:18px; color:#fff; border:0; margin-left:-10px; margin-top: 0px; margin-bottom: 0px; } + +#demo-source, #demo-notes { + clear: both; + padding: 20px 0 0; + font-size: 1.3em; +} + +#demo-notes { width:520px; color:#333; font-size: 1em; } +#demo-notes p code, .demo-description p code { padding: 0; font-weight: bold; } +#demo-source pre, #demo-source code { padding: 0; } +code, pre { padding:8px 0 8px 20px ; font-size: 1.2em; line-height:130%; } + +#demo-source a:link, +#demo-source a:visited, +#demo-source a:hover, +#demo-source a:active { font-size:12px; padding-left:13px; background-position: left center; background-repeat: no-repeat; } + +#demo-source a.source-open:link, +#demo-source a.source-open:visited, +#demo-source a.source-open:hover, +#demo-source a.source-open:active { background-image: url(images/demo-spindown-open.gif); } + +#demo-source a.source-closed:link, +#demo-source a.source-closed:visited, +#demo-source a.source-closed:hover, +#demo-source a.source-closed:active { background-image: url(images/demo-spindown-closed.gif); } + +div.demo { + padding:12px; + font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif"; + font-size:14px; +} + +div.demo h3.docs { clear:left; font-size:12px; font-weight:normal; padding:0 0 1em; margin:0; } + +div.demo-description { + clear:both; + padding:12px; + font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif"; + font-size: 1.3em; + line-height: 1.4em; +} + +.ui-draggable, .ui-droppable { + background-position: top left; +} + +.left-nav .demos-nav { + padding-right: 10px; +} + +#demo-link { font-size:11px; padding-top: 6px; clear: both; overflow: hidden; } +#demo-link a span.ui-icon { float:left; margin-right:3px; } + +/* Component containers +----------------------------------*/ +#widget-docs .ui-widget { font-family: Trebuchet MS,Verdana,Arial,sans-serif; font-size: 1em; } +#widget-docs .ui-widget input, #widget-docs .ui-widget select, #widget-docs .ui-widget textarea, #widget-docs .ui-widget button { font-family: Trebuchet MS,Verdana,Arial,sans-serif; font-size: 1em; } +#widget-docs .ui-widget-header { border: 1px solid #ffffff; background: #464646 url(images/464646_40x100_textures_01_flat_100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +#widget-docs .ui-widget-header a { color: #ffffff; } +#widget-docs .ui-widget-content { border: 1px solid #ffffff; background: #ffffff url(images/ffffff_40x100_textures_01_flat_75.png) 50% 50% repeat-x; color: #222222; } +#widget-docs .ui-widget-content a { color: #222222; } + +/* Interaction states +----------------------------------*/ +#widget-docs .ui-state-default, #widget-docs .ui-widget-content #widget-docs .ui-state-default { border: 1px solid #666666; background: #555555 url(images/555555_40x100_textures_03_highlight_soft_75.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; outline: none; } +#widget-docs .ui-state-default a { color: #ffffff; text-decoration: none; outline: none; } +#widget-docs .ui-state-hover, #widget-docs .ui-widget-content #widget-docs .ui-state-hover, #widget-docs .ui-state-focus, #widget-docs .ui-widget-content #widget-docs .ui-state-focus { border: 1px solid #666666; background: #444444 url(images/444444_40x100_textures_03_highlight_soft_60.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; outline: none; } +#widget-docs .ui-state-hover a { color: #ffffff; text-decoration: none; outline: none; } +#widget-docs .ui-state-active, #widget-docs .ui-widget-content #widget-docs .ui-state-active { border: 1px solid #666666; background: #ffffff url(images/ffffff_40x100_textures_01_flat_65.png) 50% 50% repeat-x; font-weight: normal; color: #F6921E; outline: none; } +#widget-docs .ui-state-active a { color: #F6921E; outline: none; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +#widget-docs .ui-state-highlight, #widget-docs .ui-widget-content #widget-docs .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/fbf9ee_40x100_textures_02_glass_55.png) 50% 50% repeat-x; color: #363636; } +#widget-docs .ui-state-error, #widget-docs .ui-widget-content #widget-docs .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/fef1ec_40x100_textures_05_inset_soft_95.png) 50% bottom repeat-x; color: #cd0a0a; } +#widget-docs .ui-state-error-text, #widget-docs .ui-widget-content #widget-docs .ui-state-error-text { color: #cd0a0a; } +#widget-docs .ui-state-disabled, #widget-docs .ui-widget-content #widget-docs .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +#widget-docs .ui-priority-primary, #widget-docs .ui-widget-content #widget-docs .ui-priority-primary { font-weight: bold; } +#widget-docs .ui-priority-secondary, #widget-docs .ui-widget-content #widget-docs .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } + +/* Icons +----------------------------------*/ + +/* states and images */ +#demo-frame-wrapper .ui-icon, #widget-docs .ui-icon { width: 16px; height: 16px; background-image: url(images/222222_256x240_icons_icons.png); } +#widget-docs .ui-widget-content .ui-icon {background-image: url(images/222222_256x240_icons_icons.png); } +#widget-docs .ui-widget-header .ui-icon {background-image: url(images/222222_256x240_icons_icons.png); } +#widget-docs .ui-state-default .ui-icon { background-image: url(images/888888_256x240_icons_icons.png); } +#widget-docs .ui-state-hover .ui-icon, #widget-docs .ui-state-focus .ui-icon {background-image: url(images/454545_256x240_icons_icons.png); } +#widget-docs .ui-state-active .ui-icon {background-image: url(images/454545_256x240_icons_icons.png); } +#widget-docs .ui-state-highlight .ui-icon {background-image: url(images/2e83ff_256x240_icons_icons.png); } +#widget-docs .ui-state-error .ui-icon, #widget-docs .ui-state-error-text .ui-icon {background-image: url(images/cd0a0a_256x240_icons_icons.png); } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +#widget-docs .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; } +#widget-docs .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } +#widget-docs .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } +#widget-docs .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +#widget-docs .ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } +#widget-docs .ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +#widget-docs .ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +#widget-docs .ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } +#widget-docs .ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; } + +/* Overlays */ +#widget-docs .ui-widget-overlay { background: #aaaaaa url(images/aaaaaa_40x100_textures_01_flat_0.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } +#widget-docs .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/aaaaaa_40x100_textures_01_flat_0.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; } + +/* +----------------------------------*/ + +#widget-docs { margin:20px 0 0; border: none; } + +#widget-docs h2, #widget-docs h3, #widget-docs h4, #widget-docs p, #widget-docs ul, #widget-docs code { margin:0; padding:0; } +#widget-docs code { display:block; color:#444; font-size:.9em; margin:0 0 1em; } +#widget-docs code strong { color:#000; } +#widget-docs p { margin:0 3em 1.2em 0; } +#widget-docs p.intro { font-size:13px; color:#666; line-height:1.3; } +#widget-docs ul { list-style-type: none; } + +#widget-docs h2 { font-size:16px; margin:1.2em 0 .5em; } +#widget-docs h3 { font-size:14px; color:#e6820E; margin:1.5em 0 .5em; } +.normal #widget-docs h4 { font-size:12px; color:#000; border:0; margin:0 0 .5em; } + +#docs-overview-main { width:400px; } +#docs-overview-sidebar { float:right; width:200px; } +#docs-overview-sidebar a span { color:#666; } +#widget-docs #docs-overview-main p { margin-right:0; } +#widget-docs #docs-overview-sidebar h4 { padding-left:0; } + +.docs-list-header { float:left; width:100%; margin:10px 0 0; border-bottom:1px solid #eee; } +#widget-docs .docs-list-header h2 { float:left; margin:0; } +#widget-docs .docs-list-header p { float:right; margin:5px 0; font-size:11px; } + +.docs-list { float:left; width:100%; padding:0 0 10px; } +.docs-list .param-header { float:left; clear:left; width:100%; padding:8px 0; border-top:1px solid #eee; } +#widget-docs .param-header h3, #widget-docs .param-header p { margin:0; float:left; } +#widget-docs .param-header h3 { width:50%; } +#widget-docs .param-header h3 span { background: url(images/demo-spindown-closed.gif) no-repeat left; padding-left:13px; } +#widget-docs .param-open .param-header h3 span { background: url(images/demo-spindown-open.gif) no-repeat left; } +#widget-docs .param-header p { width:24%; } +#widget-docs .param-header p.param-type span { background: url(images/icon-docs-info.gif) no-repeat left; cursor:pointer; border-bottom:1px dashed #ccc; padding-left:15px; } + +.param-details { padding-left:13px; } +.param-args { margin:0 0 1.5em; border-top:1px dotted #ccc;} +.param-args td { padding:3px 30px 3px 5px; border-bottom:1px dotted #ccc; } + + +/* overrides for ui-tab styles */ +#widget-docs ul.ui-tabs-nav { padding:0 0 0 8px; } +#widget-docs .ui-tabs-nav li { margin:5px 5px 0 0; } + +#widget-docs .ui-tabs-nav li a:link, +#widget-docs .ui-tabs-nav li a:visited, +#widget-docs .ui-tabs-nav li a:hover, +#widget-docs .ui-tabs-nav li a:active { font-size:14px; padding:4px 1.2em 3px; color:#fff; } + +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:link, +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:visited, +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:hover, +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:active { color:#e6820E; } + +#widget-docs .ui-tabs-panel { padding:20px 9px; font-size:12px; line-height:1.4; color:#000; } + +#widget-docs .ui-widget-content a:link, +#widget-docs .ui-widget-content a:visited { color:#1b75bb; text-decoration:none; } +#widget-docs .ui-widget-content a:hover, +#widget-docs .ui-widget-content a:active { color:#0b559b; } + diff --git a/bin/web/Calendar/images/ui-bg_flat_0_aaaaaa_40x100.png b/bin/web/Calendar/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 0000000..5b5dab2 Binary files /dev/null and b/bin/web/Calendar/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/bin/web/Calendar/images/ui-bg_flat_75_ffffff_40x100.png b/bin/web/Calendar/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 0000000..ac8b229 Binary files /dev/null and b/bin/web/Calendar/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/bin/web/Calendar/images/ui-bg_glass_55_fbf9ee_1x400.png b/bin/web/Calendar/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000..ad3d634 Binary files /dev/null and b/bin/web/Calendar/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/bin/web/Calendar/images/ui-bg_glass_65_ffffff_1x400.png b/bin/web/Calendar/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000..42ccba2 Binary files /dev/null and b/bin/web/Calendar/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/bin/web/Calendar/images/ui-bg_glass_75_dadada_1x400.png b/bin/web/Calendar/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000..5a46b47 Binary files /dev/null and b/bin/web/Calendar/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/bin/web/Calendar/images/ui-bg_glass_75_e6e6e6_1x400.png b/bin/web/Calendar/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 0000000..86c2baa Binary files /dev/null and b/bin/web/Calendar/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/bin/web/Calendar/images/ui-bg_glass_95_fef1ec_1x400.png b/bin/web/Calendar/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 0000000..4443fdc Binary files /dev/null and b/bin/web/Calendar/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/bin/web/Calendar/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/bin/web/Calendar/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 0000000..7c9fa6c Binary files /dev/null and b/bin/web/Calendar/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/bin/web/Calendar/images/ui-icons_222222_256x240.png b/bin/web/Calendar/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..ee039dc Binary files /dev/null and b/bin/web/Calendar/images/ui-icons_222222_256x240.png differ diff --git a/bin/web/Calendar/images/ui-icons_2e83ff_256x240.png b/bin/web/Calendar/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000..45e8928 Binary files /dev/null and b/bin/web/Calendar/images/ui-icons_2e83ff_256x240.png differ diff --git a/bin/web/Calendar/images/ui-icons_454545_256x240.png b/bin/web/Calendar/images/ui-icons_454545_256x240.png new file mode 100644 index 0000000..7ec70d1 Binary files /dev/null and b/bin/web/Calendar/images/ui-icons_454545_256x240.png differ diff --git a/bin/web/Calendar/images/ui-icons_888888_256x240.png b/bin/web/Calendar/images/ui-icons_888888_256x240.png new file mode 100644 index 0000000..5ba708c Binary files /dev/null and b/bin/web/Calendar/images/ui-icons_888888_256x240.png differ diff --git a/bin/web/Calendar/images/ui-icons_cd0a0a_256x240.png b/bin/web/Calendar/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000..7930a55 Binary files /dev/null and b/bin/web/Calendar/images/ui-icons_cd0a0a_256x240.png differ diff --git a/bin/web/Calendar/jquery.ui.accordion.css b/bin/web/Calendar/jquery.ui.accordion.css new file mode 100644 index 0000000..e15202f --- /dev/null +++ b/bin/web/Calendar/jquery.ui.accordion.css @@ -0,0 +1,19 @@ +/*! + * jQuery UI Accordion 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } diff --git a/bin/web/Calendar/jquery.ui.all.css b/bin/web/Calendar/jquery.ui.all.css new file mode 100644 index 0000000..453d495 --- /dev/null +++ b/bin/web/Calendar/jquery.ui.all.css @@ -0,0 +1,11 @@ +/*! + * jQuery UI CSS Framework 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming + */ +@import "jquery.ui.base.css"; +@import "jquery.ui.theme.css"; diff --git a/bin/web/Calendar/jquery.ui.autocomplete.css b/bin/web/Calendar/jquery.ui.autocomplete.css new file mode 100644 index 0000000..c697c3d --- /dev/null +++ b/bin/web/Calendar/jquery.ui.autocomplete.css @@ -0,0 +1,53 @@ +/*! + * jQuery UI Autocomplete 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.22 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} diff --git a/bin/web/Calendar/jquery.ui.base.css b/bin/web/Calendar/jquery.ui.base.css new file mode 100644 index 0000000..f52ee39 --- /dev/null +++ b/bin/web/Calendar/jquery.ui.base.css @@ -0,0 +1,11 @@ +@import url("jquery.ui.core.css"); +@import url("jquery.ui.resizable.css"); +@import url("jquery.ui.selectable.css"); +@import url("jquery.ui.accordion.css"); +@import url("jquery.ui.autocomplete.css"); +@import url("jquery.ui.button.css"); +@import url("jquery.ui.dialog.css"); +@import url("jquery.ui.slider.css"); +@import url("jquery.ui.tabs.css"); +@import url("jquery.ui.datepicker.css"); +@import url("jquery.ui.progressbar.css"); \ No newline at end of file diff --git a/bin/web/Calendar/jquery.ui.button.css b/bin/web/Calendar/jquery.ui.button.css new file mode 100644 index 0000000..d4984fb --- /dev/null +++ b/bin/web/Calendar/jquery.ui.button.css @@ -0,0 +1,38 @@ +/*! + * jQuery UI Button 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ diff --git a/bin/web/Calendar/jquery.ui.core.css b/bin/web/Calendar/jquery.ui.core.css new file mode 100644 index 0000000..f8e7e5b --- /dev/null +++ b/bin/web/Calendar/jquery.ui.core.css @@ -0,0 +1,38 @@ +/*! + * jQuery UI CSS Framework 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } +.ui-helper-clearfix:after { clear: both; } +.ui-helper-clearfix { zoom: 1; } +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } diff --git a/bin/web/Calendar/jquery.ui.core.js b/bin/web/Calendar/jquery.ui.core.js new file mode 100644 index 0000000..40211cc --- /dev/null +++ b/bin/web/Calendar/jquery.ui.core.js @@ -0,0 +1,334 @@ +/*! + * jQuery UI 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function( $, undefined ) { + +// prevent duplicate loading +// this is only a problem because we proxy existing functions +// and we don't want to double proxy them +$.ui = $.ui || {}; +if ( $.ui.version ) { + return; +} + +$.extend( $.ui, { + version: "1.8.22", + + keyCode: { + ALT: 18, + BACKSPACE: 8, + CAPS_LOCK: 20, + COMMA: 188, + COMMAND: 91, + COMMAND_LEFT: 91, // COMMAND + COMMAND_RIGHT: 93, + CONTROL: 17, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + INSERT: 45, + LEFT: 37, + MENU: 93, // COMMAND_RIGHT + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SHIFT: 16, + SPACE: 32, + TAB: 9, + UP: 38, + WINDOWS: 91 // COMMAND + } +}); + +// plugins +$.fn.extend({ + propAttr: $.fn.prop || $.fn.attr, + + _focus: $.fn.focus, + focus: function( delay, fn ) { + return typeof delay === "number" ? + this.each(function() { + var elem = this; + setTimeout(function() { + $( elem ).focus(); + if ( fn ) { + fn.call( elem ); + } + }, delay ); + }) : + this._focus.apply( this, arguments ); + }, + + scrollParent: function() { + var scrollParent; + if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) { + scrollParent = this.parents().filter(function() { + return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); + }).eq(0); + } else { + scrollParent = this.parents().filter(function() { + return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); + }).eq(0); + } + + return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent; + }, + + zIndex: function( zIndex ) { + if ( zIndex !== undefined ) { + return this.css( "zIndex", zIndex ); + } + + if ( this.length ) { + var elem = $( this[ 0 ] ), position, value; + while ( elem.length && elem[ 0 ] !== document ) { + // Ignore z-index if position is set to a value where z-index is ignored by the browser + // This makes behavior of this function consistent across browsers + // WebKit always returns auto if the element is positioned + position = elem.css( "position" ); + if ( position === "absolute" || position === "relative" || position === "fixed" ) { + // IE returns 0 when zIndex is not specified + // other browsers return a string + // we ignore the case of nested elements with an explicit value of 0 + //
+ value = parseInt( elem.css( "zIndex" ), 10 ); + if ( !isNaN( value ) && value !== 0 ) { + return value; + } + } + elem = elem.parent(); + } + } + + return 0; + }, + + disableSelection: function() { + return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + + ".ui-disableSelection", function( event ) { + event.preventDefault(); + }); + }, + + enableSelection: function() { + return this.unbind( ".ui-disableSelection" ); + } +}); + +// support: jQuery <1.8 +if ( !$( "" ).outerWidth( 1 ).jquery ) { + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0; + if ( border ) { + size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0; + } + }); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each(function() { + $( this ).css( type, reduce( this, size ) + "px" ); + }); + }; + + $.fn[ "outer" + name] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each(function() { + $( this).css( type, reduce( this, size, true, margin ) + "px" ); + }); + }; + }); +} + +// selectors +function focusable( element, isTabIndexNotNaN ) { + var nodeName = element.nodeName.toLowerCase(); + if ( "area" === nodeName ) { + var map = element.parentNode, + mapName = map.name, + img; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap=#" + mapName + "]" )[0]; + return !!img && visible( img ); + } + return ( /input|select|textarea|button|object/.test( nodeName ) + ? !element.disabled + : "a" == nodeName + ? element.href || isTabIndexNotNaN + : isTabIndexNotNaN) + // the element and all of its ancestors must be visible + && visible( element ); +} + +function visible( element ) { + return !$( element ).parents().andSelf().filter(function() { + return $.curCSS( this, "visibility" ) === "hidden" || + $.expr.filters.hidden( this ); + }).length; +} + +$.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo(function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + }) : + // support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + }, + + focusable: function( element ) { + return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); + }, + + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + isTabIndexNaN = isNaN( tabIndex ); + return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); + } +}); + +// support +$(function() { + var body = document.body, + div = body.appendChild( div = document.createElement( "div" ) ); + + // access offsetHeight before setting the style to prevent a layout bug + // in IE 9 which causes the elemnt to continue to take up space even + // after it is removed from the DOM (#8026) + div.offsetHeight; + + $.extend( div.style, { + minHeight: "100px", + height: "auto", + padding: 0, + borderWidth: 0 + }); + + $.support.minHeight = div.offsetHeight === 100; + $.support.selectstart = "onselectstart" in div; + + // set display to none to avoid a layout bug in IE + // http://dev.jquery.com/ticket/4014 + body.removeChild( div ).style.display = "none"; +}); + +// jQuery <1.4.3 uses curCSS, in 1.4.3 - 1.7.2 curCSS = css, 1.8+ only has css +if ( !$.curCSS ) { + $.curCSS = $.css; +} + + + + + +// deprecated +$.extend( $.ui, { + // $.ui.plugin is deprecated. Use the proxy pattern instead. + plugin: { + add: function( module, option, set ) { + var proto = $.ui[ module ].prototype; + for ( var i in set ) { + proto.plugins[ i ] = proto.plugins[ i ] || []; + proto.plugins[ i ].push( [ option, set[ i ] ] ); + } + }, + call: function( instance, name, args ) { + var set = instance.plugins[ name ]; + if ( !set || !instance.element[ 0 ].parentNode ) { + return; + } + + for ( var i = 0; i < set.length; i++ ) { + if ( instance.options[ set[ i ][ 0 ] ] ) { + set[ i ][ 1 ].apply( instance.element, args ); + } + } + } + }, + + // will be deprecated when we switch to jQuery 1.4 - use jQuery.contains() + contains: function( a, b ) { + return document.compareDocumentPosition ? + a.compareDocumentPosition( b ) & 16 : + a !== b && a.contains( b ); + }, + + // only used by resizable + hasScroll: function( el, a ) { + + //If overflow is hidden, the element might have extra content, but the user wants to hide it + if ( $( el ).css( "overflow" ) === "hidden") { + return false; + } + + var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", + has = false; + + if ( el[ scroll ] > 0 ) { + return true; + } + + // TODO: determine which cases actually cause this to happen + // if the element doesn't have the scroll set, see if it's possible to + // set the scroll + el[ scroll ] = 1; + has = ( el[ scroll ] > 0 ); + el[ scroll ] = 0; + return has; + }, + + // these are odd functions, fix the API or move into individual plugins + isOverAxis: function( x, reference, size ) { + //Determines when x coordinate is over "b" element axis + return ( x > reference ) && ( x < ( reference + size ) ); + }, + isOver: function( y, x, top, left, height, width ) { + //Determines when x, y coordinates is over "b" element + return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width ); + } +}); + +})( jQuery ); diff --git a/bin/web/Calendar/jquery.ui.datepicker.css b/bin/web/Calendar/jquery.ui.datepicker.css new file mode 100644 index 0000000..d543625 --- /dev/null +++ b/bin/web/Calendar/jquery.ui.datepicker.css @@ -0,0 +1,66 @@ +/*! + * jQuery UI Datepicker 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} \ No newline at end of file diff --git a/bin/web/Calendar/jquery.ui.datepicker.js b/bin/web/Calendar/jquery.ui.datepicker.js new file mode 100644 index 0000000..df80045 --- /dev/null +++ b/bin/web/Calendar/jquery.ui.datepicker.js @@ -0,0 +1,1853 @@ + +/*! + * jQuery UI Datepicker 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker + * + * Depends: + * jquery.ui.core.js + */ + var datepicker_monthNames = langstr.datepicker_monthNames, + dayNamesMin = langstr.dayNamesMin; + +(function( $, undefined) { +$.extend($.ui, { datepicker: { version: "1.8.22" } }); +var PROP_NAME = 'datepicker'; +var dpuuid = new Date().getTime(); +var instActive; + +/* Date picker manager. + Use the singleton instance of this class, $.datepicker, to interact with the date picker. + Settings for (groups of) date pickers are maintained in an instance object, + allowing multiple different settings on the same page. */ + +function Datepicker() { + this.debug = false; // Change this to true to start debugging + this._curInst = null; // The current instance in use + this._keyEvent = false; // If the last event was a key event + this._disabledInputs = []; // List of date picker inputs that have been disabled + this._datepickerShowing = false; // True if the popup picker is showing , false if not + this._inDialog = false; // True if showing within a "dialog", false if not + this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division + this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class + this._appendClass = 'ui-datepicker-append'; // The name of the append marker class + this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class + this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class + this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class + this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class + this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class + this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class + this.regional = []; // Available regional settings, indexed by language code + this.regional[''] = { // Default regional settings + closeText: '完成', // Display text for close link + prevText: 'Prev', // Display text for previous month link + nextText: 'Next', // Display text for next month link + currentText: '今天', // Display text for current month link + monthNames: datepicker_monthNames, // Names of months for drop-down and formatting + monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting + dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting + dayNamesShort: ['一', '二', '三', '四', '五', '六', '日'], // For formatting + dayNamesMin: dayNamesMin, // Column headings for days starting at Sunday + weekHeader: 'Wk', // Column header for week of the year + dateFormat: 'yy-mm-dd', // See format options on parseDate + firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... + isRTL: false, // True if right-to-left language, false if left-to-right + showMonthAfterYear: false, // True if the year select precedes month, false for month then year + yearSuffix: '' // Additional text to append to the year in the month headers + }; + this._defaults = { // Global defaults for all the date picker instances + showOn: 'focus', // 'focus' for popup on focus, + // 'button' for trigger button, or 'both' for either + showAnim: 'fadeIn', // Name of jQuery animation for popup + showOptions: {}, // Options for enhanced animations + defaultDate: null, // Used when field is blank: actual date, + // +/-number for offset from today, null for today + appendText: '', // Display text following the input box, e.g. showing the format + buttonText: '...', // Text for trigger button + buttonImage: '', // URL for trigger button image + buttonImageOnly: false, // True if the image appears alone, false if it appears on a button + hideIfNoPrevNext: false, // True to hide next/previous month links + // if not applicable, false to just disable them + navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links + gotoCurrent: false, // True if today link goes back to current selection instead + changeMonth: false, // True if month can be selected directly, false if only prev/next + changeYear: false, // True if year can be selected directly, false if only prev/next + yearRange: 'c-10:c+10', // Range of years to display in drop-down, + // either relative to today's year (-nn:+nn), relative to currently displayed year + // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n) + showOtherMonths: false, // True to show dates in other months, false to leave blank + selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable + showWeek: false, // True to show week of the year, false to not show it + calculateWeek: this.iso8601Week, // How to calculate the week of the year, + // takes a Date and returns the number of the week for it + shortYearCutoff: '+10', // Short year values < this are in the current century, + // > this are in the previous century, + // string value starting with '+' for current year + value + minDate: null, // The earliest selectable date, or null for no limit + maxDate: null, // The latest selectable date, or null for no limit + duration: 'fast', // Duration of display/closure + beforeShowDay: null, // Function that takes a date and returns an array with + // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '', + // [2] = cell title (optional), e.g. $.datepicker.noWeekends + beforeShow: null, // Function that takes an input field and + // returns a set of custom settings for the date picker + onSelect: null, // Define a callback function when a date is selected + onChangeMonthYear: null, // Define a callback function when the month or year is changed + onClose: null, // Define a callback function when the datepicker is closed + numberOfMonths: 1, // Number of months to show at a time + showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) + stepMonths: 1, // Number of months to step back/forward + stepBigMonths: 12, // Number of months to step back/forward for the big links + altField: '', // Selector for an alternate field to store selected dates into + altFormat: '', // The date format to use for the alternate field + constrainInput: true, // The input is constrained by the current date format + showButtonPanel: false, // True to show button panel, false to not show it + autoSize: false, // True to size the input for the date format, false to leave as is + disabled: false // The initial disabled state + }; + $.extend(this._defaults, this.regional['']); + this.dpDiv = bindHover($('
')); +} + +$.extend(Datepicker.prototype, { + /* Class name added to elements to indicate already configured with a date picker. */ + markerClassName: 'hasDatepicker', + + //Keep track of the maximum number of rows displayed (see #7043) + maxRows: 4, + + /* Debug logging (if enabled). */ + log: function () { + if (this.debug) + console.log.apply('', arguments); + }, + + // TODO rename to "widget" when switching to widget factory + _widgetDatepicker: function() { + return this.dpDiv; + }, + + /* Override the default settings for all instances of the date picker. + @param settings object - the new settings to use as defaults (anonymous object) + @return the manager object */ + setDefaults: function(settings) { + extendRemove(this._defaults, settings || {}); + return this; + }, + + /* Attach the date picker to a jQuery selection. + @param target element - the target input field or division or span + @param settings object - the new settings to use for this date picker instance (anonymous) */ + _attachDatepicker: function(target, settings) { + // check for settings on the control itself - in namespace 'date:' + var inlineSettings = null; + for (var attrName in this._defaults) { + var attrValue = target.getAttribute('date:' + attrName); + if (attrValue) { + inlineSettings = inlineSettings || {}; + try { + inlineSettings[attrName] = eval(attrValue); + } catch (err) { + inlineSettings[attrName] = attrValue; + } + } + } + var nodeName = target.nodeName.toLowerCase(); + var inline = (nodeName == 'div' || nodeName == 'span'); + if (!target.id) { + this.uuid += 1; + target.id = 'dp' + this.uuid; + } + var inst = this._newInst($(target), inline); + inst.settings = $.extend({}, settings || {}, inlineSettings || {}); + if (nodeName == 'input') { + this._connectDatepicker(target, inst); + } else if (inline) { + this._inlineDatepicker(target, inst); + } + }, + + /* Create a new instance object. */ + _newInst: function(target, inline) { + var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars + return {id: id, input: target, // associated target + selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection + drawMonth: 0, drawYear: 0, // month being drawn + inline: inline, // is datepicker inline or not + dpDiv: (!inline ? this.dpDiv : // presentation div + bindHover($('
')))}; + }, + + /* Attach the date picker to an input field. */ + _connectDatepicker: function(target, inst) { + var input = $(target); + inst.append = $([]); + inst.trigger = $([]); + if (input.hasClass(this.markerClassName)) + return; + this._attachments(input, inst); + input.addClass(this.markerClassName).keydown(this._doKeyDown). + keypress(this._doKeyPress).keyup(this._doKeyUp). + bind("setData.datepicker", function(event, key, value) { + inst.settings[key] = value; + }).bind("getData.datepicker", function(event, key) { + return this._get(inst, key); + }); + this._autoSize(inst); + $.data(target, PROP_NAME, inst); + //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665) + if( inst.settings.disabled ) { + this._disableDatepicker( target ); + } + }, + + /* Make attachments based on settings. */ + _attachments: function(input, inst) { + var appendText = this._get(inst, 'appendText'); + var isRTL = this._get(inst, 'isRTL'); + if (inst.append) + inst.append.remove(); + if (appendText) { + inst.append = $('' + appendText + ''); + input[isRTL ? 'before' : 'after'](inst.append); + } + input.unbind('focus', this._showDatepicker); + if (inst.trigger) + inst.trigger.remove(); + var showOn = this._get(inst, 'showOn'); + if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field + input.focus(this._showDatepicker); + if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked + var buttonText = this._get(inst, 'buttonText'); + var buttonImage = this._get(inst, 'buttonImage'); + inst.trigger = $(this._get(inst, 'buttonImageOnly') ? + $('').addClass(this._triggerClass). + attr({ src: buttonImage, alt: buttonText, title: buttonText }) : + $('').addClass(this._triggerClass). + html(buttonImage == '' ? buttonText : $('').attr( + { src:buttonImage, alt:buttonText, title:buttonText }))); + input[isRTL ? 'before' : 'after'](inst.trigger); + inst.trigger.click(function() { + if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0]) + $.datepicker._hideDatepicker(); + else if ($.datepicker._datepickerShowing && $.datepicker._lastInput != input[0]) { + $.datepicker._hideDatepicker(); + $.datepicker._showDatepicker(input[0]); + } else + $.datepicker._showDatepicker(input[0]); + return false; + }); + } + }, + + /* Apply the maximum length for the date format. */ + _autoSize: function(inst) { + if (this._get(inst, 'autoSize') && !inst.inline) { + var date = new Date(2009, 12 - 1, 20); // Ensure double digits + var dateFormat = this._get(inst, 'dateFormat'); + if (dateFormat.match(/[DM]/)) { + var findMax = function(names) { + var max = 0; + var maxI = 0; + for (var i = 0; i < names.length; i++) { + if (names[i].length > max) { + max = names[i].length; + maxI = i; + } + } + return maxI; + }; + date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ? + 'monthNames' : 'monthNamesShort')))); + date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ? + 'dayNames' : 'dayNamesShort'))) + 20 - date.getDay()); + } + inst.input.attr('size', this._formatDate(inst, date).length); + } + }, + + /* Attach an inline date picker to a div. */ + _inlineDatepicker: function(target, inst) { + var divSpan = $(target); + if (divSpan.hasClass(this.markerClassName)) + return; + divSpan.addClass(this.markerClassName).append(inst.dpDiv). + bind("setData.datepicker", function(event, key, value){ + inst.settings[key] = value; + }).bind("getData.datepicker", function(event, key){ + return this._get(inst, key); + }); + $.data(target, PROP_NAME, inst); + this._setDate(inst, this._getDefaultDate(inst), true); + this._updateDatepicker(inst); + this._updateAlternate(inst); + //If disabled option is true, disable the datepicker before showing it (see ticket #5665) + if( inst.settings.disabled ) { + this._disableDatepicker( target ); + } + // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements + // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height + inst.dpDiv.css( "display", "block" ); + }, + + /* Pop-up the date picker in a "dialog" box. + @param input element - ignored + @param date string or Date - the initial date to display + @param onSelect function - the function to call when a date is selected + @param settings object - update the dialog date picker instance's settings (anonymous object) + @param pos int[2] - coordinates for the dialog's position within the screen or + event - with x/y coordinates or + leave empty for default (screen centre) + @return the manager object */ + _dialogDatepicker: function(input, date, onSelect, settings, pos) { + var inst = this._dialogInst; // internal instance + if (!inst) { + this.uuid += 1; + var id = 'dp' + this.uuid; + this._dialogInput = $(''); + this._dialogInput.keydown(this._doKeyDown); + $('body').append(this._dialogInput); + inst = this._dialogInst = this._newInst(this._dialogInput, false); + inst.settings = {}; + $.data(this._dialogInput[0], PROP_NAME, inst); + } + extendRemove(inst.settings, settings || {}); + date = (date && date.constructor == Date ? this._formatDate(inst, date) : date); + this._dialogInput.val(date); + + this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); + if (!this._pos) { + var browserWidth = document.documentElement.clientWidth; + var browserHeight = document.documentElement.clientHeight; + var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; + var scrollY = document.documentElement.scrollTop || document.body.scrollTop; + this._pos = // should use actual width/height below + [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; + } + + // move input on screen for focus, but hidden behind dialog + this._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px'); + inst.settings.onSelect = onSelect; + this._inDialog = true; + this.dpDiv.addClass(this._dialogClass); + this._showDatepicker(this._dialogInput[0]); + if ($.blockUI) + $.blockUI(this.dpDiv); + $.data(this._dialogInput[0], PROP_NAME, inst); + return this; + }, + + /* Detach a datepicker from its control. + @param target element - the target input field or division or span */ + _destroyDatepicker: function(target) { + var $target = $(target); + var inst = $.data(target, PROP_NAME); + if (!$target.hasClass(this.markerClassName)) { + return; + } + var nodeName = target.nodeName.toLowerCase(); + $.removeData(target, PROP_NAME); + if (nodeName == 'input') { + inst.append.remove(); + inst.trigger.remove(); + $target.removeClass(this.markerClassName). + unbind('focus', this._showDatepicker). + unbind('keydown', this._doKeyDown). + unbind('keypress', this._doKeyPress). + unbind('keyup', this._doKeyUp); + } else if (nodeName == 'div' || nodeName == 'span') + $target.removeClass(this.markerClassName).empty(); + }, + + /* Enable the date picker to a jQuery selection. + @param target element - the target input field or division or span */ + _enableDatepicker: function(target) { + var $target = $(target); + var inst = $.data(target, PROP_NAME); + if (!$target.hasClass(this.markerClassName)) { + return; + } + var nodeName = target.nodeName.toLowerCase(); + if (nodeName == 'input') { + target.disabled = false; + inst.trigger.filter('button'). + each(function() { this.disabled = false; }).end(). + filter('img').css({opacity: '1.0', cursor: ''}); + } + else if (nodeName == 'div' || nodeName == 'span') { + var inline = $target.children('.' + this._inlineClass); + inline.children().removeClass('ui-state-disabled'); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + removeAttr("disabled"); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value == target ? null : value); }); // delete entry + }, + + /* Disable the date picker to a jQuery selection. + @param target element - the target input field or division or span */ + _disableDatepicker: function(target) { + var $target = $(target); + var inst = $.data(target, PROP_NAME); + if (!$target.hasClass(this.markerClassName)) { + return; + } + var nodeName = target.nodeName.toLowerCase(); + if (nodeName == 'input') { + target.disabled = true; + inst.trigger.filter('button'). + each(function() { this.disabled = true; }).end(). + filter('img').css({opacity: '0.5', cursor: 'default'}); + } + else if (nodeName == 'div' || nodeName == 'span') { + var inline = $target.children('.' + this._inlineClass); + inline.children().addClass('ui-state-disabled'); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + attr("disabled", "disabled"); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value == target ? null : value); }); // delete entry + this._disabledInputs[this._disabledInputs.length] = target; + }, + + /* Is the first field in a jQuery collection disabled as a datepicker? + @param target element - the target input field or division or span + @return boolean - true if disabled, false if enabled */ + _isDisabledDatepicker: function(target) { + if (!target) { + return false; + } + for (var i = 0; i < this._disabledInputs.length; i++) { + if (this._disabledInputs[i] == target) + return true; + } + return false; + }, + + /* Retrieve the instance data for the target control. + @param target element - the target input field or division or span + @return object - the associated instance data + @throws error if a jQuery problem getting data */ + _getInst: function(target) { + try { + return $.data(target, PROP_NAME); + } + catch (err) { + throw 'Missing instance data for this datepicker'; + } + }, + + /* Update or retrieve the settings for a date picker attached to an input field or division. + @param target element - the target input field or division or span + @param name object - the new settings to update or + string - the name of the setting to change or retrieve, + when retrieving also 'all' for all instance settings or + 'defaults' for all global defaults + @param value any - the new value for the setting + (omit if above is an object or to retrieve a value) */ + _optionDatepicker: function(target, name, value) { + var inst = this._getInst(target); + if (arguments.length == 2 && typeof name == 'string') { + return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) : + (inst ? (name == 'all' ? $.extend({}, inst.settings) : + this._get(inst, name)) : null)); + } + var settings = name || {}; + if (typeof name == 'string') { + settings = {}; + settings[name] = value; + } + if (inst) { + if (this._curInst == inst) { + this._hideDatepicker(); + } + var date = this._getDateDatepicker(target, true); + var minDate = this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); + extendRemove(inst.settings, settings); + // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided + if (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined) + inst.settings.minDate = this._formatDate(inst, minDate); + if (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined) + inst.settings.maxDate = this._formatDate(inst, maxDate); + this._attachments($(target), inst); + this._autoSize(inst); + this._setDate(inst, date); + this._updateAlternate(inst); + this._updateDatepicker(inst); + } + }, + + // change method deprecated + _changeDatepicker: function(target, name, value) { + this._optionDatepicker(target, name, value); + }, + + /* Redraw the date picker attached to an input field or division. + @param target element - the target input field or division or span */ + _refreshDatepicker: function(target) { + var inst = this._getInst(target); + if (inst) { + this._updateDatepicker(inst); + } + }, + + /* Set the dates for a jQuery selection. + @param target element - the target input field or division or span + @param date Date - the new date */ + _setDateDatepicker: function(target, date) { + var inst = this._getInst(target); + if (inst) { + this._setDate(inst, date); + this._updateDatepicker(inst); + this._updateAlternate(inst); + } + }, + + /* Get the date(s) for the first entry in a jQuery selection. + @param target element - the target input field or division or span + @param noDefault boolean - true if no default date is to be used + @return Date - the current date */ + _getDateDatepicker: function(target, noDefault) { + var inst = this._getInst(target); + if (inst && !inst.inline) + this._setDateFromField(inst, noDefault); + return (inst ? this._getDate(inst) : null); + }, + + /* Handle keystrokes. */ + _doKeyDown: function(event) { + var inst = $.datepicker._getInst(event.target); + var handled = true; + var isRTL = inst.dpDiv.is('.ui-datepicker-rtl'); + inst._keyEvent = true; + if ($.datepicker._datepickerShowing) + switch (event.keyCode) { + case 9: $.datepicker._hideDatepicker(); + handled = false; + break; // hide on tab out + case 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' + + $.datepicker._currentClass + ')', inst.dpDiv); + if (sel[0]) + $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); + var onSelect = $.datepicker._get(inst, 'onSelect'); + if (onSelect) { + var dateStr = $.datepicker._formatDate(inst); + + // trigger custom callback + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); + } + else + $.datepicker._hideDatepicker(); + return false; // don't submit the form + break; // select the value on enter + case 27: $.datepicker._hideDatepicker(); + break; // hide on escape + case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, 'stepBigMonths') : + -$.datepicker._get(inst, 'stepMonths')), 'M'); + break; // previous month/year on page up/+ ctrl + case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, 'stepBigMonths') : + +$.datepicker._get(inst, 'stepMonths')), 'M'); + break; // next month/year on page down/+ ctrl + case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target); + handled = event.ctrlKey || event.metaKey; + break; // clear on ctrl or command +end + case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target); + handled = event.ctrlKey || event.metaKey; + break; // current on ctrl or command +home + case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D'); + handled = event.ctrlKey || event.metaKey; + // -1 day on ctrl or command +left + if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, 'stepBigMonths') : + -$.datepicker._get(inst, 'stepMonths')), 'M'); + // next month/year on alt +left on Mac + break; + case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D'); + handled = event.ctrlKey || event.metaKey; + break; // -1 week on ctrl or command +up + case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D'); + handled = event.ctrlKey || event.metaKey; + // +1 day on ctrl or command +right + if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, 'stepBigMonths') : + +$.datepicker._get(inst, 'stepMonths')), 'M'); + // next month/year on alt +right + break; + case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D'); + handled = event.ctrlKey || event.metaKey; + break; // +1 week on ctrl or command +down + default: handled = false; + } + else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home + $.datepicker._showDatepicker(this); + else { + handled = false; + } + if (handled) { + event.preventDefault(); + event.stopPropagation(); + } + }, + + /* Filter entered characters - based on date format. */ + _doKeyPress: function(event) { + var inst = $.datepicker._getInst(event.target); + if ($.datepicker._get(inst, 'constrainInput')) { + var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')); + var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode); + return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1); + } + }, + + /* Synchronise manual entry and field/alternate field. */ + _doKeyUp: function(event) { + var inst = $.datepicker._getInst(event.target); + if (inst.input.val() != inst.lastVal) { + try { + var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'), + (inst.input ? inst.input.val() : null), + $.datepicker._getFormatConfig(inst)); + if (date) { // only if valid + $.datepicker._setDateFromField(inst); + $.datepicker._updateAlternate(inst); + $.datepicker._updateDatepicker(inst); + } + } + catch (err) { + $.datepicker.log(err); + } + } + return true; + }, + + /* Pop-up the date picker for a given input field. + If false returned from beforeShow event handler do not show. + @param input element - the input field attached to the date picker or + event - if triggered by focus */ + _showDatepicker: function(input) { + input = input.target || input; + if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger + input = $('input', input.parentNode)[0]; + if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here + return; + var inst = $.datepicker._getInst(input); + if ($.datepicker._curInst && $.datepicker._curInst != inst) { + $.datepicker._curInst.dpDiv.stop(true, true); + if ( inst && $.datepicker._datepickerShowing ) { + $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] ); + } + } + var beforeShow = $.datepicker._get(inst, 'beforeShow'); + var beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {}; + if(beforeShowSettings === false){ + //false + return; + } + extendRemove(inst.settings, beforeShowSettings); + inst.lastVal = null; + $.datepicker._lastInput = input; + $.datepicker._setDateFromField(inst); + if ($.datepicker._inDialog) // hide cursor + input.value = ''; + if (!$.datepicker._pos) { // position below input + $.datepicker._pos = $.datepicker._findPos(input); + $.datepicker._pos[1] += input.offsetHeight; // add the height + } + var isFixed = false; + $(input).parents().each(function() { + isFixed |= $(this).css('position') == 'fixed'; + return !isFixed; + }); + if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled + $.datepicker._pos[0] -= document.documentElement.scrollLeft; + $.datepicker._pos[1] -= document.documentElement.scrollTop; + } + var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; + $.datepicker._pos = null; + //to avoid flashes on Firefox + inst.dpDiv.empty(); + // determine sizing offscreen + inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'}); + $.datepicker._updateDatepicker(inst); + // fix width for dynamic number of date pickers + // and adjust position before showing + offset = $.datepicker._checkOffset(inst, offset, isFixed); + inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? + 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none', + left: offset.left + 'px', top: offset.top + 'px'}); + if (!inst.inline) { + var showAnim = $.datepicker._get(inst, 'showAnim'); + var duration = $.datepicker._get(inst, 'duration'); + var postProcess = function() { + var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only + if( !! cover.length ){ + var borders = $.datepicker._getBorders(inst.dpDiv); + cover.css({left: -borders[0], top: -borders[1], + width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()}); + } + }; + inst.dpDiv.zIndex($(input).zIndex()+1); + $.datepicker._datepickerShowing = true; + if ($.effects && $.effects[showAnim]) + inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess); + else + inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess); + if (!showAnim || !duration) + postProcess(); + if (inst.input.is(':visible') && !inst.input.is(':disabled')) + inst.input.focus(); + $.datepicker._curInst = inst; + } + }, + + /* Generate the date picker content. */ + _updateDatepicker: function(inst) { + var self = this; + self.maxRows = 4; //Reset the max number of rows being displayed (see #7043) + var borders = $.datepicker._getBorders(inst.dpDiv); + instActive = inst; // for delegate hover events + inst.dpDiv.empty().append(this._generateHTML(inst)); + this._attachHandlers(inst); + var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only + if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6 + cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()}) + } + inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover(); + var numMonths = this._getNumberOfMonths(inst); + var cols = numMonths[1]; + var width = 17; + inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width(''); + if (cols > 1) + inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em'); + inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') + + 'Class']('ui-datepicker-multi'); + inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') + + 'Class']('ui-datepicker-rtl'); + if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input && + // #6694 - don't focus the input if it's already focused + // this breaks the change event in IE + inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement) + inst.input.focus(); + // deffered render of the years select (to avoid flashes on Firefox) + if( inst.yearshtml ){ + var origyearshtml = inst.yearshtml; + setTimeout(function(){ + //assure that inst.yearshtml didn't change. + if( origyearshtml === inst.yearshtml && inst.yearshtml ){ + inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml); + } + origyearshtml = inst.yearshtml = null; + }, 0); + } + }, + + /* Retrieve the size of left and top borders for an element. + @param elem (jQuery object) the element of interest + @return (number[2]) the left and top borders */ + _getBorders: function(elem) { + var convert = function(value) { + return {thin: 1, medium: 2, thick: 3}[value] || value; + }; + return [parseFloat(convert(elem.css('border-left-width'))), + parseFloat(convert(elem.css('border-top-width')))]; + }, + + /* Check positioning to remain on screen. */ + _checkOffset: function(inst, offset, isFixed) { + var dpWidth = inst.dpDiv.outerWidth(); + var dpHeight = inst.dpDiv.outerHeight(); + var inputWidth = inst.input ? inst.input.outerWidth() : 0; + var inputHeight = inst.input ? inst.input.outerHeight() : 0; + var viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()); + var viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop()); + + offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0); + offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0; + offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; + + // now check if datepicker is showing outside window viewport - move to a better place if so. + offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? + Math.abs(offset.left + dpWidth - viewWidth) : 0); + offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? + Math.abs(dpHeight + inputHeight) : 0); + + return offset; + }, + + /* Find an object's position on the screen. */ + _findPos: function(obj) { + var inst = this._getInst(obj); + var isRTL = this._get(inst, 'isRTL'); + while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) { + obj = obj[isRTL ? 'previousSibling' : 'nextSibling']; + } + var position = $(obj).offset(); + return [position.left, position.top]; + }, + + /* Hide the date picker from view. + @param input element - the input field attached to the date picker */ + _hideDatepicker: function(input) { + var inst = this._curInst; + if (!inst || (input && inst != $.data(input, PROP_NAME))) + return; + if (this._datepickerShowing) { + var showAnim = this._get(inst, 'showAnim'); + var duration = this._get(inst, 'duration'); + var postProcess = function() { + $.datepicker._tidyDialog(inst); + }; + if ($.effects && $.effects[showAnim]) + inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess); + else + inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' : + (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess); + if (!showAnim) + postProcess(); + this._datepickerShowing = false; + var onClose = this._get(inst, 'onClose'); + if (onClose) + onClose.apply((inst.input ? inst.input[0] : null), + [(inst.input ? inst.input.val() : ''), inst]); + this._lastInput = null; + if (this._inDialog) { + this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' }); + if ($.blockUI) { + $.unblockUI(); + $('body').append(this.dpDiv); + } + } + this._inDialog = false; + } + }, + + /* Tidy up after a dialog display. */ + _tidyDialog: function(inst) { + inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar'); + }, + + /* Close date picker if clicked elsewhere. */ + _checkExternalClick: function(event) { + if (!$.datepicker._curInst) + return; + + var $target = $(event.target), + inst = $.datepicker._getInst($target[0]); + + if ( ( ( $target[0].id != $.datepicker._mainDivId && + $target.parents('#' + $.datepicker._mainDivId).length == 0 && + !$target.hasClass($.datepicker.markerClassName) && + !$target.closest("." + $.datepicker._triggerClass).length && + $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) || + ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != inst ) ) + $.datepicker._hideDatepicker(); + }, + + /* Adjust one of the date sub-fields. */ + _adjustDate: function(id, offset, period) { + var target = $(id); + var inst = this._getInst(target[0]); + if (this._isDisabledDatepicker(target[0])) { + return; + } + this._adjustInstDate(inst, offset + + (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning + period); + this._updateDatepicker(inst); + }, + + /* Action for current link. */ + _gotoToday: function(id) { + var target = $(id); + var inst = this._getInst(target[0]); + if (this._get(inst, 'gotoCurrent') && inst.currentDay) { + inst.selectedDay = inst.currentDay; + inst.drawMonth = inst.selectedMonth = inst.currentMonth; + inst.drawYear = inst.selectedYear = inst.currentYear; + } + else { + var date = new Date(); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + } + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Action for selecting a new month/year. */ + _selectMonthYear: function(id, select, period) { + var target = $(id); + var inst = this._getInst(target[0]); + inst['selected' + (period == 'M' ? 'Month' : 'Year')] = + inst['draw' + (period == 'M' ? 'Month' : 'Year')] = + parseInt(select.options[select.selectedIndex].value,10); + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Action for selecting a day. */ + _selectDay: function(id, month, year, td) { + var target = $(id); + if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { + return; + } + var inst = this._getInst(target[0]); + inst.selectedDay = inst.currentDay = $('a', td).html(); + inst.selectedMonth = inst.currentMonth = month; + inst.selectedYear = inst.currentYear = year; + this._selectDate(id, this._formatDate(inst, + inst.currentDay, inst.currentMonth, inst.currentYear)); + }, + + /* Erase the input field and hide the date picker. */ + _clearDate: function(id) { + var target = $(id); + var inst = this._getInst(target[0]); + this._selectDate(target, ''); + }, + + /* Update the input field with the selected date. */ + _selectDate: function(id, dateStr) { + var target = $(id); + var inst = this._getInst(target[0]); + dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); + if (inst.input) + inst.input.val(dateStr); + this._updateAlternate(inst); + var onSelect = this._get(inst, 'onSelect'); + if (onSelect) + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback + else if (inst.input) + inst.input.trigger('change'); // fire the change event + if (inst.inline) + this._updateDatepicker(inst); + else { + this._hideDatepicker(); + this._lastInput = inst.input[0]; + if (typeof(inst.input[0]) != 'object') + inst.input.focus(); // restore focus + this._lastInput = null; + } + }, + + /* Update any alternate field to synchronise with the main field. */ + _updateAlternate: function(inst) { + var altField = this._get(inst, 'altField'); + if (altField) { // update alternate field too + var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat'); + var date = this._getDate(inst); + var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); + $(altField).each(function() { $(this).val(dateStr); }); + } + }, + + /* Set as beforeShowDay function to prevent selection of weekends. + @param date Date - the date to customise + @return [boolean, string] - is this date selectable?, what is its CSS class? */ + noWeekends: function(date) { + var day = date.getDay(); + return [(day > 0 && day < 6), '']; + }, + + /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. + @param date Date - the date to get the week for + @return number - the number of the week within the year that contains this date */ + iso8601Week: function(date) { + var checkDate = new Date(date.getTime()); + // Find Thursday of this week starting on Monday + checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); + var time = checkDate.getTime(); + checkDate.setMonth(0); // Compare with Jan 1 + checkDate.setDate(1); + return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; + }, + + /* Parse a string value into a date object. + See formatDate below for the possible formats. + + @param format string - the expected format of the date + @param value string - the date in the above format + @param settings Object - attributes include: + shortYearCutoff number - the cutoff year for determining the century (optional) + dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + dayNames string[7] - names of the days from Sunday (optional) + monthNamesShort string[12] - abbreviated names of the months (optional) + monthNames string[12] - names of the months (optional) + @return Date - the extracted date value or null if value is blank */ + parseDate: function (format, value, settings) { + if (format == null || value == null) + throw 'Invalid arguments'; + value = (typeof value == 'object' ? value.toString() : value + ''); + if (value == '') + return null; + var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff; + shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort; + var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames; + var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort; + var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames; + var year = -1; + var month = -1; + var day = -1; + var doy = -1; + var literal = false; + // Check whether a format character is doubled + var lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match); + if (matches) + iFormat++; + return matches; + }; + // Extract a number from the string value + var getNumber = function(match) { + var isDoubled = lookAhead(match); + var size = (match == '@' ? 14 : (match == '!' ? 20 : + (match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2)))); + var digits = new RegExp('^\\d{1,' + size + '}'); + var num = value.substring(iValue).match(digits); + if (!num) + throw 'Missing number at position ' + iValue; + iValue += num[0].length; + return parseInt(num[0], 10); + }; + // Extract a name from the string value and convert to an index + var getName = function(match, shortNames, longNames) { + var names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) { + return [ [k, v] ]; + }).sort(function (a, b) { + return -(a[1].length - b[1].length); + }); + var index = -1; + $.each(names, function (i, pair) { + var name = pair[1]; + if (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) { + index = pair[0]; + iValue += name.length; + return false; + } + }); + if (index != -1) + return index + 1; + else + throw 'Unknown name at position ' + iValue; + }; + // Confirm that a literal character matches the string value + var checkLiteral = function() { + if (value.charAt(iValue) != format.charAt(iFormat)) + throw 'Unexpected literal at position ' + iValue; + iValue++; + }; + var iValue = 0; + for (var iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) + if (format.charAt(iFormat) == "'" && !lookAhead("'")) + literal = false; + else + checkLiteral(); + else + switch (format.charAt(iFormat)) { + case 'd': + day = getNumber('d'); + break; + case 'D': + getName('D', dayNamesShort, dayNames); + break; + case 'o': + doy = getNumber('o'); + break; + case 'm': + month = getNumber('m'); + break; + case 'M': + month = getName('M', monthNamesShort, monthNames); + break; + case 'y': + year = getNumber('y'); + break; + case '@': + var date = new Date(getNumber('@')); + year = date.getFullYear(); + month = date.getMonth() + 1; + day = date.getDate(); + break; + case '!': + var date = new Date((getNumber('!') - this._ticksTo1970) / 10000); + year = date.getFullYear(); + month = date.getMonth() + 1; + day = date.getDate(); + break; + case "'": + if (lookAhead("'")) + checkLiteral(); + else + literal = true; + break; + default: + checkLiteral(); + } + } + if (iValue < value.length){ + throw "Extra/unparsed characters found in date: " + value.substring(iValue); + } + if (year == -1) + year = new Date().getFullYear(); + else if (year < 100) + year += new Date().getFullYear() - new Date().getFullYear() % 100 + + (year <= shortYearCutoff ? 0 : -100); + if (doy > -1) { + month = 1; + day = doy; + do { + var dim = this._getDaysInMonth(year, month - 1); + if (day <= dim) + break; + month++; + day -= dim; + } while (true); + } + var date = this._daylightSavingAdjust(new Date(year, month - 1, day)); + if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day) + throw 'Invalid date'; // E.g. 31/02/00 + return date; + }, + + /* Standard date formats. */ + ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601) + COOKIE: 'D, dd M yy', + ISO_8601: 'yy-mm-dd', + RFC_822: 'D, d M y', + RFC_850: 'DD, dd-M-y', + RFC_1036: 'D, d M y', + RFC_1123: 'D, d M yy', + RFC_2822: 'D, d M yy', + RSS: 'D, d M y', // RFC 822 + TICKS: '!', + TIMESTAMP: '@', + W3C: 'yy-mm-dd', // ISO 8601 + + _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000), + + /* Format a date object into a string value. + The format can be combinations of the following: + d - day of month (no leading zero) + dd - day of month (two digit) + o - day of year (no leading zeros) + oo - day of year (three digit) + D - day name short + DD - day name long + m - month of year (no leading zero) + mm - month of year (two digit) + M - month name short + MM - month name long + y - year (two digit) + yy - year (four digit) + @ - Unix timestamp (ms since 01/01/1970) + ! - Windows ticks (100ns since 01/01/0001) + '...' - literal text + '' - single quote + + @param format string - the desired format of the date + @param date Date - the date value to format + @param settings Object - attributes include: + dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + dayNames string[7] - names of the days from Sunday (optional) + monthNamesShort string[12] - abbreviated names of the months (optional) + monthNames string[12] - names of the months (optional) + @return string - the date in the above format */ + formatDate: function (format, date, settings) { + if (!date) + return ''; + var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort; + var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames; + var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort; + var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames; + // Check whether a format character is doubled + var lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match); + if (matches) + iFormat++; + return matches; + }; + // Format a number, with leading zero if necessary + var formatNumber = function(match, value, len) { + var num = '' + value; + if (lookAhead(match)) + while (num.length < len) + num = '0' + num; + return num; + }; + // Format a name, short or long as requested + var formatName = function(match, value, shortNames, longNames) { + return (lookAhead(match) ? longNames[value] : shortNames[value]); + }; + var output = ''; + var literal = false; + if (date) + for (var iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) + if (format.charAt(iFormat) == "'" && !lookAhead("'")) + literal = false; + else + output += format.charAt(iFormat); + else + switch (format.charAt(iFormat)) { + case 'd': + output += formatNumber('d', date.getDate(), 2); + break; + case 'D': + output += formatName('D', date.getDay(), dayNamesShort, dayNames); + break; + case 'o': + output += formatNumber('o', + Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3); + break; + case 'm': + output += formatNumber('m', date.getMonth() + 1, 2); + break; + case 'M': + output += formatName('M', date.getMonth(), monthNamesShort, monthNames); + break; + case 'y': + output += (lookAhead('y') ? date.getFullYear() : + (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100); + break; + case '@': + output += date.getTime(); + break; + case '!': + output += date.getTime() * 10000 + this._ticksTo1970; + break; + case "'": + if (lookAhead("'")) + output += "'"; + else + literal = true; + break; + default: + output += format.charAt(iFormat); + } + } + return output; + }, + + /* Extract all possible characters from the date format. */ + _possibleChars: function (format) { + var chars = ''; + var literal = false; + // Check whether a format character is doubled + var lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match); + if (matches) + iFormat++; + return matches; + }; + for (var iFormat = 0; iFormat < format.length; iFormat++) + if (literal) + if (format.charAt(iFormat) == "'" && !lookAhead("'")) + literal = false; + else + chars += format.charAt(iFormat); + else + switch (format.charAt(iFormat)) { + case 'd': case 'm': case 'y': case '@': + chars += '0123456789'; + break; + case 'D': case 'M': + return null; // Accept anything + case "'": + if (lookAhead("'")) + chars += "'"; + else + literal = true; + break; + default: + chars += format.charAt(iFormat); + } + return chars; + }, + + /* Get a setting value, defaulting if necessary. */ + _get: function(inst, name) { + return inst.settings[name] !== undefined ? + inst.settings[name] : this._defaults[name]; + }, + + /* Parse existing date and initialise date picker. */ + _setDateFromField: function(inst, noDefault) { + if (inst.input.val() == inst.lastVal) { + return; + } + var dateFormat = this._get(inst, 'dateFormat'); + var dates = inst.lastVal = inst.input ? inst.input.val() : null; + var date, defaultDate; + date = defaultDate = this._getDefaultDate(inst); + var settings = this._getFormatConfig(inst); + try { + date = this.parseDate(dateFormat, dates, settings) || defaultDate; + } catch (event) { + this.log(event); + dates = (noDefault ? '' : dates); + } + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + inst.currentDay = (dates ? date.getDate() : 0); + inst.currentMonth = (dates ? date.getMonth() : 0); + inst.currentYear = (dates ? date.getFullYear() : 0); + this._adjustInstDate(inst); + }, + + /* Retrieve the default date shown on opening. */ + _getDefaultDate: function(inst) { + return this._restrictMinMax(inst, + this._determineDate(inst, this._get(inst, 'defaultDate'), new Date())); + }, + + /* A date may be specified as an exact value or a relative one. */ + _determineDate: function(inst, date, defaultDate) { + var offsetNumeric = function(offset) { + var date = new Date(); + date.setDate(date.getDate() + offset); + return date; + }; + var offsetString = function(offset) { + try { + return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'), + offset, $.datepicker._getFormatConfig(inst)); + } + catch (e) { + // Ignore + } + var date = (offset.toLowerCase().match(/^c/) ? + $.datepicker._getDate(inst) : null) || new Date(); + var year = date.getFullYear(); + var month = date.getMonth(); + var day = date.getDate(); + var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g; + var matches = pattern.exec(offset); + while (matches) { + switch (matches[2] || 'd') { + case 'd' : case 'D' : + day += parseInt(matches[1],10); break; + case 'w' : case 'W' : + day += parseInt(matches[1],10) * 7; break; + case 'm' : case 'M' : + month += parseInt(matches[1],10); + day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); + break; + case 'y': case 'Y' : + year += parseInt(matches[1],10); + day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); + break; + } + matches = pattern.exec(offset); + } + return new Date(year, month, day); + }; + var newDate = (date == null || date === '' ? defaultDate : (typeof date == 'string' ? offsetString(date) : + (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime())))); + newDate = (newDate && newDate.toString() == 'Invalid Date' ? defaultDate : newDate); + if (newDate) { + newDate.setHours(0); + newDate.setMinutes(0); + newDate.setSeconds(0); + newDate.setMilliseconds(0); + } + return this._daylightSavingAdjust(newDate); + }, + + /* Handle switch to/from daylight saving. + Hours may be non-zero on daylight saving cut-over: + > 12 when midnight changeover, but then cannot generate + midnight datetime, so jump to 1AM, otherwise reset. + @param date (Date) the date to check + @return (Date) the corrected date */ + _daylightSavingAdjust: function(date) { + if (!date) return null; + date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); + return date; + }, + + /* Set the date(s) directly. */ + _setDate: function(inst, date, noChange) { + var clear = !date; + var origMonth = inst.selectedMonth; + var origYear = inst.selectedYear; + var newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date())); + inst.selectedDay = inst.currentDay = newDate.getDate(); + inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); + inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); + if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange) + this._notifyChange(inst); + this._adjustInstDate(inst); + if (inst.input) { + inst.input.val(clear ? '' : this._formatDate(inst)); + } + }, + + /* Retrieve the date(s) directly. */ + _getDate: function(inst) { + var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null : + this._daylightSavingAdjust(new Date( + inst.currentYear, inst.currentMonth, inst.currentDay))); + return startDate; + }, + + /* Attach the onxxx handlers. These are declared statically so + * they work with static code transformers like Caja. + */ + _attachHandlers: function(inst) { + var stepMonths = this._get(inst, 'stepMonths'); + var id = '#' + inst.id; + inst.dpDiv.find('[data-handler]').map(function () { + var handler = { + prev: function () { + window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, -stepMonths, 'M'); + }, + next: function () { + window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, +stepMonths, 'M'); + }, + hide: function () { + window['DP_jQuery_' + dpuuid].datepicker._hideDatepicker(); + }, + today: function () { + window['DP_jQuery_' + dpuuid].datepicker._gotoToday(id); + }, + selectDay: function () { + window['DP_jQuery_' + dpuuid].datepicker._selectDay(id, +this.getAttribute('data-month'), +this.getAttribute('data-year'), this); + return false; + }, + selectMonth: function () { + window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'M'); + return false; + }, + selectYear: function () { + window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'Y'); + return false; + } + }; + $(this).bind(this.getAttribute('data-event'), handler[this.getAttribute('data-handler')]); + }); + }, + + /* Generate the HTML for the current state of the date picker. */ + _generateHTML: function(inst) { + var today = new Date(); + today = this._daylightSavingAdjust( + new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time + var isRTL = this._get(inst, 'isRTL'); + var showButtonPanel = this._get(inst, 'showButtonPanel'); + var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext'); + var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat'); + var numMonths = this._getNumberOfMonths(inst); + var showCurrentAtPos = this._get(inst, 'showCurrentAtPos'); + var stepMonths = this._get(inst, 'stepMonths'); + var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1); + var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : + new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + var minDate = this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); + var drawMonth = inst.drawMonth - showCurrentAtPos; + var drawYear = inst.drawYear; + if (drawMonth < 0) { + drawMonth += 12; + drawYear--; + } + if (maxDate) { + var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), + maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate())); + maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); + while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { + drawMonth--; + if (drawMonth < 0) { + drawMonth = 11; + drawYear--; + } + } + } + inst.drawMonth = drawMonth; + inst.drawYear = drawYear; + var prevText = this._get(inst, 'prevText'); + prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), + this._getFormatConfig(inst))); + var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? + '
' + prevText + '' : + (hideIfNoPrevNext ? '' : '' + prevText + '')); + var nextText = this._get(inst, 'nextText'); + nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), + this._getFormatConfig(inst))); + var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? + '' + nextText + '' : + (hideIfNoPrevNext ? '' : '' + nextText + '')); + var currentText = this._get(inst, 'currentText'); + var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today); + currentText = (!navigationAsDateFormat ? currentText : + this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); + var controls = (!inst.inline ? '' : ''); + var buttonPanel = (showButtonPanel) ? '
' + (isRTL ? controls : '') + + (this._isInRange(inst, gotoDate) ? '' : '') + (isRTL ? '' : controls) + '
' : ''; + var firstDay = parseInt(this._get(inst, 'firstDay'),10); + firstDay = (isNaN(firstDay) ? 0 : firstDay); + var showWeek = this._get(inst, 'showWeek'); + var dayNames = this._get(inst, 'dayNames'); + var dayNamesShort = this._get(inst, 'dayNamesShort'); + var dayNamesMin = this._get(inst, 'dayNamesMin'); + var monthNames = this._get(inst, 'monthNames'); + var monthNamesShort = this._get(inst, 'monthNamesShort'); + var beforeShowDay = this._get(inst, 'beforeShowDay'); + var showOtherMonths = this._get(inst, 'showOtherMonths'); + var selectOtherMonths = this._get(inst, 'selectOtherMonths'); + var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week; + var defaultDate = this._getDefaultDate(inst); + var html = ''; + for (var row = 0; row < numMonths[0]; row++) { + var group = ''; + this.maxRows = 4; + for (var col = 0; col < numMonths[1]; col++) { + var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); + var cornerClass = ' ui-corner-all'; + var calender = ''; + if (isMultiMonth) { + calender += '
'; + } + calender += '
' + + (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') + + (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') + + this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, + row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers + '
' + + ''; + var thead = (showWeek ? '' : ''); + for (var dow = 0; dow < 7; dow++) { // days of the week + var day = (dow + firstDay) % 7; + thead += '= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' + + '' + dayNamesMin[day] + ''; + } + calender += thead + ''; + var daysInMonth = this._getDaysInMonth(drawYear, drawMonth); + if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth) + inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); + var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; + var curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate + var numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043) + this.maxRows = numRows; + var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); + for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows + calender += ''; + var tbody = (!showWeek ? '' : ''); + for (var dow = 0; dow < 7; dow++) { // create date picker days + var daySettings = (beforeShowDay ? + beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']); + var otherMonth = (printDate.getMonth() != drawMonth); + var unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] || + (minDate && printDate < minDate) || (maxDate && printDate > maxDate); + tbody += ''; // display selectable date + printDate.setDate(printDate.getDate() + 1); + printDate = this._daylightSavingAdjust(printDate); + } + calender += tbody + ''; + } + drawMonth++; + if (drawMonth > 11) { + drawMonth = 0; + drawYear++; + } + calender += '
' + this._get(inst, 'weekHeader') + '
' + + this._get(inst, 'calculateWeek')(printDate) + '' + // actions + (otherMonth && !showOtherMonths ? ' ' : // display for other months + (unselectable ? '' + printDate.getDate() + '' : '' + printDate.getDate() + '')) + '
' + (isMultiMonth ? '
' + + ((numMonths[0] > 0 && col == numMonths[1]-1) ? '
' : '') : ''); + group += calender; + } + html += group; + } + html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ? + '' : ''); + inst._keyEvent = false; + return html; + }, + + /* Generate the month and year header. */ + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, + secondary, monthNames, monthNamesShort) { + var changeMonth = this._get(inst, 'changeMonth'); + var changeYear = this._get(inst, 'changeYear'); + var showMonthAfterYear = this._get(inst, 'showMonthAfterYear'); + var html = '
'; + var monthHtml = ''; + // month selection + if (secondary || !changeMonth) + monthHtml += '' + monthNames[drawMonth] + ''; + else { + var inMinYear = (minDate && minDate.getFullYear() == drawYear); + var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); + monthHtml += ''; + } + if (!showMonthAfterYear) + html += monthHtml + (secondary || !(changeMonth && changeYear) ? ' ' : ''); + // year selection + if ( !inst.yearshtml ) { + inst.yearshtml = ''; + if (secondary || !changeYear) + html += '' + drawYear + ''; + else { + // determine range of years to display + var years = this._get(inst, 'yearRange').split(':'); + var thisYear = new Date().getFullYear(); + var determineYear = function(value) { + var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) : + (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) : + parseInt(value, 10))); + return (isNaN(year) ? thisYear : year); + }; + var year = determineYear(years[0]); + var endYear = Math.max(year, determineYear(years[1] || '')); + year = (minDate ? Math.max(year, minDate.getFullYear()) : year); + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); + inst.yearshtml += ''; + + html += inst.yearshtml; + inst.yearshtml = null; + } + } + html += this._get(inst, 'yearSuffix'); + if (showMonthAfterYear) + html += (secondary || !(changeMonth && changeYear) ? ' ' : '') + monthHtml; + html += '
'; // Close datepicker_header + return html; + }, + + /* Adjust one of the date sub-fields. */ + _adjustInstDate: function(inst, offset, period) { + var year = inst.drawYear + (period == 'Y' ? offset : 0); + var month = inst.drawMonth + (period == 'M' ? offset : 0); + var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + + (period == 'D' ? offset : 0); + var date = this._restrictMinMax(inst, + this._daylightSavingAdjust(new Date(year, month, day))); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + if (period == 'M' || period == 'Y') + this._notifyChange(inst); + }, + + /* Ensure a date is within any min/max bounds. */ + _restrictMinMax: function(inst, date) { + var minDate = this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); + var newDate = (minDate && date < minDate ? minDate : date); + newDate = (maxDate && newDate > maxDate ? maxDate : newDate); + return newDate; + }, + + /* Notify change of month/year. */ + _notifyChange: function(inst) { + var onChange = this._get(inst, 'onChangeMonthYear'); + if (onChange) + onChange.apply((inst.input ? inst.input[0] : null), + [inst.selectedYear, inst.selectedMonth + 1, inst]); + }, + + /* Determine the number of months to show. */ + _getNumberOfMonths: function(inst) { + var numMonths = this._get(inst, 'numberOfMonths'); + return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths)); + }, + + /* Determine the current maximum date - ensure no time components are set. */ + _getMinMaxDate: function(inst, minMax) { + return this._determineDate(inst, this._get(inst, minMax + 'Date'), null); + }, + + /* Find the number of days in a given month. */ + _getDaysInMonth: function(year, month) { + return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); + }, + + /* Find the day of the week of the first of a month. */ + _getFirstDayOfMonth: function(year, month) { + return new Date(year, month, 1).getDay(); + }, + + /* Determines if we should allow a "next/prev" month display change. */ + _canAdjustMonth: function(inst, offset, curYear, curMonth) { + var numMonths = this._getNumberOfMonths(inst); + var date = this._daylightSavingAdjust(new Date(curYear, + curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); + if (offset < 0) + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); + return this._isInRange(inst, date); + }, + + /* Is the given date in the accepted range? */ + _isInRange: function(inst, date) { + var minDate = this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); + return ((!minDate || date.getTime() >= minDate.getTime()) && + (!maxDate || date.getTime() <= maxDate.getTime())); + }, + + /* Provide the configuration settings for formatting/parsing. */ + _getFormatConfig: function(inst) { + var shortYearCutoff = this._get(inst, 'shortYearCutoff'); + shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + return {shortYearCutoff: shortYearCutoff, + dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'), + monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')}; + }, + + /* Format the given date for display. */ + _formatDate: function(inst, day, month, year) { + if (!day) { + inst.currentDay = inst.selectedDay; + inst.currentMonth = inst.selectedMonth; + inst.currentYear = inst.selectedYear; + } + var date = (day ? (typeof day == 'object' ? day : + this._daylightSavingAdjust(new Date(year, month, day))) : + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst)); + } +}); + +/* + * Bind hover events for datepicker elements. + * Done via delegate so the binding only occurs once in the lifetime of the parent div. + * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. + */ +function bindHover(dpDiv) { + var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a'; + return dpDiv.bind('mouseout', function(event) { + var elem = $( event.target ).closest( selector ); + if ( !elem.length ) { + return; + } + elem.removeClass( "ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover" ); + }) + .bind('mouseover', function(event) { + var elem = $( event.target ).closest( selector ); + if ($.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0]) || + !elem.length ) { + return; + } + elem.parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover'); + elem.addClass('ui-state-hover'); + if (elem.hasClass('ui-datepicker-prev')) elem.addClass('ui-datepicker-prev-hover'); + if (elem.hasClass('ui-datepicker-next')) elem.addClass('ui-datepicker-next-hover'); + }); +} + +/* jQuery extend now ignores nulls! */ +function extendRemove(target, props) { + $.extend(target, props); + for (var name in props) + if (props[name] == null || props[name] == undefined) + target[name] = props[name]; + return target; +}; + +/* Determine whether an object is an array. */ +function isArray(a) { + return (a && (($.browser.safari && typeof a == 'object' && a.length) || + (a.constructor && a.constructor.toString().match(/\Array\(\)/)))); +}; + +/* Invoke the datepicker functionality. + @param options string - a command, optionally followed by additional parameters or + Object - settings for attaching new datepicker functionality + @return jQuery object */ +$.fn.datepicker = function(options){ + + /* Verify an empty collection wasn't passed - Fixes #6976 */ + if ( !this.length ) { + return this; + } + + /* Initialise the date picker. */ + if (!$.datepicker.initialized) { + $(document).mousedown($.datepicker._checkExternalClick). + find('body').append($.datepicker.dpDiv); + $.datepicker.initialized = true; + } + + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget')) + return $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this[0]].concat(otherArgs)); + if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') + return $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this[0]].concat(otherArgs)); + return this.each(function() { + typeof options == 'string' ? + $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this].concat(otherArgs)) : + $.datepicker._attachDatepicker(this, options); + }); +}; + +$.datepicker = new Datepicker(); // singleton instance +$.datepicker.initialized = false; +$.datepicker.uuid = new Date().getTime(); +$.datepicker.version = "1.8.22"; + +// Workaround for #4055 +// Add another global to avoid noConflict issues with inline event handlers +window['DP_jQuery_' + dpuuid] = $; + +})(jQuery); \ No newline at end of file diff --git a/bin/web/Calendar/jquery.ui.dialog.css b/bin/web/Calendar/jquery.ui.dialog.css new file mode 100644 index 0000000..bd264da --- /dev/null +++ b/bin/web/Calendar/jquery.ui.dialog.css @@ -0,0 +1,21 @@ +/*! + * jQuery UI Dialog 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/bin/web/Calendar/jquery.ui.progressbar.css b/bin/web/Calendar/jquery.ui.progressbar.css new file mode 100644 index 0000000..8f3774e --- /dev/null +++ b/bin/web/Calendar/jquery.ui.progressbar.css @@ -0,0 +1,11 @@ +/*! + * jQuery UI Progressbar 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; overflow: hidden; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/bin/web/Calendar/jquery.ui.resizable.css b/bin/web/Calendar/jquery.ui.resizable.css new file mode 100644 index 0000000..568b570 --- /dev/null +++ b/bin/web/Calendar/jquery.ui.resizable.css @@ -0,0 +1,20 @@ +/*! + * jQuery UI Resizable 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/bin/web/Calendar/jquery.ui.selectable.css b/bin/web/Calendar/jquery.ui.selectable.css new file mode 100644 index 0000000..54d504b --- /dev/null +++ b/bin/web/Calendar/jquery.ui.selectable.css @@ -0,0 +1,10 @@ +/*! + * jQuery UI Selectable 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } diff --git a/bin/web/Calendar/jquery.ui.slider.css b/bin/web/Calendar/jquery.ui.slider.css new file mode 100644 index 0000000..e0f7bea --- /dev/null +++ b/bin/web/Calendar/jquery.ui.slider.css @@ -0,0 +1,24 @@ +/*! + * jQuery UI Slider 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; } \ No newline at end of file diff --git a/bin/web/Calendar/jquery.ui.tabs.css b/bin/web/Calendar/jquery.ui.tabs.css new file mode 100644 index 0000000..6da4af3 --- /dev/null +++ b/bin/web/Calendar/jquery.ui.tabs.css @@ -0,0 +1,18 @@ +/*! + * jQuery UI Tabs 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/bin/web/Calendar/jquery.ui.theme.css b/bin/web/Calendar/jquery.ui.theme.css new file mode 100644 index 0000000..36b331c --- /dev/null +++ b/bin/web/Calendar/jquery.ui.theme.css @@ -0,0 +1,247 @@ +/*! + * jQuery UI CSS Framework 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/ + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } +.ui-widget-content a { color: #222222/*{fcContent}*/; } +.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } +.ui-widget-header a { color: #222222/*{fcHeader}*/; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; } +.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } +.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; } \ No newline at end of file diff --git a/bin/web/Calendar/jquery.ui.widget.js b/bin/web/Calendar/jquery.ui.widget.js new file mode 100644 index 0000000..8a9cc3f --- /dev/null +++ b/bin/web/Calendar/jquery.ui.widget.js @@ -0,0 +1,272 @@ +/*! + * jQuery UI Widget 1.8.22 + * + * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function( $, undefined ) { + +// jQuery 1.4+ +if ( $.cleanData ) { + var _cleanData = $.cleanData; + $.cleanData = function( elems ) { + for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + try { + $( elem ).triggerHandler( "remove" ); + // http://bugs.jquery.com/ticket/8235 + } catch( e ) {} + } + _cleanData( elems ); + }; +} else { + var _remove = $.fn.remove; + $.fn.remove = function( selector, keepData ) { + return this.each(function() { + if ( !keepData ) { + if ( !selector || $.filter( selector, [ this ] ).length ) { + $( "*", this ).add( [ this ] ).each(function() { + try { + $( this ).triggerHandler( "remove" ); + // http://bugs.jquery.com/ticket/8235 + } catch( e ) {} + }); + } + } + return _remove.call( $(this), selector, keepData ); + }); + }; +} + +$.widget = function( name, base, prototype ) { + var namespace = name.split( "." )[ 0 ], + fullName; + name = name.split( "." )[ 1 ]; + fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + // create selector for plugin + $.expr[ ":" ][ fullName ] = function( elem ) { + return !!$.data( elem, name ); + }; + + $[ namespace ] = $[ namespace ] || {}; + $[ namespace ][ name ] = function( options, element ) { + // allow instantiation without initializing for simple inheritance + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + + var basePrototype = new base(); + // we need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from +// $.each( basePrototype, function( key, val ) { +// if ( $.isPlainObject(val) ) { +// basePrototype[ key ] = $.extend( {}, val ); +// } +// }); + basePrototype.options = $.extend( true, {}, basePrototype.options ); + $[ namespace ][ name ].prototype = $.extend( true, basePrototype, { + namespace: namespace, + widgetName: name, + widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name, + widgetBaseClass: fullName + }, prototype ); + + $.widget.bridge( name, $[ namespace ][ name ] ); +}; + +$.widget.bridge = function( name, object ) { + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string", + args = Array.prototype.slice.call( arguments, 1 ), + returnValue = this; + + // allow multiple hashes to be passed on init + options = !isMethodCall && args.length ? + $.extend.apply( null, [ true, options ].concat(args) ) : + options; + + // prevent calls to internal methods + if ( isMethodCall && options.charAt( 0 ) === "_" ) { + return returnValue; + } + + if ( isMethodCall ) { + this.each(function() { + var instance = $.data( this, name ), + methodValue = instance && $.isFunction( instance[options] ) ? + instance[ options ].apply( instance, args ) : + instance; + // TODO: add this back in 1.9 and use $.error() (see #5972) +// if ( !instance ) { +// throw "cannot call methods on " + name + " prior to initialization; " + +// "attempted to call method '" + options + "'"; +// } +// if ( !$.isFunction( instance[options] ) ) { +// throw "no such method '" + options + "' for " + name + " widget instance"; +// } +// var methodValue = instance[ options ].apply( instance, args ); + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue; + return false; + } + }); + } else { + this.each(function() { + var instance = $.data( this, name ); + if ( instance ) { + instance.option( options || {} )._init(); + } else { + $.data( this, name, new object( options, this ) ); + } + }); + } + + return returnValue; + }; +}; + +$.Widget = function( options, element ) { + // allow instantiation without initializing for simple inheritance + if ( arguments.length ) { + this._createWidget( options, element ); + } +}; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + options: { + disabled: false + }, + _createWidget: function( options, element ) { + // $.widget.bridge stores the plugin instance, but we do it anyway + // so that it's stored even before the _create function runs + $.data( element, this.widgetName, this ); + this.element = $( element ); + this.options = $.extend( true, {}, + this.options, + this._getCreateOptions(), + options ); + + var self = this; + this.element.bind( "remove." + this.widgetName, function() { + self.destroy(); + }); + + this._create(); + this._trigger( "create" ); + this._init(); + }, + _getCreateOptions: function() { + return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ]; + }, + _create: function() {}, + _init: function() {}, + + destroy: function() { + this.element + .unbind( "." + this.widgetName ) + .removeData( this.widgetName ); + this.widget() + .unbind( "." + this.widgetName ) + .removeAttr( "aria-disabled" ) + .removeClass( + this.widgetBaseClass + "-disabled " + + "ui-state-disabled" ); + }, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key; + + if ( arguments.length === 0 ) { + // don't return a reference to the internal hash + return $.extend( {}, this.options ); + } + + if (typeof key === "string" ) { + if ( value === undefined ) { + return this.options[ key ]; + } + options = {}; + options[ key ] = value; + } + + this._setOptions( options ); + + return this; + }, + _setOptions: function( options ) { + var self = this; + $.each( options, function( key, value ) { + self._setOption( key, value ); + }); + + return this; + }, + _setOption: function( key, value ) { + this.options[ key ] = value; + + if ( key === "disabled" ) { + this.widget() + [ value ? "addClass" : "removeClass"]( + this.widgetBaseClass + "-disabled" + " " + + "ui-state-disabled" ) + .attr( "aria-disabled", value ); + } + + return this; + }, + + enable: function() { + return this._setOption( "disabled", false ); + }, + disable: function() { + return this._setOption( "disabled", true ); + }, + + _trigger: function( type, event, data ) { + var prop, orig, + callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + + return !( $.isFunction(callback) && + callback.call( this.element[0], event, data ) === false || + event.isDefaultPrevented() ); + } +}; + +})( jQuery ); diff --git a/bin/web/CtrlSetup.exe b/bin/web/CtrlSetup.exe new file mode 100644 index 0000000..aaa08e8 Binary files /dev/null and b/bin/web/CtrlSetup.exe differ diff --git a/bin/web/IPCWebClient.cab b/bin/web/IPCWebClient.cab new file mode 100644 index 0000000..8be0fe7 Binary files /dev/null and b/bin/web/IPCWebClient.cab differ diff --git a/bin/web/JaViewer.swf b/bin/web/JaViewer.swf new file mode 100644 index 0000000..9da76d4 Binary files /dev/null and b/bin/web/JaViewer.swf differ diff --git a/bin/web/WebClient.cab b/bin/web/WebClient.cab new file mode 100644 index 0000000..2db46fa Binary files /dev/null and b/bin/web/WebClient.cab differ diff --git a/bin/web/config-cold.css b/bin/web/config-cold.css new file mode 100644 index 0000000..c6aa39b --- /dev/null +++ b/bin/web/config-cold.css @@ -0,0 +1,194 @@ +@charset "utf-8"; +/*style*/ +/*2012.3.17*/ + +/*Reset*/ +/*CSSLab CSS Reset*/ +html, body, div, span,applet, object, iframe, h1, h2, h3, +h4, h5, h6, p,blockquote, pre, a, abbr, acronym, address, +big, cite, code, del,dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong,sub, sup, tt, var, dl, dt, dd, ol, ul, li, +fieldset, form, label,legend, table, caption, tbody, tfoot, +thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baselinebaseline; +} +:focus { + outline: 0; +} +table { + border-collapse: separate; + border-spacing: 0; +} +caption, th, td { + text-align: left; + font-weight: normal; +} +a img, iframe { + border: none; +} +ol, ul { + list-style: none; +} +input, textarea, select,button { + font-size: 100%; + font-family: inherit; +} +select { + margin: inherit; +} +/* Fixes incorrectplacement of numbers in ol's in IE6/7 */ +ol { margin-left:2em;} +/* == clearfix == */ +.clearfix:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} +.clearfix {display: inline-block;} +* html .clearfix {height:1%;} +.clearfix {display:block;} +.clearfix:after{ +content:"."; +display:block; +height:0; +clear:both; +visibility:hidden; +} +.clearfix{ +display:inline-block; +} + +.clearfix {display:block;} +/*World*/ +/*Stage*/ +body, html{} +body{text-align:center;} +#logo{background:url(images/logobg.jpg); height:88px; width:100%; font-family: 'microsoft yahei','sans-serif',Arial,tahoma,simsun,Helvetica; color:#000; font-size:32px; text-align:center; line-height:99px;} +#stage{ text-align:center; font-size:14px; width:100% height:100%; padding-top:12px; font-family: 'microsoft yahei','sans-serif',Arial,tahoma,simsun,Helvetica; padding:12px;} +#w_imagebtn{height:32px; width:137px; line-height:32px; margin-left:15px; margin-bottom:5px;} +/*image button with text */ +/* width item, such as record, playabkc...*/ +.w_imagebtn{height:32px; width:137px; line-height:32px; margin-left:10px; margin-bottom:5px; cursor:pointer;} +.w_imagebtn_text{margin-left:40px; font-family: 'microsoft yahei','sans-serif',Arial,tahoma,simsun,Helvetica; color:#000; font-size:18px; text-align:center;} +.w_imagebtn_text2{font-family: 'microsoft yahei','sans-serif',Arial,tahoma,simsun,Helvetica; color:#000; font-size:18px; text-align:center;} +/* narrow item ,such as zoom-out or zoom-in*/ +.zoom_area{height:27px;line-height:27px; margin-bottom:5px; margin-top:10px;} +.n_imagebtn{height:27px; position:absolute; width:31px; line-height:27px; cursor:pointer;} +.n_imagebtn_text{height:27px; position:absolute; line-height:27px;font-family: 'microsoft yahei','sans-serif',Arial,tahoma,simsun,Helvetica; color:#000; font-size:18px; text-align:center;} + +/*a*/ +a { text-decoration: none; cursor: pointer; white-space: pre-wrap; word-wrap: break-word; color:#FEF5FF; color:#000000; } +a:link{ text-decoration: none; } +a:visited { text-decoration: none;} +a:hover { text-decoration: none; color:#FF120A; } +a:active { text-decoration: none; color:#D9CCA7; } + +a:before{} + +/*hr*/ + +/*label*/ +label{display:block; color:#393; cursor:pointer;} +label.changed{color:#933;} + +/*btn*/ +/* +.btn{width:96px; height:32px; line-height:32px; text-align:center; cursor:pointer; font-size:14px; display:inline-block; border-bottom:1px #999 solid; border-radius:4px; background-color:#ccc;} +*/ +.btn{ background-color:#FFF; border:1px solid #CDCDCD; height:26px; margin-left:5px; cursor:pointer;} +.btn:hover{ text-decoration:underline;} +ie6 .btn{display:inline;}/*IE6 Hack*/ + +/*Stage*/ +#txtLoadinInfo{ background-color:#f33; font-size:12px; height:24px; line-height:24px; display:block; color:#fff; text-align:left; margin:4px; padding:0 8px; border-radius:4px; position:absolute; left:0; top:0;} +/*Left stage*/ +/*background:#496098;*/ +#left{ position:absolute; left:108px!important; left:124px; width:165px; height:510px; margin:0; padding:0; float:left; border-radius:4px;} +#logo-config{width:164px; height:55px; font-size:18px; font-weight:bold; color:#ccc;} +.logo-inactive{width:58px; height:40px; line-height:40px; margin-top:15px; text-align:center; display:block; float:left; background-color:#FFFFFF; border:1px solid #CCC; border-radius:4px 4px 0 0; cursor:pointer;} +#area-stage-left{width:160px!important; width:156px; height:455px; background-image:url(images/menubg.jpg); background-position:-1px 0px; margin:0; padding:0; position:relative; float:left; border-left:1px solid #CCC; border-right:1px solid #CCC; border-bottom:1px solid #CCC; border-radius:0 0 4px 4px;} +.btn-left{display:block; height:32px; line-height:32px; text-align:center; font-size:16px; font-weight:bold; width:158px!important; width:154px; margin:1px; cursor:pointer; border-radius:0; border-bottom:1px solid #CCC;} +.btn-left:hover{text-decoration:underline;} +.btn-left-active{background-color:#6A88C6; color:#FFFFFF;} + +/*Sub menu*/ +span ul{ margin:0; padding:8px 0; height:auto; border-bottom:1px solid #CCC;} +ul li{width:90%; height:22px; margin:5px auto 5px auto; border-radius:4px;} +ul li:hover{background-color:#EAE8E9;} +.submenu_current{background-color:#EAE8E9;} +li a{ height:22px; line-height:22px; text-align:center; font-size:12px; display:block; color:#000000;} + +/*Right*/ +#area-stage-right{ position:absolute; left:312px; top:106px; margin:0; width:620px; height:100%; margin-left:16px;} +#inner{} +/*Window*/ +.window{line-height:24px;} +.window-preview{line-height:10px; position:absolute; left:294px!important; left:310px; border-radius:4px; border:1px solid #CCC; padding:16px;} +.title-window{border-bottom:1px #CCC solid; margin:0; font-size:14px; font-weight:bold; text-align:left; padding:0 16px; color:#3B5998;} +.mainer{margin:16px; display:block; color:#000;} +.windowMin{background-color:#000;} +#ipcam_display{margin-top:16px;} +/*.windowMin .mainer{display:none;}*/ +.hidden{display:none;} + +/*Tips&Help*/ +#area-stage-help{width:170px; height:450px; padding:0; border:1px solid #CCC; border-radius:4px; float:right; position:relative; text-align:center; line-height:450px; font-size:24px; font-weight:bold; color:#000;} +#title-helper{background-image:url(images/titlebg.jpg); width:100%; height:30px; padding:0; border-bottom:1px solid #CCC; text-align:center; line-height:30px; font-size:14px; font-weight:bold; color:#FFFFFF;} +#consoler{width:160px!important; width:158px; height:455px; background-image:url(images/menubg.jpg); background-position:-1px 0px; padding:0; margin:0; float:left; border-left:1px solid #CCC; border-right:1px solid #CCC; border-bottom:1px solid #CCC; border-radius:0 0 4px 4px;} +.consoler-title{width:auto; height:54px; margin-left:auto; margin-right:auto; line-height:54px; text-align:center; font-size:20px; font-weight:bold; color:#666666;} +.consoler-modular{width:auto; height:32px; margin-left:auto; margin-right:auto; line-height:32px; text-align:center; font-size:16px; font-weight:bold; color:#FFFFFF;} +.wraper{width:auto; height:auto; margin-left:auto; margin-right:auto; text-align:center;} +/*ptz-controller*/ +#ptz-controller{position:relative; width:128px; height:128px; background:url(images/zhongxin.png) no-repeat; margin-left:auto; margin-right:auto; padding:0; border:0;} +#ptz-controller-up{position:absolute; left:48px; top:10; background-image:url(images/ptz-controller-up.png); display:block; width:32px; height:16px; font-size:0px;} +#ptz-controller-left{position:absolute; left:10; top:48px; background-image:url(images/ptz-controller-left.png); display:block; width:16px; height:32px;} +#ptz-controller-cam{position:absolute; left:44px; top:44px; background-image:url(images/ptz-controller-cam.png); display:block; width:40px; height:40px; z-index:5;} +#ptz-controller-right{position:absolute; left:102px; top:48px; background-image:url(images/ptz-controller-right.png); display:block; width:16px; height:32px;} +#ptz-controller-down{position:absolute;left:48px;top:102px;background-image:url(images/ptz-controller-down.png);display:block;width:32px;height:16px;font-size:0px; +} +/*coin in&out*/ +div#consoler div img{cursor:pointer;} + +/*area-stage-right:table*/ +.table-common{word-break:break-all; width:100%; font-size:14px;} +.table-common td{padding:3px; padding-left:25px; text-align:left; border:1px solid #FFFFFF;} +.table-common tr:hover{background-color:#F1F1F1;} +.table-special{word-break:break-all; width:100%; font-size:14px;} +.table-special td{padding:3px; text-align:left; background-color:#F1F1F1; border:1px solid #FFFFFF;} +.table-special td#preview_board{ padding-left:3px; text-align:center; background-color:#FFFFFF;} + +/*update file*/ +.file-box{ position:relative; width:auto;} +.txt{ height:22px; border:1px solid #cdcdcd; width:180px;} +.btn_s{ background-color:#FFF; border:1px solid #CDCDCD;height:24px; width:70px;} +.file{ position:absolute; top:0; left:0; height:24px; filter:alpha(opacity:0);opacity: 0;width:260px } +#maskbg { background-color:#000000; height:100%; width:100%; left:0px; opacity:0.8; position:absolute; top:0px; text-align:center; z-index:7; filter:alpha(opacity=80); /* IE6 */ -moz-opacity:0.8; /* Mozilla */ -khtml-opacity:0.8; /* Safari */ } +#update_process { background-color:#CCCCCC; border:2px solid #666666; border-radius:8px; display:none; height:160px; left:50%; margin:-80px 0 0 -275px; padding:12px; position:fixed !important; /* 浮动对话框 */ position:absolute; +top:50%; width:550px; z-index:9; } +#update_process p {margin:0 0 12px; } +#update_process p.close { text-align:right; } + +input{margin-left:0;} +select{width:157px;} +.marker{font-weight:bold; float:none; font-size:16px;} +.marker-active{color:#0099FF} + +#btn-apply{ margin:32px 8px 32px 56px;} +.mask_ipcam{background:#FFF;display:none;position:absolute; top:43px; left:16px; font-size:18px; font-weight:400; color:#666666; line-height:70px; text-indent:30px;color:#666666; width:100%;} +.in{border:0; width:18px;} +.time_3{ + background-color:#FFF; + float:left; + width:158px; + border:1px solid #7F9DB9; + } diff --git a/bin/web/config.js b/bin/web/config.js new file mode 100644 index 0000000..0e03937 Binary files /dev/null and b/bin/web/config.js differ diff --git a/bin/web/gallery/sb.gif b/bin/web/gallery/sb.gif new file mode 100644 index 0000000..66b5097 Binary files /dev/null and b/bin/web/gallery/sb.gif differ diff --git a/bin/web/gallery/sc.gif b/bin/web/gallery/sc.gif new file mode 100644 index 0000000..5835b53 Binary files /dev/null and b/bin/web/gallery/sc.gif differ diff --git a/bin/web/gallery/sl.gif b/bin/web/gallery/sl.gif new file mode 100644 index 0000000..220c125 Binary files /dev/null and b/bin/web/gallery/sl.gif differ diff --git a/bin/web/gallery/sr.gif b/bin/web/gallery/sr.gif new file mode 100644 index 0000000..858216c Binary files /dev/null and b/bin/web/gallery/sr.gif differ diff --git a/bin/web/gallery/today.html b/bin/web/gallery/today.html new file mode 100644 index 0000000..38edbad --- /dev/null +++ b/bin/web/gallery/today.html @@ -0,0 +1,489 @@ + + + +1 + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
Loading
+
Please wait...
+
+
+ + + + +
+
+ + + diff --git a/bin/web/gallery/today2.html b/bin/web/gallery/today2.html new file mode 100644 index 0000000..a04b661 Binary files /dev/null and b/bin/web/gallery/today2.html differ diff --git a/bin/web/hisilicon/index.html b/bin/web/hisilicon/index.html new file mode 100644 index 0000000..f9c49ef --- /dev/null +++ b/bin/web/hisilicon/index.html @@ -0,0 +1,36 @@ + + + + +Hislicon Hi3518a Debug Info + + + + + +
+ media-mem + adec + aenc + ai + ao + chnl + dsu + grp + h264e + isp + ive + jpege + log + rc + rgn + sys + vb + vda + venc + vi + vo + vpss +
+ + diff --git a/bin/web/hisilicon/miaov.js b/bin/web/hisilicon/miaov.js new file mode 100644 index 0000000..419d050 --- /dev/null +++ b/bin/web/hisilicon/miaov.js @@ -0,0 +1,237 @@ +var radius = 120; +var dtr = Math.PI/180; +var d=300; + +var mcList = []; +var active = false; +var lasta = 1; +var lastb = 1; +var distr = true; +var tspeed=10; +var size=250; + +var mouseX=0; +var mouseY=0; + +var howElliptical=1; + +var aA=null; +var oDiv=null; + +window.onload=function () +{ + var i=0; + var oTag=null; + + oDiv=document.getElementById('div1'); + + aA=oDiv.getElementsByTagName('a'); + + for(i=0;ivItem2.cz) + { + return -1; + } + else if(vItem1.cz + + + + + + \ No newline at end of file diff --git a/bin/web/hls/demo.html b/bin/web/hls/demo.html new file mode 100644 index 0000000..5c2650e --- /dev/null +++ b/bin/web/hls/demo.html @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/bin/web/images/Loginback.jpg b/bin/web/images/Loginback.jpg new file mode 100644 index 0000000..7da1b09 Binary files /dev/null and b/bin/web/images/Loginback.jpg differ diff --git a/bin/web/images/XPButtonUploadText_61x22.png b/bin/web/images/XPButtonUploadText_61x22.png new file mode 100644 index 0000000..0cd222a Binary files /dev/null and b/bin/web/images/XPButtonUploadText_61x22.png differ diff --git a/bin/web/images/bg.png b/bin/web/images/bg.png new file mode 100644 index 0000000..396eeef Binary files /dev/null and b/bin/web/images/bg.png differ diff --git a/bin/web/images/camera.png b/bin/web/images/camera.png new file mode 100644 index 0000000..700f6f7 Binary files /dev/null and b/bin/web/images/camera.png differ diff --git a/bin/web/images/disc.png b/bin/web/images/disc.png new file mode 100644 index 0000000..607441c Binary files /dev/null and b/bin/web/images/disc.png differ diff --git a/bin/web/images/fullscreen-hover.png b/bin/web/images/fullscreen-hover.png new file mode 100644 index 0000000..3df5a8e Binary files /dev/null and b/bin/web/images/fullscreen-hover.png differ diff --git a/bin/web/images/fullscreen.png b/bin/web/images/fullscreen.png new file mode 100644 index 0000000..1656456 Binary files /dev/null and b/bin/web/images/fullscreen.png differ diff --git a/bin/web/images/login_button_bg.jpg b/bin/web/images/login_button_bg.jpg new file mode 100644 index 0000000..16b6f9d Binary files /dev/null and b/bin/web/images/login_button_bg.jpg differ diff --git a/bin/web/images/login_password.png b/bin/web/images/login_password.png new file mode 100644 index 0000000..d91fe52 Binary files /dev/null and b/bin/web/images/login_password.png differ diff --git a/bin/web/images/login_username.png b/bin/web/images/login_username.png new file mode 100644 index 0000000..e693dbe Binary files /dev/null and b/bin/web/images/login_username.png differ diff --git a/bin/web/images/logo.png b/bin/web/images/logo.png new file mode 100644 index 0000000..1ec0fe5 Binary files /dev/null and b/bin/web/images/logo.png differ diff --git a/bin/web/images/logobg.jpg b/bin/web/images/logobg.jpg new file mode 100644 index 0000000..1daef02 Binary files /dev/null and b/bin/web/images/logobg.jpg differ diff --git a/bin/web/images/menubg.jpg b/bin/web/images/menubg.jpg new file mode 100644 index 0000000..1ee71f7 Binary files /dev/null and b/bin/web/images/menubg.jpg differ diff --git a/bin/web/images/playback-hover.png b/bin/web/images/playback-hover.png new file mode 100644 index 0000000..4b70bc9 Binary files /dev/null and b/bin/web/images/playback-hover.png differ diff --git a/bin/web/images/playback.png b/bin/web/images/playback.png new file mode 100644 index 0000000..771907f Binary files /dev/null and b/bin/web/images/playback.png differ diff --git a/bin/web/images/ptz-controller-cam-hover.png b/bin/web/images/ptz-controller-cam-hover.png new file mode 100644 index 0000000..e564967 Binary files /dev/null and b/bin/web/images/ptz-controller-cam-hover.png differ diff --git a/bin/web/images/ptz-controller-cam.png b/bin/web/images/ptz-controller-cam.png new file mode 100644 index 0000000..066f3e0 Binary files /dev/null and b/bin/web/images/ptz-controller-cam.png differ diff --git a/bin/web/images/ptz-controller-down-hover.png b/bin/web/images/ptz-controller-down-hover.png new file mode 100644 index 0000000..b908e13 Binary files /dev/null and b/bin/web/images/ptz-controller-down-hover.png differ diff --git a/bin/web/images/ptz-controller-down.png b/bin/web/images/ptz-controller-down.png new file mode 100644 index 0000000..fb0a6d9 Binary files /dev/null and b/bin/web/images/ptz-controller-down.png differ diff --git a/bin/web/images/ptz-controller-left-hover.png b/bin/web/images/ptz-controller-left-hover.png new file mode 100644 index 0000000..eea3fcf Binary files /dev/null and b/bin/web/images/ptz-controller-left-hover.png differ diff --git a/bin/web/images/ptz-controller-left.png b/bin/web/images/ptz-controller-left.png new file mode 100644 index 0000000..3328114 Binary files /dev/null and b/bin/web/images/ptz-controller-left.png differ diff --git a/bin/web/images/ptz-controller-right-hover.png b/bin/web/images/ptz-controller-right-hover.png new file mode 100644 index 0000000..4fad7d7 Binary files /dev/null and b/bin/web/images/ptz-controller-right-hover.png differ diff --git a/bin/web/images/ptz-controller-right.png b/bin/web/images/ptz-controller-right.png new file mode 100644 index 0000000..6945dd3 Binary files /dev/null and b/bin/web/images/ptz-controller-right.png differ diff --git a/bin/web/images/ptz-controller-up-hover.png b/bin/web/images/ptz-controller-up-hover.png new file mode 100644 index 0000000..c0caba8 Binary files /dev/null and b/bin/web/images/ptz-controller-up-hover.png differ diff --git a/bin/web/images/ptz-controller-up.png b/bin/web/images/ptz-controller-up.png new file mode 100644 index 0000000..d823284 Binary files /dev/null and b/bin/web/images/ptz-controller-up.png differ diff --git a/bin/web/images/record-hover.png b/bin/web/images/record-hover.png new file mode 100644 index 0000000..c868ca8 Binary files /dev/null and b/bin/web/images/record-hover.png differ diff --git a/bin/web/images/record.png b/bin/web/images/record.png new file mode 100644 index 0000000..d42e6a9 Binary files /dev/null and b/bin/web/images/record.png differ diff --git a/bin/web/images/slider.jpg b/bin/web/images/slider.jpg new file mode 100644 index 0000000..3bb0649 Binary files /dev/null and b/bin/web/images/slider.jpg differ diff --git a/bin/web/images/stream-change-hover.png b/bin/web/images/stream-change-hover.png new file mode 100644 index 0000000..33cd0b1 Binary files /dev/null and b/bin/web/images/stream-change-hover.png differ diff --git a/bin/web/images/stream-change.png b/bin/web/images/stream-change.png new file mode 100644 index 0000000..3139334 Binary files /dev/null and b/bin/web/images/stream-change.png differ diff --git a/bin/web/images/swfupload.swf b/bin/web/images/swfupload.swf new file mode 100644 index 0000000..e3f7670 Binary files /dev/null and b/bin/web/images/swfupload.swf differ diff --git a/bin/web/images/titlebg.jpg b/bin/web/images/titlebg.jpg new file mode 100644 index 0000000..74437cb Binary files /dev/null and b/bin/web/images/titlebg.jpg differ diff --git a/bin/web/images/zhongxin.png b/bin/web/images/zhongxin.png new file mode 100644 index 0000000..07d5ecd Binary files /dev/null and b/bin/web/images/zhongxin.png differ diff --git a/bin/web/images/zoom-in-hover.png b/bin/web/images/zoom-in-hover.png new file mode 100644 index 0000000..6e98825 Binary files /dev/null and b/bin/web/images/zoom-in-hover.png differ diff --git a/bin/web/images/zoom-in.png b/bin/web/images/zoom-in.png new file mode 100644 index 0000000..80803be Binary files /dev/null and b/bin/web/images/zoom-in.png differ diff --git a/bin/web/images/zoom-out-hover.png b/bin/web/images/zoom-out-hover.png new file mode 100644 index 0000000..1ef533d Binary files /dev/null and b/bin/web/images/zoom-out-hover.png differ diff --git a/bin/web/images/zoom-out.png b/bin/web/images/zoom-out.png new file mode 100644 index 0000000..ca4e5d3 Binary files /dev/null and b/bin/web/images/zoom-out.png differ diff --git "a/bin/web/images/\345\260\217\346\240\207\346\240\217.jpg" "b/bin/web/images/\345\260\217\346\240\207\346\240\217.jpg" new file mode 100644 index 0000000..687d4d8 Binary files /dev/null and "b/bin/web/images/\345\260\217\346\240\207\346\240\217.jpg" differ diff --git "a/bin/web/images/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271.rar" "b/bin/web/images/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271.rar" new file mode 100644 index 0000000..093e3a6 Binary files /dev/null and "b/bin/web/images/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271.rar" differ diff --git a/bin/web/index.html b/bin/web/index.html new file mode 100644 index 0000000..fefc326 --- /dev/null +++ b/bin/web/index.html @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +   + + + + +
 
+ +
+ +
+ + + + + +
  + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+

+
+

+
+ +
+ +
+
+
+
+ + \ No newline at end of file diff --git a/bin/web/jquery.min.js b/bin/web/jquery.min.js new file mode 100644 index 0000000..ee02337 --- /dev/null +++ b/bin/web/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/bin/web/js/cookie.js b/bin/web/js/cookie.js new file mode 100644 index 0000000..4d9753c --- /dev/null +++ b/bin/web/js/cookie.js @@ -0,0 +1,77 @@ +var Cookies = {}; +/**//** + * 设置Cookies + */ +Cookies.set = function(name, value){ + var argv = arguments; + var argc = arguments.length; + var expires = (argc > 2) ? argv[2] : null; + var path = (argc > 3) ? argv[3] : '/'; + var domain = (argc > 4) ? argv[4] : null; + var secure = (argc > 5) ? argv[5] : false; + document.cookie = name + "=" + escape (value) + + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + + ((path == null) ? "" : ("; path=" + path)) + + ((domain == null) ? "" : ("; domain=" + domain)) + + ((secure == false) ? "" : "; secure"); + +}; +/**//** + * 读取Cookies + */ +Cookies.get = function(name){ + var arg = name; + var alen = arg.length; + var clen = document.cookie.length; + var i = 0; + var j = 0; + while(i < clen){ + j = i + alen; + if (document.cookie.substring(i, j) == arg) + return Cookies.getCookieVal(j + 1); + i = document.cookie.indexOf(" ", i) + 1; + if(i == 0) + break; + } + return null; +}; +/**//** + * 清除Cookies + */ +Cookies.clear = function(name) { + if(Cookies.get(name)){ + var expdate = new Date(); + expdate.setTime(expdate.getTime() - (86400 * 1000 * 1)); + Cookies.set(name, "", expdate); + } +}; + +Cookies.getCookieVal = function(offset){ + var endstr = document.cookie.indexOf(";", offset); + if(endstr == -1){ + endstr = document.cookie.length; + } + if(document.cookie.substring(offset,endstr) == 'null'){ + return ''; + }else{ + return unescape(document.cookie.substring(offset,endstr)); + } + +}; + + function setCookie30Days(name,value) +{ + var Days = 30; + var exp = new Date(); + exp.setTime(exp.getTime() + Days*24*60*60*1000); + document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); +} + +function login_set(usr,pwd,auto_sync_time) +{ + //pwd = !pwd ? 'null' : pwd; + Cookies.set("sync_time", auto_sync_time); + Cookies.set("usr", usr); + Cookies.set("pwd", pwd); + +} diff --git a/bin/web/js/en.js b/bin/web/js/en.js new file mode 100644 index 0000000..07edd01 --- /dev/null +++ b/bin/web/js/en.js @@ -0,0 +1,246 @@ + +var langstr={ + //index page + title : "IP Camera", + preview : "live", + setup : "setup", + console : "console", + record : "record", + playback: "play", + zoom : "zoom", + zoom_in: "Zoom In", + zoom_out: "Zoom Out", + full_screen : "full screen", + stream_change: "stream switch", + Install_ActiveX : "Install ActiveX", + install_hinit : "Not detect the correct version of the control, click to update / install the control.", + main_stream : "main stream", + sub_stream : "sub stream", + + helper : "Help Message Box", + update_preview: "Udate preview now...", + //menu + media: "Media", + video: "Video setup", + image: "Image setup", + network: "Network setup", + local: "Local setup", + remote: "Remote setup", + advance_setup: "Advance setup", + usermanage: "User Management", + system: "System setup", + time: "Time Setup", + initial: "Iniliazation", + devinfo: "Device Info", + + //save button + save_video: "save video configure", + save_image: "save image configure", + save_isp: "save image processing configure", + save_local: "save local network configure", + save_remote: "save remote network configure", + save_time: "save time configure", + save_init: "save initialization configure", + //common + error: "error", + ok: "ok", + cancel: "cancel", + save: "save", + save_setup: "Saving setting now...", + save_refresh: "save setup success ,please refresh this page.", + save_preview: "Create a new preview, please save.", + format_wrong: "Format is wrong , the right format must like this :", + port_wrong: "Port is wrong , it must be a number", + delete_confirm: "Do you want to delete it now?", + delete_fail: "Delete failed.", + add_fail: "Add failed.", + old_pwd_wrong: "Old password wrong.", + confirm_pwd_wrong: "confirm password wrong.", + modify_pwd_fail: "modify password fail.", + sz_delete: "delete", + reboot_refresh: "Rebooing now, please refresh this page after a while.", + sync_time_now: "Sync. time now.", + sync_refresh: "Sync. success,please refresh this page.", + login_fail: "Login failed.", + modify_success: "Modify success", + + //video + shutter: "Shutter", + m_stream: "Main Stream", + s_stream1: "Sub Stream 1", + s_stream2: "Sub Stream 2", + resolution: "Resolution", + bps: "Bit Rate", + fix: "Constant", + volatile: "Variable", + fps: "Frame Rate", + quality: "Codec Quality", + best: "Excellent", + good: "High", + normal: "Nedium", + bad: "Low", + worst: "Lowest", + + //image + sharpen: "Sharpen", + hue: "Hue", + contrast: "Contrast", + brightness: "Brightness", + saturation: "Saturation", + + + //isp + isp: "ISP", + scene_mode: "Scene Mode", + scene: "Scene mode", + white_balance: "White Balance", + wb_mode: "WB Mode", + day_or_night: "Day/Night", + ir_cut_control: "IR cut control", + ir_cut_mode: "IR cut mode", + wide_dynamic_range: "Wide Dynamic Range", + wdr: "WDR", + strength: "Strength", + exposure_settings: "Exposure Settings", + exposure: "Exposure", + ae_compensation: "AEcompensation", + denoise: "Denoise", + denoise_enable: "Denoise Enable", + denoise_strength: "Denoise Strength", + advance: "Advance", + antiFog: "Anti Fog", + lowLight: "Low light", + gamma: "Camma curve", + defect: "Defect Pixel enable", + indoor: "indoor", + outdoor: "outdoor", + + hardware: "active mode", + software: "passive mode", + day: "day", + night: "night", + normal: "normal", + bright: "bright", + dark: "dark", + daylight: "daylight", + night: "night", + auto: "auto", + on: "on", + off: "off", + ddefault: "default", + normal_contrast: "normal contrast", + high_contrast: "high contact", + + /////////Network + // local + mac: "MAC", + dhcp: "DHCP State", + sz_open: "Open", + sz_close: "close", + esee: "ESEE State", + ip: "IP Address", + gateway: "Gateway", + netmask: "Netmask", + dns0: "Preferred DNS", + dns1: "Alternate DNS", + port: "port", + // remote-ddns + ddns_set: "DDNS Setup", + ddns: "DDNS State", + server: "Server", + domain: "Domain", + user: "User", + password: "Password", + // remote-pppoe + pppoe_set: "PPPoE Setup", + pppoe: "PPPoE State", + + //////advanced setup + //user management + username: "User Name", + password: "Passowrd", + authority: "Authority", + operation: "operation", + update_list : "UpdateList", + adduser: "Add User", + changepwd: "Change Password", + oldpwd: "Old Password", + newpwd: "New Password", + confirmpwd: "Confirm Password", + permit_admin:"User management ", + permit_setting:"Setting", + permit_playback:"Play back", + del_user:"Delete", + warning:"Please input user name! ", + + //////system setup + //time + dev_time: "Device Time", + date_frt: "Date Format", + date_frt1: "YMD: xxxx xx xx", + date_frt2: "MDY: xx xx xxxx", + date_frt3: "DMY: xx xx xxxx", + date_del: "Time Delimiter", + date_del1: "xxxx-xx-xx", + date_del2: "xxxx/xx/xx", + date_del3: "xxxx.xx.xx", + time_zone: "Time Zone", + daylightt: "Daylight Saving Time", + manual_set: "Manually Setup", + date: "Date", + time: "Time", + sync_pc_time: "Local Time Sync.", + pc_time: "Computer Time", + sync: "Sync", + sync_ntp_time: "NTP Time Sync.", + ntp: "NTP Server Sync. State", + ntp_server: "NTP Server", + datepicker_monthNames:['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + dayNamesMin:['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + + //reboot + reboot_tip: "Click button below to reboot IP Camera.", + reboot: "Reboot Now...", + + //restore factory setup + restore_tip: "Click button below to restore default factory.
Note: This Function will reboot system automatically!", + restore: "Restore", + + //upgrade + upgrade_tip: "Please click button below to select Upgrade File and then perform upgrade", + upgrade: "upgrade", + upgrade_system: "upgrade system", + upgrade_wait: "upgrading now, please wait for a while...", + wait_reboot: "System is upgrading now, please wait for system reboot...", + file_error: "file error!", + start_upload: "start upload", + stop_upload: "upload success", + fail_upload: "upload failed", + writing_firmware: "Writing firmware now...", + upgrade_success: "Upgrade success, please refresh this page after 10 seconds", + + + //device information + dev_name: "Device Name", + dev_model: "Device Model", + hw_ver: "Hardware Version", + sw_ver: "Software Version", + rel_time: "Release Time", + alarm_num: "Alarm Number", + sd_num: "SD Number", + + //2013-02-18 + display_net_id_on_screen:"Display Net-ID on screen", + + //Error Message + connect_refuse: "Failed to get vedio caused by too many connections.", + //----------------------------- + + login_title: "IP Camera", + remember_password: "Remember me", + time_align:"Time Sync", + login: "Login", + sign:"Sign in", + footer:" ", + end: "end" +}; diff --git a/bin/web/js/function.js b/bin/web/js/function.js new file mode 100644 index 0000000..2a910cb --- /dev/null +++ b/bin/web/js/function.js @@ -0,0 +1,3014 @@ +//initial +var rtsp; +var brower_type="ie"; +var bFullScreen = false; +var g_usr; +var g_pwd; +var dvr_url; +var g_ip; +var g_port; + +//video + +var dvr_ajax; +//image +var slider_sha; +var slider_hue; +var slider_con; +var slider_lum; +var slider_sat; +var sharpen=0; +var hue=0; +var saturation=0; +var brightness=0; +var contrast=0; +var disp_delaytime_ms = 2000; +var hide_delaytime_ms = 5000; +var g_model = ""; +//isp +var slider_str; +var slider_AEcom; +var slider_denoise_strength; +var strength=0; +var ae_compensation=0; +var denoise_strength=0; + +function flash_video(_video_id, _stream_name) +{ + + var obj = document.getElementById(_video_id); + if(obj && obj.ConnectRTMP) + { + obj.SetPlayerNum(1); + obj.SetPoster(0, dvr_url+"/snapshot?chn=1&u=" + g_usr + "&p=" + g_pwd + "&q=0&d=1&rand=" + Math.random()); + obj.ConnectRTMP(0, "rtmp://"+g_ip + ":" + g_port,_stream_name); + + obj.SetBufferTime(0.05); + } + else + { + setTimeout("flash_video(\"" + _video_id + "\", \"" + _stream_name + "\")", 1000); + } + +} + +$(document).ready(function(){ + var tmp_ip=document.location.hostname; + g_ip=document.location.hostname; + var tmp_port=document.location.port; + renewtime(); + if(tmp_port == "") //80 + { + tmp_port = 80; + } + else + { + var tmp_index = document.location.host.indexOf(":"); + tmp_ip = document.location.host.substring(0, tmp_index); + } + dvr_url = "http://" + tmp_ip + ":" + tmp_port; + g_usr = Cookies.get("usr"); + g_pwd = Cookies.get("pwd"); + var bEnable_sync_time = Cookies.get("sync_time"); + if(bEnable_sync_time == 'true'){ + sync_pc_time(); + } + load1(); +}); + +var __ipcam_display_content = false; +function flv_view(streamtype) +{ + if(__ipcam_display_content == false) + { +// __ipcam_display_content = true; + var chn = streamtype; + var str = ""; + str += ""; + str += ""; + str += ""; + str += ""; + document.getElementById("ipcam_display").innerHTML = str; + var player = document.getElementById("ipcam_display"); + player.innerHTML = str; + } + if(streamtype == 0){ + setTimeout("flash_video(\"JaViewer_view\", \"720p.264\")", 2000); + }else if(streamtype == 1){ + setTimeout("flash_video(\"JaViewer_view\", \"360p.264\")", 2000); + }else{ + setTimeout("flash_video(\"JaViewer_view\", \"720p.264\")", 2000); + } +// } +} + +var DHiMPlayer,DHiMPlayer_image,DHiMPlayer_isp; +function connect() +{ + if(__ipcam_display_content == false) + { + __ipcam_display_content = true; + var str = ''; + document.getElementById("ipcam_display").innerHTML = str; + DHiMPlayer = document.getElementById("DHiMPlayer"); + DHiMPlayer.attachEvent("InitInstance",function Init(ID,sInfo){}); + DHiMPlayer.attachEvent("LDBClick",function LClick(x,y){DHiMPlayer.FullScreen(bFullScreen = !bFullScreen);}); + DHiMPlayer.attachEvent("ConRefuse",function OnConRefuse(res){ + var RefuseMsg = langstr.connect_refuse; + alert(RefuseMsg); + }); + } + + if (DHiMPlayer.Version == "undefined") + { + load_attract(); + } + else if(DHiMPlayer.Version >= "1, 0, 1, 3") + { + $('.mask_ipcam').css('display','none'); + $(DHiMPlayer).width('100%').height('100%'); + while(DHiMPlayer.ReadyFlag != true); + DHiMPlayer.OpenByIP(g_ip,g_port); + DHiMPlayer.UserLogon(g_usr,g_pwd); + DHiMPlayer.OpenChannel(0,0); + } + else + { + load_attract(); + } +} +function load_attract(){ + var btn = false; + var timer = setInterval(function(){ + if(!btn){ + $("#manual_download").css("background-image","url(images/stream-change-hover.png)"); + $('.blink').css('color','#E6AF14'); + btn = true; + }else{ + $("#manual_download").css("background-image","url(images/stream-change.png)"); + $('.blink').css('color','#666'); + btn = false; + } + },500) + + } +function openChannel() +{ +// DHiMPlayer.OpenChannelEx(0); +} + +function check_os_and_browser() +{ + var ua = navigator.userAgent; + var ret = new Object(); + if(/MSIE/i.test(ua) == true) + { + ret.os = "windows"; + if(/MSIE 9/i.test( ua ) == true) + { + ret.browser = "ie9"; + } + else if(/MSIE 8/i.test( ua ) == true) + { + ret.browser = "ie8"; + } + else if(/MSIE 7/i.test( ua ) == true) + { + ret.browser = "ie7"; + } + else if(/MSIE 6/i.test( ua ) == true) + { + ret.browser = "ie6"; + } + else + { + ret.browser = "ie"; + } + } + else if(/Chrome/i.test( ua ) == true) + { + ret.browser = "chrome"; + if(/Macintosh/i.test( ua ) == true) + { + ret.os = "mac"; + } + else if(/Windows/i.test( ua ) == true) + { + ret.os = "windows"; + } + else if(/Android/i.test( ua ) == true) + { + ret.os = "android"; + } + else if(/Linux/i.test( ua ) == true) + { + ret.os = "linux"; + } + else + { + ret.os = ""; + } + } + else if(/Safari/i.test( ua ) == true) + { + ret.browser = "safari"; + if(/Macintosh/i.test( ua ) == true) + { + ret.os = "mac"; + } + else if(/iPhone/i.test( ua ) == true) + { + ret.os = "iphone"; + } + else if(/iPad/i.test( ua ) == true) + { + ret.os = "ipad"; + } + else if(/Windows/i.test( ua ) == true) + { + ret.os = "windows"; + } + else if(/Android/i.test( ua ) == true) + { + ret.os = "android"; + } + else if(/Linux/i.test( ua ) == true) + { + ret.os = "linux"; + } + else + { + ret.os = ""; + } + } + else if(/Firefox/i.test( ua ) == true) + { + ret.browser = "firefox"; + if(/Macintosh/i.test( ua ) == true) + { + ret.os = "mac"; + } + else if(/Windows/i.test( ua ) == true) + { + ret.os = "windows"; + } + else if(/Linux/i.test( ua ) == true) + { + ret.os = "linux"; + } + else + { + ret.os = ""; + } + } + else + { + ret.browser = ""; + ret.os = ""; + } + +// if(ret.os == "" || ret.browser == "") +// { +// alert(ua); +// } +// alert("os="+ret.os+",browser="+ret.browser); + return ret; +} + +function load1() +{ + g_port=document.location.port; + + if(g_port=="") //80 + { + g_port=80; + } +/* else + { + var i=document.location.host.indexOf(":"); + ip=document.location.host.substring(0,i); + } +*/ +/* + if (navigator.appName.indexOf("Microsoft Internet Explorer") != -1) + { + connect() + openChannel(); + }//end ie + else if(navigator.appName.indexOf("Netscape") != -1)//chrome,firefox + { + flv_view(0); + } +*/ + var os_browser = check_os_and_browser(); + if(os_browser.browser == "ie6" || os_browser.browser == "ie7" || os_browser.browser == "ie8" || os_browser.browser == "ie9") + { + $('.mask_ipcam').css('display','block'); + connect() + // openChannel(); + } + else if(os_browser.os == "iphone" || os_browser.os == "ipad") + { + flv_view(0); + } + else if(os_browser.os == "android") + { + flv_view(0); + } + else + { + flv_view(0); + } +} + +function streamchange(streamtype) +{ + if (navigator.appName.indexOf("Microsoft Internet Explorer") != -1) + { + //DHiMPlayer.CloseChannelEx(streamtype?0:1); + //DHiMPlayer.OpenChannelEx(streamtype); + //location.reload(); + if(DHiMPlayer){ + DHiMPlayer.OpenByIP(g_ip,g_port); + DHiMPlayer.UserLogon(g_usr,g_pwd); + DHiMPlayer.OpenChannel(0,stream_state); + } + } + else if (navigator.appName.indexOf("Netscape") != -1) + { + flv_view(streamtype); + } + else{ + alert("browser not support!"); + } +} + +function snap() +{ +// DHiMPlayer.Snapshot(); +} +function records() +{ +// if(DHiMPlayer.GetLocalRecStatus(0)==true) +// { +// DHiMPlayer.EnableLocalRec(0,false); +// } +// else +// { +// DHiMPlayer.EnableLocalRec(0,true); +// } +} +function playback() +{ +// DHiMPlayer.PlayBack(); +} +function fullscreen_func() +{ + var os_browser = check_os_and_browser(); + if(os_browser.browser == "ie6" || os_browser.browser == "ie7" || os_browser.browser == "ie8" || os_browser.browser == "ie9") + { + var DHiMPlayer=document.getElementById("Test"); + DHiMPlayer.fullscreen(bFullScreen = !bFullScreen); + } + else + { + var obj = document.getElementById("JaViewer_view"); + obj.fullStage(); + } +} + +//消除object函数 +function purify(obj) +{ +} + +//video function +function video_data2ui(dvr_data, sensor_type) +{ + var max_frate = 30; + /*switch(dvr_data.juan.conf.vin0.shutter) + { + case "50hz": + max_frate = 25; + break; + case "60hz": + default: + max_frate = 30; + break; + }*/ + + for(var i = 0; i < $("#juan_envload\\#video\\@m_shutter")[0].options.length; i++) + { + if($("#juan_envload\\#video\\@m_shutter")[0].options[i].value == dvr_data.juan.conf.vin0.shutter) + { + $("#juan_envload\\#video\\@m_shutter")[0].selectedIndex = i; + } + } + if(sensor_type == "ar0130"){ + $("#juan_envload\\#video\\@m_resol option").eq(2).html('1280x960'); + }else{ + $("#juan_envload\\#video\\@m_resol option").eq(2).html('1280x720'); + } + reset_frame_rate_select($("#juan_envload\\#video\\@m_frate")[0], max_frate); + reset_frame_rate_select($("#juan_envload\\#video\\@s_frate")[0], max_frate); + if(g_model == "N18A"){ + reset_frame_rate_select($("#juan_envload\\#video\\@ss_frate")[0], max_frate); + } + +// for(var i = $("#juan_envload\\#video\\@m_frate")[0].options.length - 1; i >= 0; i--) +// { +// $("#juan_envload\\#video\\@m_frate")[0].options.remove(i); +// } +// for(var i = 0; i < max_frate; i++) +// { +// var oOption = document.createElement("OPTION"); +// oOption.text = i + 1 + "fps"; +// oOption.value = i + 1; +// $("#juan_envload\\#video\\@m_frate")[0].add(oOption); +// } +// +// for(var i = $("#juan_envload\\#video\\@s_frate")[0].options.length - 1; i >= 0; i--) +// { +// $("#juan_envload\\#video\\@s_frate")[0].options.remove(i); +// } +// for(var i = 0; i < max_frate; i++) +// { +// var oOption = document.createElement("OPTION"); +// oOption.text = i + 1 + "fps"; +// oOption.value = i + 1; +// $("#juan_envload\\#video\\@s_frate")[0].add(oOption); +// } +// +// for(var i = $("#juan_envload\\#video\\@ss_frate")[0].options.length - 1; i >= 0; i--) +// { +// $("#juan_envload\\#video\\@ss_frate")[0].options.remove(i); +// } +// for(var i = 0; i < max_frate; i++) +// { +// var oOption = document.createElement("OPTION"); +// oOption.text = i + 1 + "fps"; +// oOption.value = i + 1; +// $("#juan_envload\\#video\\@ss_frate")[0].add(oOption); +// } + + + $("#juan_envload\\#video\\@m_bitrate")[0].value = dvr_data.juan.conf.vin0.encode_h2640.stream0.bps; + $("#juan_envload\\#video\\@s_bitrate")[0].value = dvr_data.juan.conf.vin0.encode_h2641.stream0.bps; + if(g_model == "N18A"){ + $("#juan_envload\\#video\\@ss_bitrate")[0].value = dvr_data.juan.conf.vin0.encode_h2642.stream0.bps; //码流 + } + if(max_frate >= dvr_data.juan.conf.vin0.encode_h2640.stream0.fps){ + $("#juan_envload\\#video\\@m_frate")[0].value = dvr_data.juan.conf.vin0.encode_h2640.stream0.fps; + }else{ + $("#juan_envload\\#video\\@m_frate")[0].value = max_frate; + } + if(max_frate >= dvr_data.juan.conf.vin0.encode_h2641.stream0.fps){ + $("#juan_envload\\#video\\@s_frate")[0].value = dvr_data.juan.conf.vin0.encode_h2641.stream0.fps; + }else{ + $("#juan_envload\\#video\\@s_frate")[0].value = max_frate; + } + if(g_model == "N18A"){ + if(max_frate >= dvr_data.juan.conf.vin0.encode_h2642.stream0.fps){ + $("#juan_envload\\#video\\@ss_frate")[0].value = dvr_data.juan.conf.vin0.encode_h2642.stream0.fps; //帧率 + }else{ + $("#juan_envload\\#video\\@ss_frate")[0].value = max_frate; + } + } + if(dvr_data.juan.conf.vin0.encode_h2640.stream0.mode == "cbr") //码流可变 + { + $("#juan_envload\\#video\\@m_brfmt")[0].checked = true; + } + else + { + $("#juan_envload\\#video\\@m_brfmt1")[0].checked = true; + } + if(dvr_data.juan.conf.vin0.encode_h2641.stream0.mode == "cbr") + { + $("#juan_envload\\#video\\@s_brfmt")[0].checked = true; + } + else + { + $("#juan_envload\\#video\\@s_brfmt1")[0].checked = true; + } + /*if(dvr_data.juan.conf.vin0.encode_h2642.stream0.mode == "cbr") + { + $("#juan_envload\\#video\\@ss_brfmt")[0].checked = true; + } + else + { + $("#juan_envload\\#video\\@ss_brfmt1")[0].checked = true; + }*/ + m_bps_type(); + s_bps_type(); + ss_bps_type(); + switch (dvr_data.juan.conf.vin0.encode_h2640.stream0.size) //分辨犿 + { + case "180p": $("#juan_envload\\#video\\@m_resol")[0].selectedIndex = 0;break; + case "360p": $("#juan_envload\\#video\\@m_resol")[0].selectedIndex = 1;break; + case "720p": $("#juan_envload\\#video\\@m_resol")[0].selectedIndex = 2;break; + default: break; + } + switch (dvr_data.juan.conf.vin0.encode_h2641.stream0.size) + { + case "180p": $("#juan_envload\\#video\\@s_resol")[0].selectedIndex = 0;break; + case "360p": $("#juan_envload\\#video\\@s_resol")[0].selectedIndex = 1;break; + //case "720p": $("#juan_envload\\#video\\@s_resol")[0].selectedIndex = 2;break; + default: break; + } + /*switch (dvr_data.juan.conf.vin0.encode_h2642.stream0.size) + { + case "180p": $("#juan_envload\\#video\\@ss_resol")[0].selectedIndex = 0;break; + case "360p": $("#juan_envload\\#video\\@ss_resol")[0].selectedIndex = 1;break; + case "720p": $("#juan_envload\\#video\\@ss_resol")[0].selectedIndex = 2;break; + default: break; + }*/ + + switch (dvr_data.juan.conf.vin0.encode_h2640.stream0.quality) //编码质量 + { + case "highest": $("#juan_envload\\#video\\@m_qual")[0].selectedIndex = 0;break; + case "high": $("#juan_envload\\#video\\@m_qual")[0].selectedIndex = 1;break; + case "medium": $("#juan_envload\\#video\\@m_qual")[0].selectedIndex = 2;break; + case "low": $("#juan_envload\\#video\\@m_qual")[0].selectedIndex = 3;break; + case "lowest": $("#juan_envload\\#video\\@m_qual")[0].selectedIndex = 4;break; + default: break; + } + switch (dvr_data.juan.conf.vin0.encode_h2641.stream0.quality) + { + case "highest": $("#juan_envload\\#video\\@s_qual")[0].selectedIndex = 0;break; + case "high": $("#juan_envload\\#video\\@s_qual")[0].selectedIndex = 1;break; + case "medium": $("#juan_envload\\#video\\@s_qual")[0].selectedIndex = 2;break; + case "low": $("#juan_envload\\#video\\@s_qual")[0].selectedIndex = 3;break; + case "lowest": $("#juan_envload\\#video\\@s_qual")[0].selectedIndex = 4;break; + default: break; + } + if(dvr_data.juan.conf.vin0.encode_h2642) + { + switch (dvr_data.juan.conf.vin0.encode_h2642.stream0.quality) + { + case "highest": $("#juan_envload\\#video\\@ss_qual")[0].selectedIndex = 0;break; + case "high": $("#juan_envload\\#video\\@ss_qual")[0].selectedIndex = 1;break; + case "medium": $("#juan_envload\\#video\\@ss_qual")[0].selectedIndex = 2;break; + case "low": $("#juan_envload\\#video\\@ss_qual")[0].selectedIndex = 3;break; + case "lowest": $("#juan_envload\\#video\\@ss_qual")[0].selectedIndex = 4;break; + default: break; + } + } +} +function video_preload_content() +{ + devinfo_load_content(false); +} +function video_load_content(model, sensor_type) +{ + if(model == "N18C"){ + document.getElementById("substream2").style.display="none"; + }else{ + document.getElementById("substream2").style.display=""; + } + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + if(model == "N18A"){ + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + } + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:true, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + dvr_data = xml2json.parser(data.xml, "", false); + video_data2ui(dvr_data, sensor_type); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + } + }); +} +function bitrate_change(id,min_,max_) +{ + var inbox=document.getElementById(id); + var str=inbox.value; + if(isNaN(str)==true) + { + alert("Not a Number,Please retry"); + inbox.value=max_; + } + else{ + if(Number(str)>max_) + { + alert("Input number is too big,Please retry"); + inbox.value=max_; + } + else if(Number(str)'; +// xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + if(g_model == "N18A"){ + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + } + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:true, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + setTimeout("showInfo(langstr.save_refresh)",disp_delaytime_ms); + setTimeout("hideInfo()",hide_delaytime_ms); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + } + }); +} +function reset_frame_rate_select(_select, _max_frate) +{ + var frame_rate = _select.selectedIndex + 1; + for(var i = _select.options.length - 1; i >= 0; i--) + { + _select.options.remove(i); + } + for(var i = 0; i < _max_frate; i++) + { + var oOption = document.createElement("OPTION"); + oOption.text = i + 1 + "fps"; + oOption.value = i + 1; + _select.add(oOption); + } + if(frame_rate < _max_frate) + { + _select.selectedIndex = frame_rate - 1; + } + else + { + _select.selectedIndex = _max_frate - 1; + } +} +function on_shutter_change() +{ + var shutter = 30; + /*switch($("#juan_envload\\#video\\@m_shutter")[0].options[$("#juan_envload\\#video\\@m_shutter")[0].selectedIndex].value) + { + case "50hz": + shutter = 25; + break; + case "60hz": + default: + shutter = 30; + break; + }*/ + reset_frame_rate_select($("#juan_envload\\#video\\@m_frate")[0], shutter); + reset_frame_rate_select($("#juan_envload\\#video\\@s_frate")[0], shutter); + if(g_model == "N18A"){ + reset_frame_rate_select($("#juan_envload\\#video\\@ss_frate")[0], shutter); + } +} +function m_bps_type() +{ + var obj=document.getElementById('juan_envload#video@m_brfmt'); + var obj2=document.getElementById('juan_envload#video@m_brfmt1'); + var inbox=document.getElementById('juan_envload#video@m_bitrate'); + if(obj.checked==false || obj2.checked==true) + { +// inbox.value=0; + inbox.disabled=true; + } + else + { + inbox.disabled=false; + } +} +function s_bps_type() +{ + var obj=document.getElementById('juan_envload#video@s_brfmt'); + var obj2=document.getElementById('juan_envload#video@s_brfmt1'); + var inbox=document.getElementById('juan_envload#video@s_bitrate'); + if(obj.checked==false || obj2.checked==true) + { +// inbox.value=0; + inbox.disabled=true; + } + else + { + inbox.disabled=false; + } +} +function ss_bps_type() +{ + var obj=document.getElementById('juan_envload#video@ss_brfmt'); + var obj2=document.getElementById('juan_envload#video@ss_brfmt1'); + var inbox=document.getElementById('juan_envload#video@ss_bitrate'); + if(obj.checked==false || obj2.checked==true) + { +// inbox.value=0; + inbox.disabled=true; + } + else + { + inbox.disabled=false; + } +} + +//image +function image_data2ui(dvr_data) +{ + var con,bri,sat,hue,sha; + //var num = Array(5), maxmum = Array(5); + var num = Array(5), maxmum = Array(5); + con = dvr_data.juan.conf.isp.image_attr.contrast.split("/"); + bri = dvr_data.juan.conf.isp.image_attr.brightness.split("/"); + sat = dvr_data.juan.conf.isp.image_attr.saturation.split("/"); + hue = dvr_data.juan.conf.isp.image_attr.hue.split("/"); + sha = dvr_data.juan.conf.isp.image_attr.sharpen.split("/"); + num[0] = parseInt(con[0]); maxmum[0] = parseInt(con[1]); + num[1] = parseInt(bri[0]); maxmum[1] = parseInt(bri[1]); + num[2] = parseInt(sat[0]); maxmum[2] = parseInt(sat[1]); + num[3] = parseInt(hue[0]); maxmum[3] = parseInt(hue[1]); + num[4] = parseInt(sha[0]); maxmum[4] = parseInt(sha[1]); + slider_con.n_maxValue = maxmum[0]; + slider_con.n_pix2value = slider_con.n_pathLength / (slider_con.n_maxValue - slider_con.n_minValue); + slider_lum.n_maxValue = maxmum[1]; + slider_lum.n_pix2value = slider_lum.n_pathLength / (slider_lum.n_maxValue - slider_lum.n_minValue); + slider_sat.n_maxValue = maxmum[2]; + slider_sat.n_pix2value = slider_sat.n_pathLength / (slider_sat.n_maxValue - slider_sat.n_minValue); + slider_hue.n_maxValue = maxmum[3]; + slider_hue.n_pix2value = slider_hue.n_pathLength / (slider_hue.n_maxValue - slider_hue.n_minValue); + slider_sha.n_maxValue = maxmum[4]; + slider_sha.n_pix2value = slider_sha.n_pathLength / (slider_sha.n_maxValue - slider_sha.n_minValue); + /*$('#juan_envload#color@con')[0].value = num[0];*/ + $("#juan_envload\\#color\\@con")[0].value = num[0]; + $("#juan_envload\\#color\\@lum")[0].value = num[1]; + $("#juan_envload\\#color\\@sat")[0].value = num[2]; + $("#juan_envload\\#color\\@hue")[0].value = num[3]; + $("#juan_envload\\#color\\@sha")[0].value = num[4]; + slider_con.f_setValue(num[0],0); + slider_lum.f_setValue(num[1],0); + slider_sat.f_setValue(num[2],0); + slider_hue.f_setValue(num[3],0); + slider_sha.f_setValue(num[4],0); +} + +var __display_board_content = false; +function showpreview() +{ + if(g_port=="") //80 + { + g_port=80; + } +/* else + { + var i=document.location.host.indexOf(":"); + ip=document.location.host.substring(0,i); + } +*/ + var os_browser = check_os_and_browser(); + if(os_browser.browser == "ie6" || os_browser.browser == "ie7" || os_browser.browser == "ie8" || os_browser.browser == "ie9") + { + if(__display_board_content == false) + { + __display_board_content = true; + var str = ''; + document.getElementById('display_board').innerHTML = str; + DHiMPlayer_image = document.getElementById("DHiMPlayer_image"); + DHiMPlayer_image.attachEvent("InitInstance",function Init(ID,sInfo){}); + DHiMPlayer_image.attachEvent("LDBClick",function LClick(x,y){DHiMPlayer_image.FullScreen(bFullScreen = !bFullScreen);}); + } + if(DHiMPlayer_isp){ + DHiMPlayer_isp.close(); + } + while(DHiMPlayer_image.ReadyFlag != true); + DHiMPlayer_image.OpenByIP(g_ip,g_port); + DHiMPlayer_image.UserLogon(g_usr,g_pwd); + DHiMPlayer_image.OpenChannel(0,1); + } + else + { + + var td1 = document.getElementById('preview_board'); + var str = ""; + str += ""; + str += ""; + str += ""; + str += ""; + var player = document.getElementById("display_board"); + player.innerHTML = str; + + } + setTimeout("flash_video(\"JaViewer_preview\", \"360p.264\")", 1000); + +} +function image_load_content() +{ + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + //alert(xmlstr); + showpreview(); + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:false, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ + //alert("recv:" + data.xml); + var dvr_data = xml2json.parser(data.xml, "", false); + image_data2ui(dvr_data); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + } + }); +} +function image_save_content() +{ + showInfo(langstr.save_setup); + var con = $("#juan_envload\\#color\\@con")[0].value + "/" + slider_con.n_maxValue, + lum = $("#juan_envload\\#color\\@lum")[0].value + "/" + slider_lum.n_maxValue, + sat = $("#juan_envload\\#color\\@sat")[0].value + "/" + slider_sat.n_maxValue; + hue = $("#juan_envload\\#color\\@hue")[0].value + "/" + slider_hue.n_maxValue; + sha = $("#juan_envload\\#color\\@sha")[0].value + "/" + slider_sha.n_maxValue; + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:false, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); +// setTimeout("showInfo('已保嫿')",3000); + showInfo(langstr.save_refresh); + setTimeout("hideInfo()",disp_delaytime_ms); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + } + }); +} +function image_preview_content(id) +{ + showInfo(langstr.update_preview); + var xmlstr; +if(id == 'sl0slider' ){ + var con = $("#juan_envload\\#color\\@con")[0].value + "/" + slider_con.n_maxValue; + xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'sl1slider'){ + var lum = $("#juan_envload\\#color\\@lum")[0].value + "/" + slider_lum.n_maxValue; + xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'sl2slider'){ + var sat = $("#juan_envload\\#color\\@sat")[0].value + "/" + slider_sat.n_maxValue; + xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + }else if(id == 'sl3slider'){ + var hue = $("#juan_envload\\#color\\@hue")[0].value + "/" + slider_hue.n_maxValue; + xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'sl4slider'){ + var sha = $("#juan_envload\\#color\\@sha")[0].value + "/" + slider_sha.n_maxValue; + //alert(sha); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'sl5slider' ){ + var str = $("#juan_envload\\#color\\@str")[0].value + "/" + slider_str.n_maxValue; + //alert(str); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'sl6slider' ){ + var AEcom = $("#juan_envload\\#color\\@AEcom")[0].value + "/" + slider_AEcom.n_maxValue; + //alert(AEcom); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'sl7slider' ){ + var denoise_strength = $("#juan_envload\\#color\\@denoise_strength")[0].value + "/" + slider_denoise_strength.n_maxValue; + //alert(d2); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else{ + var xmlstr =''; + xmlstr += 'error'; + alert(xmlstr); +} + //alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:false, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + showInfo(langstr.save_preview); + setTimeout("hideInfo()",3000); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + } + }); +} +//isp +function isp_data2ui(dvr_data) +{ + var str,AEcom,denoise_strength; + var num = Array(3), maxmum = Array(3); + str = dvr_data.juan.conf.isp.wide_dynamic_range.strength.split("/"); + AEcom = dvr_data.juan.conf.isp.exposure.ae_compensation.split("/"); + denoise_strength = dvr_data.juan.conf.isp.denoise.denoise_strength.split("/"); + num[0] = parseInt(str[0]); maxmum[0] = parseInt(str[1]); + num[1] = parseInt(AEcom[0]); maxmum[1] = parseInt(AEcom[1]); + num[2] = parseInt(denoise_strength[0]); maxmum[2] = parseInt(denoise_strength[1]); + slider_str.n_maxValue = maxmum[0]; + slider_str.n_pix2value = slider_str.n_pathLength / (slider_str.n_maxValue - slider_str.n_minValue); + slider_AEcom.n_maxValue = maxmum[1]; + slider_AEcom.n_pix2value = slider_AEcom.n_pathLength / (slider_AEcom.n_maxValue - slider_AEcom.n_minValue); + slider_denoise_strength.n_maxValue = maxmum[2]; + slider_denoise_strength.n_pix2value = slider_denoise_strength.n_pathLength / (slider_denoise_strength.n_maxValue - slider_denoise_strength.n_minValue); + $("#juan_envload\\#color\\@str")[0].value = num[0]; + $("#juan_envload\\#color\\@AEcom")[0].value = num[1]; + $("#juan_envload\\#color\\@denoise_strength")[0].value = num[2]; + slider_str.f_setValue(num[0],0); + slider_AEcom.f_setValue(num[1],0); + slider_denoise_strength.f_setValue(num[2],0); + + //alert(dvr_data.juan.conf.isp.scene.mode); + switch(dvr_data.juan.conf.isp.scene.mode) + { + case "auto": $("#juan_envload\\#isp\\@scene_mode")[0].selectedIndex = 0;break; + case "indoor": $("#juan_envload\\#isp\\@scene_mode")[0].selectedIndex = 1;break; + case "outdoor": $("#juan_envload\\#isp\\@scene_mode")[0].selectedIndex = 2;break; + default:break; + } + switch(dvr_data.juan.conf.isp.white_balance.mode) + { + case "auto": $("#juan_envload\\#isp\\@white_balance_mode")[0].selectedIndex = 0;break; + case "indoor": $("#juan_envload\\#isp\\@white_balance_mode")[0].selectedIndex = 1;break; + case "outdoor": $("#juan_envload\\#isp\\@white_balance_mode")[0].selectedIndex = 2;break; + default:break; + } + switch(dvr_data.juan.conf.isp.day_night_mode.ircut_control_mode) + { + case "hardware": $("#juan_envload\\#isp\\@ircut_control_mode")[0].selectedIndex = 0;break; + case "software": $("#juan_envload\\#isp\\@ircut_control_mode")[0].selectedIndex = 1;break; + default:break; + } + switch(dvr_data.juan.conf.isp.day_night_mode.ircut_mode) + { + case "auto": $("#juan_envload\\#isp\\@ircut_mode")[0].selectedIndex = 0;break; + case "daylight": $("#juan_envload\\#isp\\@ircut_mode")[0].selectedIndex = 1;break; + case "night": $("#juan_envload\\#isp\\@ircut_mode")[0].selectedIndex = 2;break; + default:break; + } + //alert(dvr_data.juan.conf.isp.wide_dynamic_range.enable); + switch(dvr_data.juan.conf.isp.wide_dynamic_range.enable) + { + case "yes": $("#juan_envload\\#isp\\@wide_dynamic_range_enable")[0].selectedIndex = 0;break; + case "no": $("#juan_envload\\#isp\\@wide_dynamic_range_enable")[0].selectedIndex = 1;break; + default:break; + } + //alert(dvr_data.juan.conf.isp.exposure.mode); + switch(dvr_data.juan.conf.isp.exposure.mode) + { + case "auto": $("#juan_envload\\#isp\\@exposure_mode")[0].selectedIndex = 0;break; + case "bright": $("#juan_envload\\#isp\\@exposure_mode")[0].selectedIndex = 1;break; + case "dark": $("#juan_envload\\#isp\\@exposure_mode")[0].selectedIndex = 2;break; + default:break; + } + + switch(dvr_data.juan.conf.isp.denoise.denoise_enable) + { + case "yes": $("#juan_envload\\#isp\\@denoise_enable")[0].selectedIndex = 0;break; + case "no": $("#juan_envload\\#isp\\@denoise_enable")[0].selectedIndex = 1;break; + default:break; + } + switch(dvr_data.juan.conf.isp.advance.anti_fog_enable) + { + case "yes": $("#juan_envload\\#isp\\@anti_fog_enable")[0].selectedIndex = 0;break; + case "no": $("#juan_envload\\#isp\\@anti_fog_enable")[0].selectedIndex = 1;break; + default:break; + } + /*switch(dvr_data.juan.conf.isp.advance.lowlight_enable) + { + case "yes": $("#juan_envload\\#isp\\@lowlight_enable")[0].selectedIndex = 0;break; + case "no": $("#juan_envload\\#isp\\@lowlight_enable")[0].selectedIndex = 1;break; + default:break; + } + switch(dvr_data.juan.conf.isp.advance.gamma) + { + case "default": $("#juan_envload\\#isp\\@gamma")[0].selectedIndex = 0;break; + case "normal": $("#juan_envload\\#isp\\@gamma")[0].selectedIndex = 1;break; + case "high": $("#juan_envload\\#isp\\@gamma")[0].selectedIndex = 2;break; + default:break; + }*/ + switch(dvr_data.juan.conf.isp.advance.defect_pixel_enable) + { + case "yes": $("#juan_envload\\#isp\\@defect_pixel_enable")[0].selectedIndex = 0;break; + case "no": $("#juan_envload\\#isp\\@defect_pixel_enable")[0].selectedIndex = 1;break; + default:break; + } +} + +var __display_board1_content = false; +function showpreview_isp() +{ + if(g_port=="") //80 + { + g_port=80; + } +// else +// { +// var i=document.location.host.indexOf(":"); +// ip=document.location.host.substring(0,i); +// } + + var os_browser3 = check_os_and_browser(); + if(os_browser3.browser == "ie6" || os_browser3.browser == "ie7" || os_browser3.browser == "ie8" || os_browser3.browser == "ie9") + { + if(__display_board1_content == false) + { + __display_board1_content = true; + var str1 = ''; + document.getElementById('display_board1').innerHTML = str1; + DHiMPlayer_isp = document.getElementById("DHiMPlayer_isp"); + DHiMPlayer_isp.attachEvent("InitInstance",function Init(ID,sInfo){}); + DHiMPlayer_isp.attachEvent("LDBClick",function LClick(x,y){DHiMPlayer_isp.FullScreen(bFullScreen = !bFullScreen);}); + } + if(DHiMPlayer_image){ + DHiMPlayer_image.close(); + } + while(DHiMPlayer_isp.ReadyFlag != true); + DHiMPlayer_isp.OpenByIP(g_ip,g_port); + DHiMPlayer_isp.UserLogon(g_usr,g_pwd); + DHiMPlayer_isp.OpenChannel(0,1); + } + else + { +// if(__display_board_content == false) +// { +// __display_board_content = true; + var td2 = document.getElementById('preview_board1'); + var str1 = ""; + str1 += ""; + str1 += ""; + str1 += ""; + str1 += ""; + var player = document.getElementById("display_board1"); + player.innerHTML = str1; + + } + setTimeout("flash_video(\"JaViewer_preview\", \"360p.264\")", 1000); + +} + +function isp_load_content() +{ + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + showpreview_isp(); + $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:false, + dataType: 'jsonp', + jsonp: 'jsoncallback', + timeout:3000, + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ + //alert("recv:" + data.xml); + var dvr_data = xml2json.parser(data.xml, "", false); + isp_data2ui(dvr_data); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + //alert(errorThrown); + } + }); +} +function isp_save_content() +{ + showInfo(langstr.save_setup); + var scene_mode,white_balance_mode,ircut_control_mode,ircut_mode,wide_dynamic_range_enable,exposure_mode,denoise_enable,anti_fog_enable,lowlight_enable,gamma,defect_pixel_enable; + switch($("#juan_envload\\#isp\\@scene_mode")[0].selectedIndex) + { + case 0: scene_mode = "auto";break; + case 1: scene_mode = "indoor";break; + case 2: scene_mode = "outdoor";break; + default:break; + } + switch($("#juan_envload\\#isp\\@white_balance_mode")[0].selectedIndex) + { + case 0: white_balance_mode = "auto";break; + case 1: white_balance_mode = "indoor";break; + case 2: white_balance_mode = "outdoor";break; + default:break; + } + switch($("#juan_envload\\#isp\\@ircut_control_mode")[0].selectedIndex) + { + case 0: ircut_control_mode = "hardware";break; + case 1: ircut_control_mode = "software";break; + default:break; + } + switch($("#juan_envload\\#isp\\@ircut_mode")[0].selectedIndex) + { + case 0: ircut_mode = "auto";break; + case 1: ircut_mode = "daylight";break; + case 2: ircut_mode = "night";break; + default:break; + } + switch($("#juan_envload\\#isp\\@wide_dynamic_range_enable")[0].selectedIndex) + { + case 0: wide_dynamic_range_enable = "yes";break; + case 1: wide_dynamic_range_enable = "no";break; + default:break; + } + switch($("#juan_envload\\#isp\\@exposure_mode")[0].selectedIndex) + { + case 0: exposure_mode = "auto";break; + case 1: exposure_mode = "bright";break; + case 2: exposure_mode = "dark";break; + default:break; + } + switch($("#juan_envload\\#isp\\@denoise_enable")[0].selectedIndex) + { + case 0: denoise_enable = "yes";break; + case 1: denoise_enable = "no";break; + default:break; + } + switch($("#juan_envload\\#isp\\@anti_fog_enable")[0].selectedIndex) + { + case 0: anti_fog_enable = "yes";break; + case 1: anti_fog_enable = "no";break; + default:break; + } + /*switch($("#juan_envload\\#isp\\@lowlight_enable")[0].selectedIndex) + { + case 0: lowlight_enable = "yes";break; + case 1: lowlight_enable = "no";break; + default:break; + } + switch($("#juan_envload\\#isp\\@gamma")[0].selectedIndex) + { + case 0: gamma = "default";break; + case 1: gamma = "normal";break; + case 2: gamma = "high";break; + default:break; + }*/ + switch($("#juan_envload\\#isp\\@defect_pixel_enable")[0].selectedIndex) + { + case 0: defect_pixel_enable = "yes";break; + case 1: defect_pixel_enable = "no";break; + default:break; + } + var str = $("#juan_envload\\#color\\@str")[0].value + "/" + slider_str.n_maxValue, + AEcom = $("#juan_envload\\#color\\@AEcom")[0].value + "/" + slider_AEcom.n_maxValue, + denoise_strength = $("#juan_envload\\#color\\@denoise_strength")[0].value + "/" + slider_denoise_strength.n_maxValue; + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + //xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:false, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); +// setTimeout("showInfo('已保嫿')",3000); + showInfo(langstr.save_refresh); + setTimeout("hideInfo()",disp_delaytime_ms); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + } + }); +} +function isp_preview_content(id,value) +{ + showInfo(langstr.update_preview); + //alert(id); +if(id == 'juan_envload#isp@scene_mode' ){ + //alert(value); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'juan_envload#isp@white_balance_mode' ){ + //alert(value); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'juan_envload#isp@ircut_control_mode' ){ + //alert(value); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'juan_envload#isp@ircut_mode' ){ + //alert(ircut_mode); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'juan_envload#isp@wide_dynamic_range_enable' ){ + //alert(wide_dynamic_range_enable); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'sl5slider' ){ + var str = $("#juan_envload\\#color\\@str")[0].value + "/" + slider_str.n_maxValue; + //alert(str); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'juan_envload#isp@exposure_mode' ){ + //alert(exposure_mode); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +} +else if(id == 'sl6slider' ){ + var AEcom = $("#juan_envload\\#color\\@AEcom")[0].value + "/" + slider_AEcom.n_maxValue; + //alert(AEcom); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'juan_envload#isp@denoise_enable' ){ + //alert(denoise_3d_enable); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +} +else if(id == 'sl7slider' ){ + var denoise_strength = $("#juan_envload\\#color\\@denoise_strength")[0].value + "/" + slider_denoise_strength.n_maxValue; + //alert(d2); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +} +else if(id == 'juan_envload#isp@anti_fog_enable' ){ + //alert(anti_fog_enable); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'juan_envload#isp@lowlight_enbale' ){ + //alert(lowlight_enbale); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'juan_envload#isp@gamma' ){; + //alert(gamma); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else if(id == 'juan_envload#isp@defect_pixel_enable' ){ + //alert(defect_pixel_enable); + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +}else{ + var xmlstr =''; + xmlstr += 'error'; + alert(xmlstr); + } +//alert(xmlstr); + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:false, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + showInfo(langstr.save_preview); + setTimeout("hideInfo()",3000); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + } + }); +} + + +//remote +function remote_data2ui(dvr_data) +{ + $("#juan_envload\\#ddns\\@url")[0].value = dvr_data.juan.conf.network.ddns.url; + $("#juan_envload\\#ddns\\@usr")[0].value = dvr_data.juan.conf.network.ddns.username; + $("#juan_envload\\#ddns\\@pwd")[0].value = dvr_data.juan.conf.network.ddns.password; + $("#juan_envload\\#pppoe\\@usr")[0].value = dvr_data.juan.conf.network.pppoe.username; + $("#juan_envload\\#pppoe\\@pwd")[0].value = dvr_data.juan.conf.network.pppoe.password; + switch (dvr_data.juan.conf.network.ddns.enable) + { + case "yes": $("#juan_envload\\#network\\@ddns_1")[0].checked = 1;break; + case "no": $("#juan_envload\\#network\\@ddns_0")[0].checked = 1;break; + default: break; + } + switch (dvr_data.juan.conf.network.pppoe.enable) + { + case "no": $("#juan_envload\\#network\\@pppoe_0")[0].checked = 1;break; + case "yes": $("#juan_envload\\#network\\@pppoe_1")[0].checked = 1;break; + default: break; + } + remote_change(); + switch (dvr_data.juan.conf.network.ddns.provider + "") + { + case "dyndns": $("#juan_envload\\#ddns\\@provider")[0].selectedIndex = 0;break; + case "noip": $("#juan_envload\\#ddns\\@provider")[0].selectedIndex = 1;break; + case "3322": $("#juan_envload\\#ddns\\@provider")[0].selectedIndex = 2;break; + case "changeip": $("#juan_envload\\#ddns\\@provider")[0].selectedIndex = 3;break; + case "popdvr": $("#juan_envload\\#ddns\\@provider")[0].selectedIndex = 4;break; + case "skybest": $("#juan_envload\\#ddns\\@provider")[0].selectedIndex = 5;break; + case "dvrtop": $("#juan_envload\\#ddns\\@provider")[0].selectedIndex = 6;break; + default: break; + } +} + +function remote_load_content() +{ + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:true, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + var dvr_data = xml2json.parser(data.xml, "", false); + remote_data2ui(dvr_data); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + alert("error:" + textStatus); + } + }); +} + +function remote_save_content() +{ + showInfo(langstr.save_setup); + var ddns_s,pppoe_s; + var prviders = document.getElementById("juan_envload#ddns@provider"); + + switch ($("#juan_envload\\#network\\@ddns_1")[0].checked) + { + case true: ddns_s = "yes";break; + case false: ddns_s = "no";break; + default: break; + } + switch ($("#juan_envload\\#network\\@pppoe_1")[0].checked) + { + case true: pppoe_s = "yes";break; + case false: pppoe_s = "no";break; + default: break; + } + + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:true, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + setTimeout("showInfo(langstr.save_refresh)",disp_delaytime_ms); + setTimeout("hideInfo()",hide_delaytime_ms); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + alert("error:" + textStatus); + } + }); +} + +function remote_change() +{ + if($("#juan_envload\\#network\\@ddns_1")[0].checked == 1) + { + $("#juan_envload\\#ddns\\@provider")[0].disabled = false; + $("#juan_envload\\#ddns\\@url")[0].disabled = false; + $("#juan_envload\\#ddns\\@usr")[0].disabled = false; + $("#juan_envload\\#ddns\\@pwd")[0].disabled = false; + } + else + { + $("#juan_envload\\#ddns\\@provider")[0].disabled = true; + $("#juan_envload\\#ddns\\@url")[0].disabled = true; + $("#juan_envload\\#ddns\\@usr")[0].disabled = true; + $("#juan_envload\\#ddns\\@pwd")[0].disabled = true; + } + + if($("#juan_envload\\#network\\@pppoe_1")[0].checked == 1) + { + $("#juan_envload\\#pppoe\\@usr")[0].disabled = false; + $("#juan_envload\\#pppoe\\@pwd")[0].disabled = false; + } + else + { + $("#juan_envload\\#pppoe\\@usr")[0].disabled = true; + $("#juan_envload\\#pppoe\\@pwd")[0].disabled = true; + } +} + +//network +function network_data2ui(dvr_data) +{ + switch (dvr_data.juan.conf.network.lan.dhcp) + { + case "yes": $("#juan_envload\\#network\\@dhcp_1")[0].checked = 1;break; + case "no": $("#juan_envload\\#network\\@dhcp_0")[0].checked = 1;break; + default:break; + }; + switch (dvr_data.juan.conf.network.esee.enable) + { + case "yes": $("#juan_envload\\#network\\@esee_1")[0].checked = 1;break; + case "no": $("#juan_envload\\#network\\@esee_0")[0].checked = 1;break; + default:break; + }; + switch (dvr_data.juan.conf.network.esee.id_disp) + { + case "yes": $("#juan_envload\\#network\\@id_disp_1")[0].checked = 1;break; + case "no": $("#juan_envload\\#network\\@id_disp_0")[0].checked = 1;break; + default:break; + }; + $("#juan_envload\\#network\\@mac")[0].value = dvr_data.juan.conf.network.mac; + $("#juan_envload\\#network\\@ip")[0].value = dvr_data.juan.conf.network.lan.static_ip; + $("#juan_envload\\#network\\@gateway")[0].value = dvr_data.juan.conf.network.lan.static_gateway; + $("#juan_envload\\#network\\@submask")[0].value = dvr_data.juan.conf.network.lan.static_netmask; + $("#juan_envload\\#network\\@dns")[0].value = dvr_data.juan.conf.network.lan.static_preferred_dns; + $("#juan_envload\\#network\\@dns2")[0].value = dvr_data.juan.conf.network.lan.static_alternate_dns; + $("#juan_envload\\#network\\@port")[0].value = dvr_data.juan.conf.network.lan.port0.value; + ip_config_change(); +} + +function network_load_content() +{ + var xml = ''; + xml += ''; + xml += ''; + xml += ''; + xml += '' + xml += '' + xml += '' + xml += ''; + xml += ''; + xml += ''; + xml += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xml, + async:true, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + var dvr_data = xml2json.parser(data.xml, "", false); + network_data2ui(dvr_data); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + alert("error:" + textStatus); + } + }); +} +function network_save_content() +{ + showInfo(langstr.save_setup); + var dhcp_s,esee_s; + switch ($("#juan_envload\\#network\\@dhcp_1")[0].checked) + { + case true: dhcp_s = "yes";break; + case false: dhcp_s = "no";break; + default: break; + }; + switch ($("#juan_envload\\#network\\@esee_1")[0].checked) + { + case true: esee_s = "yes";break; + case false: esee_s = "no";break; + default:break; + }; + switch ($("#juan_envload\\#network\\@id_disp_1")[0].checked) + { + case true: id_disp_s = "yes";break; + case false: id_disp_s = "no";break; + default:break; + }; + var xml = ''; + xml += ''; + xml += ''; + xml += ''; + xml += ''; + xml += ''; + xml += ''; + xml += ''; + xml += ''; + xml += ''; + xml += ''; +// alert(xml); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xml, + async:true, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + setTimeout("showInfo(langstr.save_refresh)",disp_delaytime_ms); + setTimeout("hideInfo()",hide_delaytime_ms); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + alert("error:" + textStatus); + } + }); + +} + +var default_mac; +var default_ip; +var default_port; +function save_mac_value() +{ + var mac_obj=document.getElementById('juan_envload#network@mac'); + default_mac=mac_obj.value; +} +function save_ipaddr(id) +{ + var ipaddr_obj=document.getElementById(id); + default_ip=ipaddr_obj.value; +} +function save_port() +{ + var port_obj=document.getElementById('juan_envload#network@port'); + default_port=port_obj.value; +} +function is_valid_mac() +{ + //mac地址正则表达嶍 + var mac_obj=document.getElementById('juan_envload#network@mac'); + var reg_name=/[A-F\d]{2}-[A-F\d]{2}-[A-F\d]{2}-[A-F\d]{2}-[A-F\d]{2}-[A-F\d]{2}/; + var reg_name_s=/[a-f\d]{2}-[a-f\d]{2}-[a-f\d]{2}-[a-f\d]{2}-[a-f\d]{2}-[a-f\d]{2}/; + if ((!reg_name.test(mac_obj.value)) && (!reg_name_s.test(mac_obj.value))) + { + alert(langstr.format_wrong+"22-24-21-19-BD-E4"); + mac_obj.value=default_mac; + return false; + } + return true; +} +function is_valid_ip(id) +{ + var ip_obj=document.getElementById(id); + var re=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/;//正则表达嶿 + if(re.test(ip_obj.value)) + { + if( RegExp.$1<256 && RegExp.$2<256 && RegExp.$3<256 && RegExp.$4<256) + return true; + } + alert(langstr.format_wrong+"192.168.1.234"); + ip_obj.value=default_ip; + return false; +} +function is_valid_port() +{ + var port_obj=document.getElementById('juan_envload#network@port'); + if(isNaN(port_obj.value)==true) + { + alert(langstr.port_wrong); + port_obj.value=default_port; + } + return true; +} + +function ip_config_change() +{ + if($("#juan_envload\\#network\\@dhcp_1")[0].checked ==1) + { + //alert("use dhcp"); + $("#juan_envload\\#network\\@ip")[0].disabled = true; + $("#juan_envload\\#network\\@gateway")[0].disabled = true; + $("#juan_envload\\#network\\@submask")[0].disabled = true; + $("#juan_envload\\#network\\@dns")[0].disabled = true; + $("#juan_envload\\#network\\@dns2")[0].disabled = true; + $("#juan_envload\\#network\\@port")[0].disabled = true; + } + else + { + //alert("use static ip"); + $("#juan_envload\\#network\\@ip")[0].disabled = false; + $("#juan_envload\\#network\\@gateway")[0].disabled = false; + $("#juan_envload\\#network\\@submask")[0].disabled = false; + $("#juan_envload\\#network\\@dns")[0].disabled = false; + $("#juan_envload\\#network\\@dns2")[0].disabled = false; + $("#juan_envload\\#network\\@port")[0].disabled = false; + } +} + +//alarmin +function alarmin_data2ui(dvr_data) +{ +} +function alarmin_load_content() +{ +} +function alarmin_save_content() +{ +} + +//capture +function capture_data2ui(dvr_data) +{ +} +function capture_load_content() +{ +} +function capture_save_content() +{ +} + +//ptz +function ptz_data2ui(dvr_data) +{ +} +function ptz_load_content() +{ +} +function ptz_save_content() +{ +} + +//user +$(function(){ + $(".pp").blur(function(){ + + var iii=0; + for(iii=0;iii<3;iii++) + { + if(this==$(".pp").eq(iii).get(0)) break; + } + if($(this).get(0).value != $(".p").eq(iii).get(0).value ) + { + $(this).get(0).value=""; + $(this).get(0).focus(); + alert("Confirm password is different from password, Please retry!"); + } + }); +}); + +//devinfo +function devinfo_load_content(bflag) +{ + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:true, + dataType: 'jsonp', + jsonp: 'jsoncallback', + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data); + var dvr_data = xml2json.parser(data.xml, "", false); + $("#juan\\#devinfo\\@name")[0].value = dvr_data.juan.conf.info.device_name; + $("#juan\\#devinfo\\@model")[0].value = dvr_data.juan.conf.info.device_model; + $("#juan\\#devinfo\\@hwver")[0].value = dvr_data.juan.conf.info.hardware_version; + $("#juan\\#devinfo\\@swver")[0].value = dvr_data.juan.conf.info.software_version; + $("#juan\\#devinfo\\@reldatetime")[0].value = dvr_data.juan.conf.info.build_date + " " + dvr_data.juan.conf.info.build_time; + $("#juan\\#devinfo\\@alarmnum")[0].value = dvr_data.juan.conf.spec.io_alarm; + $("#juan\\#devinfo\\@sdnum")[0].value = dvr_data.juan.conf.spec.sd_card; + //alert("current model:"+dvr_data.juan.conf.info.device_model); + if(bflag==false){ + //alert(dvr_data.juan.conf.info.device_soc); + video_load_content(dvr_data.juan.conf.info.device_soc, dvr_data.juan.conf.info.sensor_type); + } + }, + complete: function(XMLHttpRequest, textStatus){ +// alert("complete:" + textStatus); + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + alert("error:" + textStatus); + } + }); +} + +var user_management_target = ""; +function user_management_prepare_rm() +{ + $("#tbl_add_user")[0].style.display = "none"; + $("#tbl_modify_pwd")[0].style.display = "none"; + if(confirm(langstr.delete_confirm)) + { + user_management_save_del_usr(); + } +} +function user_management_save_del_usr() +{ +// show_loading("save_del_usr()"); + + var xmlstr = ""; + xmlstr += ""; + xmlstr += ""; + xmlstr += ""; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/user/del_user.xml", + processData: false, + cache: false, + data: "username=" + g_usr + "&password=" + g_pwd + "&content=" + xmlstr, + async:true, + + beforeSend: function(XMLHttpRequest){ +// alert("beforeSend"); + }, + success: function(data, textStatus, xmlhttp){ +// alert("recv:" + data.xml); +// alert(xmlhttp.responseText); + var dvr_data = xml2json.parser(xmlhttp.responseText, "", false); + if(dvr_data.user.ret != "success") + { + alert(langstr.delete_fail); + } + else + { + user_management_load_content(); + } +// user_management_data2ui(dvr_data); + + + user_management_target = ""; + }, + complete: function(XMLHttpRequest, textStatus){ +// alert("complete:" + textStatus); + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + alert("error:" + textStatus); + } + }); +} + +function user_management_save_edit_usr() +{ + alert(document.getElementById('permit_admin').checked); + + var xmlstr = ""; + xmlstr += ""; + xmlstr += ""; + xmlstr += ""; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/user/add_user.xml", + processData: false, + cache: false, + data: "username=" + g_usr + "&password=" + g_pwd + "&content=" + xmlstr, + async:true, + + beforeSend: function(XMLHttpRequest){ +// alert("beforeSend"); + }, + success: function(data, textStatus, xmlhttp){ +// alert("recv:" + data.xml); +// alert(xmlhttp.responseText); + var dvr_data = xml2json.parser(xmlhttp.responseText, "", false); + if(dvr_data.user.ret != "success") + { + alert(langstr.add_fail); + } + else + { + user_management_load_content(); + } +// user_management_data2ui(dvr_data); + + + user_management_target = ""; + }, + complete: function(XMLHttpRequest, textStatus){ +// alert("complete:" + textStatus); + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + alert("error:" + textStatus); + } + }); +} + +function user_management_prepare_add() +{ + $("#tbl_add_user")[0].style.display = "block"; + $("#tbl_modify_pwd")[0].style.display = "none"; +} + + +function user_management_save_new_usr() +{ + var use = document.getElementById("txt_new_usr").value; + if(use==null || use=="") + { + alert(langstr.warning); + document.getElementById('username').focus(); + + return false; + } + + $("#tbl_add_user")[0].style.display = "none"; + $("#tbl_modify_pwd")[0].style.display = "none"; + + user_management_target = $("#txt_new_usr")[0].value; + //alert(user_management_target); + var xmlstr = ""; + xmlstr += ""; + xmlstr += ""; + xmlstr += ""; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/user/add_user.xml", + processData: false, + cache: false, + data: "username=" + g_usr + "&password=" + g_pwd + "&content=" + xmlstr, + async:true, + + beforeSend: function(XMLHttpRequest){ +// alert("beforeSend"); + }, + success: function(data, textStatus, xmlhttp){ +// alert("recv:" + data.xml); +// alert(xmlhttp.responseText); + var dvr_data = xml2json.parser(xmlhttp.responseText, "", false); + if(dvr_data.user.ret != "success") + { + alert(langstr.add_fail); + } + else + { + user_management_load_content(); + } +// user_management_data2ui(dvr_data); + + + user_management_target = ""; + }, + complete: function(XMLHttpRequest, textStatus){ +// alert("complete:" + textStatus); + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + alert("error:" + textStatus); + } + }); +} +function user_management_prepare_modify() +{ + $("#tbl_add_user")[0].style.display = "none"; + $("#tbl_modify_pwd")[0].style.display = "block"; +} +function user_management_prepare_save_modify_usr() +{ + if($("#txt_old_pwd")[0].value != g_pwd) + { + alert(langstr.old_pwd_wrong); + return; + } + if($("#txt_modify_pwd")[0].value != $("#txt_repeat_pwd")[0].value) + { + alert(langstr.confirm_pwd_wrong); + return; + } + + $("#tbl_add_user")[0].style.display = "none"; + $("#tbl_modify_pwd")[0].style.display = "none"; + + user_management_dvr_target = g_usr; + + var xmlstr = ""; + xmlstr += ""; + xmlstr += ""; + xmlstr += ""; + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/user/set_pass.xml", + processData: false, + cache: false, + data: "username=" + g_usr + "&password=" + g_pwd + "&content=" + xmlstr, + async:true, + + beforeSend: function(XMLHttpRequest){ +// alert("beforeSend"); + }, + success: function(data, textStatus, xmlhttp){ +// alert("recv:" + data.xml); +// alert(xmlhttp.responseText); + var dvr_data = xml2json.parser(xmlhttp.responseText, "", false); + if(dvr_data.user.ret != "success") + { + alert(langstr.modify_pwd_fail); + } + else{ + alert(langstr.modify_success); + } + + user_management_target = ""; + }, + complete: function(XMLHttpRequest, textStatus){ +// alert("complete:" + textStatus); + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + alert("error:" + textStatus); + } + }); +} +function user_management_prepare_cancel() +{ + $("#tbl_add_user")[0].style.display = "none"; + $("#tbl_modify_pwd")[0].style.display = "none"; + + user_management_target = ""; +} + +function user_management_data2ui(dvr_data) +{ + var user_count = dvr_data.user.user_list.count; + var tbl = $("#tbl_user_manage")[0]; +// alert(tbl.rows.length); + for(var i = tbl.rows.length - 1; i >= 2; i--) + { + tbl.deleteRow(i); + } + if(eval("dvr_data.user.add_user") == "no") + { + document.getElementById('add_user_button').disabled=true; + }else + { + document.getElementById('add_user_button').disabled=false; + } + for(var i = 1; i < user_count+1; i++) + { + var tr = tbl.insertRow(tbl.rows.length); + var td; + var str; + + td = tr.insertCell(tr.cells.length); + td.innerHTML = eval("dvr_data.user.user_list.user" + i + ".name"); + + td = tr.insertCell(tr.cells.length); + var permit_admin = ""; +// var permit_live = ""; + var permit_setting = ""; + var permit_playback = ""; + + if(eval("dvr_data.user.user_list.user" + i + ".admin") == "yes") + { + permit_admin = "checked"; + } +// if(eval("dvr_data.user.user_list.user" + i + ".permit_live") == "yes") +// { +// permit_live = "checked"; +// } + if(eval("dvr_data.user.user_list.user" + i + ".permit_setting") == "yes") + { + permit_setting = "checked"; + } + if(eval("dvr_data.user.user_list.user" + i + ".permit_playback") == "yes") + { + permit_playback = "checked"; + } + str = ""; + str += ""+(langstr.permit_admin)+""; + // str += "permit_live"; + str += ""+(langstr.permit_setting)+""; + str += ""+(langstr.playback)+""; + td.innerHTML = str; + + td = tr.insertCell(tr.cells.length); + var edit_user = ""; + var del_user = ""; +// var set_pass = ""; + edit_user = "disabled" + if(eval("dvr_data.user.user_list.user" + i + ".edit_user") == "no") + { + edit_user = "disabled"; + } + if(eval("dvr_data.user.user_list.user" + i + ".del_user") == "no") + { + del_user = "disabled"; + } +// if(eval("dvr_data.user.user_list.user" + i + ".set_pass") == "no") +// { +// set_pass = "disabled"; +// } + str = ""; + str += ""; + str += ""; +// str += ""; + td.innerHTML = str; + } +} + +function user_management_load_content() +{ +// var xmlstr = ''; +// xmlstr += ''; +// xmlstr += ''; +// xmlstr += ''; +// xmlstr += ''; +// xmlstr += ''; +// xmlstr += ''; +//// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/user/user_list.xml", + processData: false, + cache: false, + data: "username=" + g_usr + "&password=" + g_pwd, + async:true, +// dataType: 'get', +// jsonp: 'jsoncallback', + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus, xmlhttp){ +// alert("recv:" + data); +// alert(xmlhttp.responseText); + var dvr_data = xml2json.parser(xmlhttp.responseText, "", false); + if(dvr_data.user.ret != "success") + { + alert(langstr.login_fail); + } + else + { + user_management_data2ui(dvr_data); + } + }, + complete: function(XMLHttpRequest, textStatus){ +// alert("complete:" + textStatus); + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + alert("error:" + textStatus); + } + }); +} + + +//reboot +function reboot() +{ + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:true, +// dataType: 'jsonp', +// jsonp: 'jsoncallback', + + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + var dvr_data = xml2json.parser(data, "", false); + setTimeout("showInfo(langstr.reboot_refresh)",disp_delaytime_ms); + setTimeout("hideInfo()",hide_delaytime_ms); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + $("#result").html(lang.reboot_failed); + $("#result").css("color","red"); + } + }); +} + +//time +var strYear,strMonth,strDate,strHour,strMin,strSen; +Date.prototype.toFormatString=function() +{ + strYear=this.getUTCFullYear().toString(); + if (strYear.length<4) + { + var i = 4-strYear.length; + for (var j = 0; j < i; j++) + { + strYear = "0" + strYear; + } + } + strMonth=(this.getUTCMonth()+parseInt(1)).toString(); + strMonth=(strMonth.length==1)?("0"+strMonth):strMonth + strDate=this.getUTCDate().toString(); + strDate=(strDate.length==1)?("0"+strDate):strDate + strHour=this.getUTCHours().toString(); + strHour=(strHour.length==1)?("0"+strHour):strHour + strMin=this.getUTCMinutes().toString(); + strMin=(strMin.length==1)?("0"+strMin):strMin + strSen=this.getUTCSeconds().toString(); + strSen=(strSen.length==1)?("0"+strSen):strSen +} + +function time_data2ui(dvr_data) +{ + var utc_devtime = parseInt(dvr_data.juan.setup.time.value)*1000; + var devtime = new Date(utc_devtime); + devtime.toFormatString(); + switch(dvr_data.juan.conf.datetime.date_separator) + { + case "-": $("#date_break")[0].selectedIndex = 0;break; + case "/": $("#date_break")[0].selectedIndex = 1;break; + case ".": $("#date_break")[0].selectedIndex = 2;break; + default: break; + } + switch(dvr_data.juan.conf.datetime.date_format) + { + case "yyyymmdd": + $("#date_form")[0].selectedIndex = 0; + break; + case "mmddyyyy": + $("#date_form")[0].selectedIndex = 1; + break; + case "ddmmyyyy": + $("#date_form")[0].selectedIndex = 2; + break; + default: break; + } + $("#time_zone")[0].value = dvr_data.juan.conf.datetime.time_zone; + $("#daylight_time")[0].value = dvr_data.juan.conf.datetime.day_saving_time; + + switch (dvr_data.juan.conf.datetime.ntp_sync) + { + case "yes": $("#juan_envload\\#time\\@ntp_1")[0].checked = 1;break; + case "no": $("#juan_envload\\#time\\@ntp_0")[0].checked = 1;break; + default:break; + }; + switch (dvr_data.juan.conf.datetime.ntp_user_domain) + { + case "": + $("#juan_envload\\#time\\@ntp_server")[0].selectedIndex = 0; + break; + case "": + $("#juan_envload\\#time\\@ntp_server")[0].selectedIndex = 1; + break; + case "": + $("#juan_envload\\#time\\@ntp_server")[0].selectedIndex = 2; + break; + default: break; + } + ntp_change(); + + showtime(); +} + +function time_load_content() +{ + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:true, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + var dvr_data = xml2json.parser(data.xml, "", false); + time_data2ui(dvr_data); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + } + }); +} + +function time_save_content() +{ + showInfo(langstr.save_setup); + var date_form,date_break; + switch($("#date_form")[0].selectedIndex) + { + case 0: date_form = "yyyymmdd";break; + case 1: date_form = "mmddyyyy";break; + case 2: date_form = "ddmmyyyy";break; + default: break; + }; + switch($("#date_break")[0].selectedIndex) + { + case 0: date_break = "-";break; + case 1: date_break = "/";break; + case 2: date_break = ".";break; + default: break; + }; + var ntp_s,ntp_domain; + if ($("#juan_envload\\#time\\@ntp_1")[0].checked == true) + { + ntp_s = "yes"; + }else ntp_s = "no"; + switch ($("#juan_envload\\#time\\@ntp_server")[0].selectedIndex) + { + case 0: + ntp_domain = "time.windows.com"; + break; + case 1: + ntp_domain = "time.nist.gov"; + break; + default: break; + } + +// savetime(); + + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:true, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + setTimeout("showInfo(langstr.save_refresh)",disp_delaytime_ms); + setTimeout("hideInfo()",hide_delaytime_ms); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + } + }); +} +function showtime() +{ + var time_show = ""; + var datebreak = $("#date_break")[0].value; + switch ($("#date_form")[0].selectedIndex) + { + case 0: + time_show = strYear+datebreak+strMonth+datebreak+strDate+" "; + break; + case 1: + time_show = strMonth+datebreak+strDate+datebreak+strYear+" "; + break; + case 2: + time_show = strDate+datebreak+strMonth+datebreak+strYear+" "; + break; + default: + break; + } + time_show += strHour+":"+strMin+":"+strSen; + $("#curent_time")[0].value = time_show; +} +function savetime() +{ + //showInfo(langstr.sync_time_now); + var currentset_date = new Date(); + currentset_date.setFullYear(parseInt(strYear, 10)); + currentset_date.setMonth(parseInt(strMonth, 10)-1); + currentset_date.setDate(parseInt(strDate, 10)); + currentset_date.setHours(parseInt(strHour, 10)); + currentset_date.setMinutes(parseInt(strMin, 10)); + currentset_date.setSeconds(parseInt(strSen, 10)); + var currentset_utc = currentset_date.getTime()/1000; +// + currentset_date.getTimezoneOffset()*60; +// alert(currentset_utc); + + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:true, + dataType: 'jsonp', + jsonp: 'jsoncallback', + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ + //setTimeout("showInfo(langstr.sync_refresh)",disp_delaytime_ms); + //setTimeout("hideInfo()",hide_delaytime_ms); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + } + }); +} +function sync_pc_time() +{ + strYear = yy; + strMonth = mm; + strDate = dd; + strHour = hh; + strMin = mi; + strSen = ss; + showtime(); + savetime(); +} + +function manual_set_time() +{ + var date_sep,time_sep; + date_sep = $("#m_date")[0].value.split("-"); + time_sep = $('.in');//$("#m_time")[0].value.split(":"); + strYear = date_sep[0]; strHour = $('.in').eq(0).val(); + strMonth = date_sep[1]; strMin = $('.in').eq(1).val(); + strDate = date_sep[2]; strSen = $('.in').eq(2).val(); + showtime(); + savetime(); +} + +function is_valid_zone() +{ + var obj_zone=document.getElementById('time_zone'); + var str=obj_zone.value; + var a = str.match(/^-?[1-9]$|^-?1[1-2]$|^0$/); + if (a == null) + { + alert('时区范围:\n [-12~12]'); + obj_zone.value="8"; + return false; + } + return true; +} + +function is_valid_daylight() +{ + var obj_daylight=document.getElementById('daylight_time'); + var str=obj_daylight.value; + var a = str.match(/^-?[1-3]$|^0$/); + if (a == null) + { + alert('夏令时范围:\n [-3~3]'); + obj_daylight.value="0"; + return false; + } + return true; +} + +function is_valid_time() +{ + obj_time=document.getElementById('m_time'); + var str=obj_time.value; + var a = str.match(/^(\d{2})(:)?(\d{2})\2(\d{2})$/); + if (a == null) + { + alert(langstr.format_wrong+'13:23:05'); + obj_time.value="00:00:00"; + return false; + } + if (a[1]>24 || a[3]>60 || a[4]>60) + { + alert(langstr.format_wrong+'13:23:05'); + obj_time.value="00:00:00"; + return false; + } + return true; +} + +function is_valid_date() +{ + obj_date=document.getElementById('m_date'); + var str=obj_date.value; + var r = str.match(/^(\d{1,4})(-|\/)(\d{2})\2(\d{2})$/); + if(r==null) + { + alert(langstr.format_wrong+"2012-01-01"); + obj_date.value="0000-00-00"; + return false; + } + var d= new Date(r[1], r[3]-1, r[4]); + if ((d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4])==false) + { + alert(langstr.format_wrong+"2012-01-01"); + obj_date.value="0000-00-00"; + return false; + } + return true; +} + +function ntp_change() +{ + if ($("#juan_envload\\#time\\@ntp_1")[0].checked == 1) + { + $("#juan_envload\\#time\\@ntp_server")[0].disabled = false; + }else + { + $("#juan_envload\\#time\\@ntp_server")[0].disabled = true; + } +} + +//default_setting +function default_setting() +{ + var xmlstr = ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; + xmlstr += ''; +// alert(xmlstr); + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/cgi-bin/gw2.cgi?f=j", + processData: false, + cache: false, + data: "xml=" + xmlstr, + async:true, +// dataType: 'jsonp', +// jsonp: 'jsoncallback', + + + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus){ +// alert("recv:" + data.xml); + var dvr_data = xml2json.parser(data, "", false); + setTimeout("showInfo(langstr.save_refresh)",disp_delaytime_ms); + setTimeout("hideInfo()",hide_delaytime_ms); + }, + complete: function(XMLHttpRequest, textStatus){ + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + $("#result").html(lang.restore_failed); + $("#result").css("color","red"); + } + }); +} + + + + +var upload_persent = 0; +$(function(){ + $('#swfupload-control').swfupload({ + upload_url: "/cgi-bin/upload.cgi", + file_size_limit : "16384", + file_types : "*.rom", + file_types_description : "Upgrade File", + file_upload_limit : "0", + flash_url : "images/swfupload.swf", + button_image_url : 'images/XPButtonUploadText_61x22.png', + button_width : 61, + button_height : 22, +// button_text_top_padding : 5, +// button_text_left_padding : 5, + button_text_style : "font-size: 22pt;", + button_text : langstr.upgrade, + button_disabled : false, + button_placeholder : $('#button')[0], + debug: false, + custom_settings : {something : "here"} + }) + .bind('swfuploadLoaded', function(event){ + //$('#log').append('
  • Loaded
  • '); + $('#txt_status')[0].innerHTML = ""; + }) + .bind('fileQueued', function(event, file){ + //$('#log').append('
  • File queued - '+file.name+'
  • '); + // start the upload since it's queued + $(this).swfupload('startUpload'); + }) + .bind('fileQueueError', function(event, file, errorCode, message){ + //$('#log').append('
  • File queue error - '+message+'
  • '); + $('#txt_status')[0].innerHTML = langstr.file_error+ message; + $('#txt_progress')[0].innerHTML = ""; + }) + .bind('fileDialogStart', function(event){ + //$('#log').append('
  • File dialog start
  • '); + }) + .bind('fileDialogComplete', function(event, numFilesSelected, numFilesQueued){ + //$('#log').append('
  • File dialog complete
  • '); + }) + .bind('uploadStart', function(event, file){ + //$('#log').append('
  • Upload start - '+file.name+'
  • '); + $('#txt_status')[0].innerHTML = langstr.start_upload; + $(this).swfupload('setButtonDisabled', true); + }) + .bind('uploadProgress', function(event, file, bytesLoaded){ + //$('#log').append('
  • Upload progress - '+bytesLoaded+'
  • '); + var str = ""; + var persent = bytesLoaded/file.size*100 + ""; + upload_persent = bytesLoaded/file.size*100; + for(var i = 0; i < bytesLoaded/file.size*10; i++){ + str += "|"; + } + if(upload_persent < 100){ + persent = persent.substr(0, 2); + } + if(upload_persent >= 100){ + persent = persent.substr(0, 3); + } + str += persent + "%"; + $('#txt_progress')[0].innerHTML = str; + }) + .bind('uploadSuccess', function(event, file, serverData){ + //$('#log').append('
  • Upload success - '+file.name+'
  • '); + $('#txt_status')[0].innerHTML = langstr.stop_upload; + }) + .bind('uploadComplete', function(event, file){ + //$('#log').append('
  • Upload complete - '+file.name+'
  • '); + if(upload_persent >= 100) + { + $('#txt_status')[0].innerHTML = langstr.stop_upload; + get_upgrade_rate(); + } + else + { + $('#txt_status')[0].innerHTML = langstr.wait_reboot; + } + // upload has completed, lets try the next one in the queue + $(this).swfupload('startUpload'); + }) + .bind('uploadError', function(event, file, errorCode, message){ + //$('#log').append('
  • Upload error - '+message+'
  • '); + $('#txt_status')[0].innerHTML = langstr.fail_upload; + }); +}); + +var upgrade_persent = 0; +function get_upgrade_rate() +{ + $.ajax({ + type:"GET", + url: "/cgi-bin/upgrade_rate.cgi?cmd=upgrade_rate", + processData: false, + cache: false, + data: "", + async:true, + beforeSend: function(XMLHttpRequest){ + //alert("beforeSend"); + }, + success: function(data, textStatus){ +// alert("recv:" + data); + $('#txt_upgrade_status')[0].innerHTML = langstr.writing_firmware; + upgrade_persent = parseInt(data); + + var str = ""; + var persent = upgrade_persent + ""; + for(var i = 0; i < persent/10; i++){ + str += "|"; + } + if(persent != "100"){ + persent = persent.substr(0, 2); + } + str += persent + "%"; + $('#txt_upgrade_progress')[0].innerHTML = str; + }, + complete: function(XMLHttpRequest, textStatus){ + //alert("complete:" + textStatus); + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + //alert("error"); + } + }); + + if(upgrade_persent <= 99) + { + setTimeout("get_upgrade_rate()", 1000); + } + else + { + alert(langstr.upgrade_success); + } +} diff --git a/bin/web/js/index.css b/bin/web/js/index.css new file mode 100644 index 0000000..f7bea84 --- /dev/null +++ b/bin/web/js/index.css @@ -0,0 +1,44 @@ + +td{ + padding:0; +} +#txtLoadinInfo{ + background-color:#f33; + font-size:12px; + height:24px; + line-height:24px; + display:block; + color:#fff; + text-align:center; + margin:4px; + padding:0 8px; + border-radius:4px; +} +.alpha{ + filter:alpha(opacity=60); + width:400px; + } +.middle span{ + float:left; + font-size:15px; + font-family:Tahoma, Geneva, sans-serif; +} + +input{ + border-radius:10px; + border:2px solid #fff; + color:#999; +} +.button{ + cursor:pointer; + line-height:72px; + color:#999; + background-color:#ccc; +} +hr{ + height:1px; + border:none; + border-top:1px dashed #ccc; + width:70%; +} + diff --git a/bin/web/js/index.js b/bin/web/js/index.js new file mode 100644 index 0000000..af82f4e --- /dev/null +++ b/bin/web/js/index.js @@ -0,0 +1,203 @@ + var ipc_saved_usr = new Array(); + +var usr; +var pwd; +var dvr_url; +var g_ip; +var g_port; +var disp_delaytime_ms = 1000; +var hide_delaytime_ms = 7000; + + window.onload = function(){ + $('#userName').val(''); + //分析cookie值,显示上次的登陆信息 + //alert(document.cookie); + + var login = document.getElementById("submit").innerHTML; + + var str = Cookies.get("login"); + if(str != null) + { + var strs = str.split(","); + for(var i = 0; i < strs.length/2; i++) + { + ipc_saved_usr.push(new Array(strs[i*2 + 0], strs[i*2 + 1])); + } + $('#userName').val(strs[0]); + $('#password').val(strs[1]); + } + var tmp_ip=document.location.hostname; + g_ip=document.location.hostname; + var tmp_port=document.location.port; + if(tmp_port == "") //80 + { + tmp_port = 80; + } + else + { + var tmp_index = document.location.host.indexOf(":"); + tmp_ip = document.location.host.substring(0, tmp_index); + } + dvr_url = "http://" + tmp_ip + ":" + tmp_port; + + //写入点击事件 + $("#submit").click(function(){ + g_usr = $("#userName").val(); + g_pwd = $("#password").val(); + //var url = 'http'+document.location.hostname+':'+document.location.port; //'http://192.168.2.220:80'; //测试用地址 + /*var xml = loadXMLString(toXMLString("")); + //alert(xml); + $.ajax({ + type:"GET", + url:"/cgi-bin/gw.cgi", //地址有问题 + processData: false, + cache: false, + data: "xml=" + xml, + async:true, + success: function(data, textStatus){ + + + //alert(ipc_saved_usr.join()); + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + //alert(123); + } + });*/ + + dvr_ajax = $.ajax({ + type:"GET", + url: dvr_url + "/user/user_list.xml", + processData: false, + cache: false, + data: "username=" + g_usr + "&password=" + g_pwd, + async:true, +// dataType: 'get', +// jsonp: 'jsoncallback', + beforeSend: function(XMLHttpRequest){ + }, + success: function(data, textStatus, xmlhttp){ + //alert("recv:" + data); + //alert(xmlhttp.responseText); + var dvr_data = xml2json.parser(xmlhttp.responseText, "", false); + if(dvr_data.user.ret != "success") + { + setTimeout("showInfo(langstr.login_fail)",disp_delaytime_ms); + setTimeout("hideInfo()",hide_delaytime_ms); + //alert(langstr.login_fail); + } + else + { + if( $("saveCookie").checked){ + setCookie("userName",$("userName").value,24,"/"); + setCookie("password",$("password").value,24,"/"); + } + //alert("登陆成功,欢迎你," + userNameValue + "!"); + login_set(g_usr,g_pwd, $('#timeAlign').is(':checked')); + self.location.replace("view.html"); + } + }, + complete: function(XMLHttpRequest, textStatus){ +// alert("complete:" + textStatus); + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + //alert("error:" + textStatus); + //alert(langstr.login_fail); + setTimeout("showInfo(langstr.login_fail)",disp_delaytime_ms); + setTimeout("hideInfo()",hide_delaytime_ms); + } + }); + if(g_usr!=''){ + if($('#saveCookie').is(':checked')){ + save_usr(g_usr,g_pwd); + }else{ + del_usr(g_usr); + } + setCookie30Days("login", ipc_saved_usr.join()); + }else{ + Cookies.clear('login'); + } + }) +} + +/*if($('#saveCookie :selected')){ + var usr = $('#userName').val(); + var pwd = $('#password').val(); + } + + //var userNameValue = $("userName").value ? $('#userName').val() : $("userName").value;//取前台用户名的值 + //var passwordValue = $("password").value ? $('#password').val() : $("password").value; //取前台密码的值 + //服务器验证(模拟) 这里是对用户的一个验证.在项目中,你读取数据库的代码写在这 + var isUserA = userNameValue == "java" && passwordValue =="123456"; + var isMatched = isUserA; + if(isMatched){ //如果存在这个用户,就把用户名和密码存进cookie + if( $("saveCookie").checked){ + setCookie("userName",$("userName").value,24,"/"); + setCookie("password",$("password").value,24,"/"); + } + //alert("登陆成功,欢迎你," + userNameValue + "!"); + self.location.replace("login.html"); + } + //else alert("用户名或密码错误,请重新输入!");*/ + +function save_usr(_usr, _pwd) +{ + //save + var modified = false; + for(var i = 0; i < ipc_saved_usr.length; i++) + { + if(ipc_saved_usr[i][0] == _usr) //modify + { + ipc_saved_usr[i][1] = _pwd; + modified = true; + break; + } + } + if(modified == false) //add + { + ipc_saved_usr.push(new Array(_usr, _pwd)); + } +} + +function del_usr(_usr) +{ + //delete + for(var i = 0; i < ipc_saved_usr.length; i++) + { + if(ipc_saved_usr[i][0] == _usr) + { + ipc_saved_usr.splice(i, 1); + }else{ + Cookies.clear(_usr); + } + } +} +//显示信息 +function showInfo(para, callback){ + if(!$('#txtLoadinInfo').length){ + $('#message_here').append('' + para +''); + }else + { + $('#txtLoadinInfo')[0].innerText = para; + }; + $('#txtLoadinInfo').stop(false, true).css({ + opacity:0 + }).animate({ + opacity:1 + },250, function(){ + if ($.isFunction(callback)) { + callback(); + }; + }); +}; + +//隐藏信息 +function hideInfo(para){ + window.setTimeout(function(){ + $('#txtLoadinInfo').stop(false, true).animate({ + opacity:0 + }, 250, function(){ + $(this).remove(); + }); + }, para); +}; + diff --git a/bin/web/js/jquery.js b/bin/web/js/jquery.js new file mode 100644 index 0000000..006e953 --- /dev/null +++ b/bin/web/js/jquery.js @@ -0,0 +1,5 @@ +/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery.min.map +*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
    a",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="
    t
    ",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
    ",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; +return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="
    ",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) +}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("