"use strict"; window.runAjaxPoll = function( $, appcfg ) { var app_data = {"html":{"main":{"alert.html":"
\r\n\t
\r\n\t\t
\r\n\t\t
\r\n\t\t
\r\n\t
\r\n
\r\n","bgcolor.html":"
\r\n","bgimg.html":"
\r\n","bgraph.html":"
\n\t
\n\t\t
\n\t\t\t
\n\t\t
\n\t
\n
\n","cardtable.html":"
\r\n","cmark.html":"
\r\n\t
\r\n\t
\r\n\t\t
\r\n\t\t
\r\n\t\t
\r\n\t
\r\n
\r\n","html.html":"
%content%
\n","opt.html":"
\r\n\t
\r\n\t\t
\r\n\t
\r\n
\r\n","page.r.html":"
\r\n","page.v.html":"
\r\n","status.html":"
\r\n\t
\r\n\t\t
\r\n\t
\r\n
\r\n","toolbtn.html":"\r\n\t
\r\n\t\t
\r\n\t\t\t%image%\r\n\t\t\t%label%\r\n\t\t
\r\n\t
\r\n
\r\n","vcount.html":"
\r\n\t
\r\n\t\t
\r\n\t
\r\n
\r\n","vmark.html":"
\r\n\t
\r\n\t
\r\n\t\t
\r\n\t\t
\r\n\t
\r\n
\r\n","votebtn.html":"
\r\n\t
\r\n\t\t
\r\n\t\t\t
%label%
\r\n\t\t
\r\n\t
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n","vpercent.html":"
\r\n\t
\r\n\t\t
\r\n\t
\r\n
\r\n","vtotal.html":"
\r\n\t
\r\n\t\t
\r\n\t
\r\n
\r\n","wloader.html":"
\r\n\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
\r\n"},"pollinfo":{"pollinfo.html":"
\r\n"},"resetbtn":{"resetbtn.html":"
\r\n
\r\n
\r\n
\r\n
\r\n"},"shape":{"circle.html":"
\n\t
\n
\n","square.html":"
\n\t
\n
\n"}},"css":{"page":"/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-alert {\r\n\tposition:absolute !important;\r\n\tpadding:0 !important;\r\n\twidth:100%;\r\n\ttop:0;\r\n\tleft:0;\r\n\tvisibility:hidden;\r\n}\r\n.apsmx .apsmx-alert-ibox {\r\n\tposition:relative;\r\n\tmargin:0 !important;\r\n\toverflow:hidden;\r\n\tline-height:normal;\r\n\tbackground: linear-gradient(to left,\r\n\t\trgba(255,255,255,0.6) 0%,\r\n\t\trgba(0,0,0,0.6) 25%,\r\n\t\trgba(0,0,0,0.6) 75%,\r\n\t\trgba(255,255,255,0.6) 100%\r\n\t);\r\n}\r\n.apsmx .apsmx-alert-left-anim,\r\n.apsmx .apsmx-alert-right-anim {\r\n\tposition:absolute;\r\n\ttop:0;\r\n\twidth:0;\r\n\theight:100%;\r\n\tbackground:rgba(0,0,0,0.5);\r\n\tanimation-name:apsmx-kf-alert-anim;\r\n\tanimation-iteration-count:1;\r\n\tanimation-duration:2s;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n.apsmx .apsmx-alert-left-anim {\r\n\tleft:-50px;\r\n}\r\n.apsmx .apsmx-alert-right-anim {\r\n\tright:-50px;\r\n}\r\n@keyframes apsmx-kf-alert-anim {\r\n\t0% {\r\n\t\twidth:0;\r\n\t\topacity:1;\r\n\t}\r\n\t100% {\r\n\t\twidth:50%;\r\n\t\topacity:0;\r\n\t}\r\n}\r\n.apsmx .apsmx-alert-msg {\r\n\tposition:relative;\r\n\tmargin:10px;\r\n\tfont-size:110%;\r\n\ttext-align:center;\r\n\tcolor:yellow;\r\n}\r\n.apsmx .apsmx-alert[data-dir=\"up\"] .apsmx-alert-msg {\r\n\tanimation-name:apsmx-kf-alert-msg-anim;\r\n\tanimation-iteration-count:1;\r\n\tanimation-duration:1s;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n@keyframes apsmx-kf-alert-msg-anim {\r\n\t0% {\r\n\t\ttransform:translate(0,100%);\r\n\t\topacity:0;\r\n\t}\r\n\t100% {\r\n\t\ttransform:translate(0,0);\r\n\t\topacity:1;\r\n\t}\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n/* css-ctar */\r\n.apsmx {\r\n\tposition:relative !important;\r\n\toverflow:hidden,\r\n}\r\n/* poll */\r\n.apsmx .apsmx-poll {\r\n\tposition:relative !important;\r\n\tmargin:0 !important;\r\n\tpadding:0 !important;\r\n}\r\n.apsmx .apsmx-poll * {\r\n\toutline:none;\r\n}\r\n/* page */\r\n.apsmx .apsmx-page {\r\n\tposition:relative;\r\n\toverflow:hidden;\r\n}\r\n.apsmx .apsmx-page-voting {\r\n}\r\n.apsmx .apsmx-page-results {\r\n}\r\n/* user-select:none */\r\n.apsmx .apsmx-nosel {\r\n\t-webkit-user-select:none;\r\n\t-moz-user-select:none;\r\n\t-ms-user-select: none;\r\n\tuser-select:none;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-bgcolor {\r\n\tposition:absolute !important;\r\n\tmargin:0 !important;\r\n\tpadding:0 !important;\r\n\ttop:0;\r\n\tleft:0;\r\n\twidth:100%;\r\n\theight:100%;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-bgimg {\r\n\tposition:absolute !important;\r\n\tmargin:0 !important;\r\n\tpadding:0 !important;\r\n\ttop:0;\r\n\tleft:0;\r\n\twidth:100%;\r\n\theight:100%;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-bgraph {\r\n}\r\n.apsmx .apsmx-bgraph-bg {\r\n\tposition:relative !important;\r\n\toverflow:hidden;\r\n\theight:15px;\r\n\tbackground:rgba(255,255,255,0.3);\r\n}\r\n.apsmx .apsmx-bgraph-box {\r\n\tposition:absolute !important;\r\n\ttop:0 !important;\r\n\tleft:0 !important;\r\n\twidth:0%;\r\n\theight:100%;\r\n}\r\n.apsmx .apsmx-bgraph-inner {\r\n\twidth:0;\r\n\theight:100%;\r\n\tbackground:#cfc;\r\n}\r\n/* sanim:stretchbar(inner) */\r\n.apsmx .apsmx-sa-opt-go .apsmx-bgraph-inner.apsmx-sa-opt-stretchbar {\r\n\tanimation-name:apsmx-kf-sa-stretchbar-inner;\r\n\tanimation-timing-function:ease;\r\n}\r\n@keyframes apsmx-kf-sa-stretchbar-inner {\r\n\t0% { width:0%; }\r\n\t100% { width:100%; }\r\n}\r\n/* sanim:bouncebar(inner,box) */\r\n.apsmx .apsmx-sa-opt-ready.apsmx-sa-opt-bouncebar {\r\n\twidth:100%;\r\n}\r\n.apsmx .apsmx-sa-opt-go .apsmx-sa-opt-bouncebar {\r\n\tanimation-name:apsmx-kf-sa-bouncebar;\r\n}\r\n@keyframes apsmx-kf-sa-bouncebar {\r\n\t0% {\r\n\t\twidth:100%;\r\n\t\tanimation-timing-function:ease-in;\r\n\t}\r\n\t30% {\r\n\t\twidth:0%;\r\n\t\tanimation-timing-function:ease-out;\r\n\t}\r\n}\r\n/* sanim:flashbar(inner,bg) */\r\n.apsmx .apsmx-sa-opt-go .apsmx-bgraph-inner.apsmx-sa-opt-flashbar {\r\n\tanimation-name:apsmx-kf-sa-flashbar-inner;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n@keyframes apsmx-kf-sa-flashbar-inner {\r\n\t0% { opacity:0 }\r\n\t100% { width:100%; }\r\n}\r\n.apsmx .apsmx-sa-opt-go .apsmx-bgraph-bg.apsmx-sa-opt-flashbar {\r\n\tanimation-name:apsmx-kf-sa-flashbar-bg;\r\n\tanimation-timing-function:ease;\r\n}\r\n@keyframes apsmx-kf-sa-flashbar-bg {\r\n\t0% {\r\n\t\tbackground:rgba(255,255,255,1);\r\n\t\tbox-shadow:0px 0 50px 5px #fff;\r\n\t}\r\n\t100% {\r\n\t\tbackground:rgba(255,255,255,0.5);\r\n\t\tbox-shadow:0px 0 0 0 #fff;\r\n\t}\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-cmark {\r\n\tposition:relative !important;\r\n\tpadding:0 !important;\r\n}\r\n.apsmx .apsmx-cmark-height {\r\n\tposition:relative;\r\n\twidth:100%;\t\r\n\tpadding-top:100%;\r\n}\r\n.apsmx .apsmx-cmark-ibox {\r\n\tmargin:0 !important;\r\n\tposition:absolute !important;\r\n\ttop:0;\r\n\tleft:0;\r\n\twidth:100%;\r\n\theight:100%;\r\n\toverflow:hidden;\r\n\t/* setting */\r\n\tpadding:20%;\r\n}\r\n.apsmx .apsmx-cmark-bg-notallowed,\r\n.apsmx .apsmx-cmark-bg {\r\n\tmargin:0 !important;\r\n\tposition:absolute !important;\r\n\ttop:0;\r\n\tleft:0;\r\n\twidth:100%;\r\n\theight:100%;\r\n\tborder-radius:3px;\r\n\toverflow:hidden;\r\n}\r\n.apsmx .apsmx-cmark-imgbox {\r\n\tposition:relative !important;\r\n\twidth:100%;\r\n\theight:100%;\r\n\topacity:0;\r\n\t-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\r\n\tfilter: alpha(opacity=0);\r\n}\r\n/* size */\r\n.apsmx .apsmx-cmark {\r\n\twidth:40px;\r\n}\r\n.apsmx .apsmx-cmark[data-size=\"xs\"] {\r\n\twidth:20px;\r\n}\r\n.apsmx .apsmx-cmark[data-size=\"s\"] {\r\n\twidth:30px;\r\n}\r\n.apsmx .apsmx-cmark[data-size=\"m\"] {\r\n\twidth:40px;\r\n}\r\n.apsmx .apsmx-cmark[data-size=\"l\"] {\r\n\twidth:50px;\r\n}\r\n.apsmx .apsmx-cmark[data-size=\"xl\"] {\r\n\twidth:60px;\r\n}\r\n/* state:uncheck */\r\n.apsmx .apsmx-cmark-bg {\r\n\tbackground-color:black;\r\n\topacity:0.3;\r\n}\r\n/* state:check */\r\n.apsmx .apsmx-oss-checked .apsmx-cmark-bg {\r\n\topacity:0.6;\r\n}\r\n.apsmx .apsmx-oss-checked .apsmx-cmark-imgbox {\r\n\topacity:1;\r\n\t-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)\";\r\n\tfilter: alpha(opacity=100);\r\n}\r\n/* state:notallowed */\r\n.apsmx .apsmx-oss-notallowed .apsmx-cmark-bg-notallowed {\r\n\tbackground-color:rgba(255,0,0,1);\r\n\topacity:0;\r\n}\r\n.apsmx .apsmx-oss-notallowed .apsmx-cmark-bg-notallowed {\r\n\tanimation-name:apsmx-kf-cmark-bg-notallowed;\r\n\tanimation-iteration-count:1;\r\n\tanimation-duration:1s;\r\n}\r\n@keyframes apsmx-kf-cmark-bg-notallowed {\r\n\t50% {\r\n\t\topacity:0.6;\r\n\t}\r\n}\r\n.apsmx .apsmx-oss-notallowed .apsmx-cmark-imgbox {\r\n\tanimation-name:apsmx-kf-oss-notallowed-imgbox;\r\n\tanimation-iteration-count:3;\r\n\tanimation-duration:0.3s;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n@keyframes apsmx-kf-oss-notallowed-imgbox {\r\n\t0% {\r\n\t\topacity:0;\r\n\t}\r\n\t50% {\r\n\t\topacity:1;\r\n\t}\r\n\t100% {\r\n\t\topacity:0;\r\n\t}\r\n}\r\n/* anim:zoom */\r\n.apsmx .apsmx-oss-checked .apsmx-cmark.apsmx-cmark-zoom .apsmx-cmark-imgbox {\r\n\tanimation-name:apsmx-kf-oss-checked-zoom-imgbox;\r\n\tanimation-iteration-count:1;\r\n\tanimation-duration:0.3s;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n@keyframes apsmx-kf-oss-checked-zoom-imgbox {\r\n\t0% {\r\n\t\topacity:0;\r\n\t\ttransform:scale(0.3);\r\n\t}\r\n\t100% {\r\n\t\topacity:1;\r\n\t\ttransform:scale(1);\r\n\t}\r\n}\r\n.apsmx .apsmx-oss-unchecked .apsmx-cmark.apsmx-cmark-zoom .apsmx-cmark-imgbox {\r\n\tanimation-name:apsmx-kf-oss-unchecked-zoom-imgbox;\r\n\tanimation-iteration-count:1;\r\n\tanimation-duration:0.3s;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n@keyframes apsmx-kf-oss-unchecked-zoom-imgbox {\r\n\t0% {\r\n\t\topacity:1;\r\n\t\ttransform:scale(1);\r\n\t}\r\n\t100% {\r\n\t\topacity:0;\r\n\t\ttransform:scale(0.3);\r\n\t}\r\n}\r\n/* anim:spin */\r\n.apsmx .apsmx-oss-checked .apsmx-cmark.apsmx-cmark-rotate .apsmx-cmark-imgbox {\r\n\tanimation-name:apsmx-kf-oss-checked-spin-imgbox;\r\n\tanimation-iteration-count:1;\r\n\tanimation-duration:0.3s;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n@keyframes apsmx-kf-oss-checked-spin-imgbox {\r\n\t0% {\r\n\t\topacity:0;\r\n\t\ttransform:rotateY(-180deg) scale(0.5);\r\n\t}\r\n\t100% {\r\n\t\topacity:1;\r\n\t\ttransform:rotateY(0deg);\r\n\t}\r\n}\r\n.apsmx .apsmx-oss-unchecked .apsmx-cmark.apsmx-cmark-rotate .apsmx-cmark-imgbox {\r\n\tanimation-name:apsmx-kf-oss-unchecked-spin-imgbox;\r\n\tanimation-iteration-count:1;\r\n\tanimation-duration:0.6s;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n@keyframes apsmx-kf-oss-unchecked-spin-imgbox {\r\n\t0% {\r\n\t\topacity:1;\r\n\t\ttransform:rotateY(0deg);\r\n\t}\r\n\t100% {\r\n\t\topacity:0;\r\n\t\ttransform:rotateY(-180deg) scale(0.5);\r\n\t}\r\n}\r\n/* bounce */\r\n.apsmx .apsmx-oss-checked .apsmx-cmark.apsmx-cmark-bounce .apsmx-cmark-imgbox {\r\n\tanimation-name:apsmx-kf-oss-checked-bounce-imgbox;\r\n\tanimation-iteration-count:1;\r\n\tanimation-duration:1s;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n@keyframes apsmx-kf-oss-checked-bounce-imgbox {\r\n\t0% {\r\n\t\ttransform:translateY(-80%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t16% {\r\n\t\ttransform:translateY(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t32% {\r\n\t\ttransform:translateY(-30%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t48% {\r\n\t\ttransform:translateY(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t62% {\r\n\t\ttransform:translateY(-10%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t78% {\r\n\t\ttransform:translateY(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t90% {\r\n\t\ttransform:translateY(-3%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t100% {\r\n\t\ttransform:translateY(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n}\r\n.apsmx .apsmx-oss-unchecked .apsmx-cmark.apsmx-cmark-bounce .apsmx-cmark-imgbox {\r\n\topacity:1;\r\n\t-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)\";\r\n\tfilter: alpha(opacity=100);\r\n\tanimation-name:apsmx-kf-oss-unchecked-bounce-imgbox;\r\n\tanimation-iteration-count:1;\r\n\tanimation-duration:0.6s;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n@keyframes apsmx-kf-oss-unchecked-bounce-imgbox {\r\n\t0% {\r\n\t\ttransform:translateY(0%);\r\n\t\tanimation-timing-function:ease-out;\r\n\t}\r\n\t50% {\r\n\t\ttransform:translateY(-30%) rotateZ(10deg);\r\n\t\tanimation-timing-function:ease-in;\r\n\t}\r\n\t100% {\r\n\t\ttransform:translateY(130%) rotateZ(40deg);\r\n\t}\r\n}\r\n\r\n/*css\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\n//\n// Ajax Poll Script v4.12\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\n// Email : admin@phpkobo.com\n// ID : APSMX-412\n// URL : http://www.phpkobo.com/ajax_poll.php\n//\n// This software is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; version 2 of the\n// License.\n//\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\n*/\n.apsmx .apsmx-ea-page-ready,\n.apsmx .apsmx-ea-opt-ready {\n\tanimation-iteration-count:1;\n\tanimation-delay:0s;\n\tanimation-duration:0.5s;\n\tanimation-fill-mode:both;\n\tvisibility:hidden;\n}\n.apsmx .apsmx-ea-page-go .apsmx-ea-page-ready,\n.apsmx .apsmx-ea-opt-go .apsmx-ea-opt-ready {\n\topacity:0;\n\tvisibility:visible;\n}\n.apsmx .apsmx-ea-page-go .apsmx-ea-page-fadein,\n.apsmx .apsmx-ea-opt-go .apsmx-ea-opt-fadein {\n\tanimation-name:apsmx-kf-ea-fadein;\n}\n.apsmx .apsmx-ea-page-go .apsmx-ea-page-scroll-up,\n.apsmx .apsmx-ea-opt-go .apsmx-ea-opt-scroll-up {\n\tanimation-name:apsmx-kf-ea-scroll-up;\n}\n.apsmx .apsmx-ea-page-go .apsmx-ea-page-scroll-down,\n.apsmx .apsmx-ea-opt-go .apsmx-ea-opt-scroll-down {\n\tanimation-name:apsmx-kf-ea-scroll-down;\n}\n.apsmx .apsmx-ea-page-go .apsmx-ea-page-scroll-left,\n.apsmx .apsmx-ea-opt-go .apsmx-ea-opt-scroll-left {\n\tanimation-name:apsmx-kf-ea-scroll-left;\n}\n.apsmx .apsmx-ea-page-go .apsmx-ea-page-scroll-right,\n.apsmx .apsmx-ea-opt-go .apsmx-ea-opt-scroll-right {\n\tanimation-name:apsmx-kf-ea-scroll-right;\n}\n.apsmx .apsmx-ea-page-go .apsmx-ea-page-rotate-x,\n.apsmx .apsmx-ea-opt-go .apsmx-ea-opt-rotate-x {\n\tanimation-name:apsmx-kf-ea-rotate-x;\n}\n.apsmx .apsmx-ea-page-go .apsmx-ea-page-rotate-y,\n.apsmx .apsmx-ea-opt-go .apsmx-ea-opt-rotate-y {\n\tanimation-name:apsmx-kf-ea-rotate-y;\n}\n.apsmx .apsmx-ea-page-go .apsmx-ea-page-rotate-z,\n.apsmx .apsmx-ea-opt-go .apsmx-ea-opt-rotate-z {\n\tanimation-name:apsmx-kf-ea-rotate-z;\n}\n.apsmx .apsmx-ea-page-go .apsmx-ea-page-zoom-in,\n.apsmx .apsmx-ea-opt-go .apsmx-ea-opt-zoom-in {\n\tanimation-name:apsmx-kf-ea-zoom-in;\n}\n.apsmx .apsmx-ea-page-go .apsmx-ea-page-zoom-out,\n.apsmx .apsmx-ea-opt-go .apsmx-ea-opt-zoom-out {\n\tanimation-name:apsmx-kf-ea-zoom-out;\n}\n@keyframes apsmx-kf-ea-fadein {\n\t100% { opacity:1; }\n}\n@keyframes apsmx-kf-ea-scroll-up {\n\t0% { transform: translateY(100%); }\n\t100% { opacity:1; }\n}\n@keyframes apsmx-kf-ea-scroll-down {\n\t0% { transform: translateY(-100%); }\n\t100% { opacity:1; }\n}\n@keyframes apsmx-kf-ea-scroll-left {\n\t0% { transform: translateX(100%); }\n\t100% { opacity:1; }\n}\n@keyframes apsmx-kf-ea-scroll-right {\n\t0% { transform: translateX(-100%); }\n\t100% { opacity:1; }\n}@keyframes apsmx-kf-ea-rotate-x {\n\t0% { transform:rotateX(-90deg); }\n\t100% { opacity:1; }\n}\n@keyframes apsmx-kf-ea-rotate-y {\n\t0% { transform:rotateY(-90deg); }\n\t100% { opacity:1; }\n}\n@keyframes apsmx-kf-ea-rotate-z {\n\t0% { transform:rotateZ(-90deg); }\n\t100% { opacity:1; }\n}\n@keyframes apsmx-kf-ea-zoom-in {\n\t0% { transform:scale(0,0); }\n\t100% { opacity:1; }\n}\n@keyframes apsmx-kf-ea-zoom-out {\n\t0% { transform:scale(2,2); }\n\t100% { opacity:1; }\n}\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx-hosttool-topbox,\r\n.apsmx-hosttool-bottombox {\r\n\tbox-sizing:border-box;\r\n\tposition:relative;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx {\r\n\tposition:relative;\r\n\toverflow:hidden;\r\n}\r\n.apsmx * {\r\n\tbox-sizing:border-box;\r\n}\r\n.apsmx table,\r\n.apsmx tbody,\r\n.apsmx tfoot,\r\n.apsmx thead,\r\n.apsmx tr,\r\n.apsmx th,\r\n.apsmx td,\r\n.apsmx div,\r\n.apsmx span,\r\n.apsmx a,\r\n.apsmx img {\r\n\tmargin:0;\r\n\tpadding:0;\r\n\tborder:0;\r\n\tfont-size:100%;\r\n\tline-height:normal;\r\n\tvertical-align:middle;\r\n\tbackground:none;\r\n\ttext-decoration:none;\r\n\ttext-shadow:none;\r\n\tbox-shadow:none;\r\n\tanimation-name:none;\r\n\ttransition-property:none;\r\n}\r\n.apsmx table {\r\n\tborder-collapse:collapse;\r\n\tborder-spacing:0;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-cardtable {\r\n\tposition:relative;\r\n\tpadding:0 !important;\r\n\tmargin:0;\r\n}\r\n.apsmx .apsmx-opt-abox {\r\n\tvisibility:hidden;\r\n\tposition:absolute !important;\r\n\tleft:0;\r\n\ttop:0;\r\n\tmargin:0 !important;\r\n\tpadding:0;\r\n}\r\n.apsmx .apsmx-opt {\r\n\tposition:relative !important;\r\n\tpadding:0 !important;\r\n\tmargin:0;\r\n}\r\n.apsmx .apsmx-opt-ibox {\r\n\tposition:relative;\r\n\tmargin:0 !important;\r\n\tline-height:normal;\r\n\ttext-align:left;\r\n\t/* fix chorme bug: add z-index\r\n\tto enable \"overflow:hidden\" */\r\n\toverflow:hidden;\r\n\tz-index:0;\r\n}\r\n.apsmx .apsmx-opt:active {\r\n\t-webkit-tap-highlight-color:transparent;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n/* fadein */\r\n@keyframes apsmx-kf-a-fadein {\r\n\t0% {\r\n\t\topacity:0;\r\n\t}\r\n\t100% {\r\n\t\topacity:1;\r\n\t}\r\n}\r\n/* zoom-in */\r\n@keyframes apsmx-kf-a-zoom-in {\r\n\t0% {\r\n\t\topacity:0;\r\n\t\ttransform:scale(0,0);\r\n\t}\r\n\t100% {\r\n\t\topacity:1;\r\n\t\ttransform:scale(1,1);\r\n\t}\r\n}\r\n/* zoom-out */\r\n@keyframes apsmx-kf-a-zoom-out {\r\n\t0% {\r\n\t\topacity:0;\r\n\t\ttransform:scale(2,2);\r\n\t}\r\n\t100% {\r\n\t\topacity:1;\r\n\t\ttransform:scale(1,1);\r\n\t}\r\n}\r\n/* sway */\r\n@keyframes apsmx-kf-a-swayx {\r\n\t0% {\r\n\t\topacity:0;\r\n\t\ttransform:skew(35deg);\r\n\t}\r\n\t40% {\r\n\t\ttransform:skew(-3deg);\r\n\t}\r\n\t100% {\r\n\t\topacity:1;\r\n\t\ttransform:skew(0deg);\r\n\t}\r\n}\r\n@keyframes apsmx-kf-a-sway {\r\n\t0% {\r\n\t\ttransform-origin:bottom left;\r\n\t\topacity:0;\r\n\t\ttransform:skew(35deg);\r\n\t}\r\n\t25% {\r\n\t\topacity:1;\r\n\t\ttransform:skew(-20deg);\r\n\t}\r\n\t50% {\r\n\t\ttransform:skew(8deg);\r\n\t}\r\n\t75% {\r\n\t\ttransform:skew(-3deg);\r\n\t}\r\n\t100% {\r\n\t\ttransform:skew(0deg);\r\n\t}\r\n}\r\n/* rotate-x */\r\n.apsmx-poll .apsmx-opt-abox-a-rotate-x {\r\n\tperspective:1000px;\r\n}\r\n@keyframes apsmx-kf-a-rotate-x {\r\n\t0% {\r\n\t\ttransform:rotateX(-90deg);\r\n\t}\r\n\t100% {\r\n\t\ttransform:rotateX(0deg);\r\n\t}\r\n}\r\n/* rotate-y */\r\n.apsmx-poll .apsmx-opt-abox-a-rotate-y {\r\n\tperspective:1000px;\r\n}\r\n@keyframes apsmx-kf-a-rotate-y {\r\n\t0% {\r\n\t\ttransform:rotateY(-90deg);\r\n\t}\r\n\t100% {\r\n\t\ttransform:rotateY(0deg);\r\n\t}\r\n}\r\n/* rotate-z */\r\n@keyframes apsmx-kf-a-rotate-z {\r\n\t0% {\r\n\t\topacity:0;\r\n\t\ttransform:rotateZ(-180deg);\r\n\t}\r\n\t100% {\r\n\t\topacity:1;\r\n\t\ttransform:rotateZ(0deg);\r\n\t}\r\n}\r\n/* bounce-x */\r\n@keyframes apsmx-kf-a-bounce-x {\r\n\t0% {\r\n\t\topacity:0;\r\n\t\ttransform: translateX(-100%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t16% {\r\n\t\topacity:1;\r\n\t\ttransform: translateX(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t32% {\r\n\t\ttransform: translateX(-30%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t48% {\r\n\t\ttransform: translateX(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t62% {\r\n\t\ttransform: translateX(-10%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t78% {\r\n\t\ttransform: translateX(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t90% {\r\n\t\ttransform: translateX(-3%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t100% {\r\n\t\ttransform: translateX(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n}\r\n/* bounce-y */\r\n@keyframes apsmx-kf-a-bounce-y {\r\n\t0% {\r\n\t\topacity:0;\r\n\t\ttransform: translateY(-100%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t16% {\r\n\t\topacity:1;\r\n\t\ttransform: translateY(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t32% {\r\n\t\ttransform: translateY(-30%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t48% {\r\n\t\ttransform: translateY(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t62% {\r\n\t\ttransform: translateY(-10%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t78% {\r\n\t\ttransform: translateY(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t90% {\r\n\t\ttransform: translateY(-3%);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t100% {\r\n\t\ttransform: translateY(0%);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n}\r\n/* bounce-z */\r\n@keyframes apsmx-kf-a-bounce-z {\r\n\t0% {\r\n\t\topacity:0;\r\n\t\ttransform:scale(0,0);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t16% {\r\n\t\topacity:1;\r\n\t\ttransform:scale(1,1);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t32% {\r\n\t\ttransform:scale(0.7,0.7);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t48% {\r\n\t\ttransform:scale(1,1);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t62% {\r\n\t\ttransform:scale(0.9,0.9);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t78% {\r\n\t\ttransform:scale(1,1);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n\t90% {\r\n\t\ttransform:scale(0.97,0.97);\r\n\t\tanimation-timing-function: ease-in;\r\n\t}\r\n\t100% {\r\n\t\ttransform:scale(1,1);\r\n\t\tanimation-timing-function: ease-out;\r\n\t}\r\n}\r\n\r\n/* helper */\n.apsmx .apsmx-posy-opt-parentsize {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\twidth:100%;\n\theight:100%;\n}\n/* root */\n.apsmx .apsmx-posy-opt-root {\n\tposition:relative;\n\tmargin:0;\n\tpadding:0;\n}\n.apsmx .apsmx-posy-opt-root.apsmx-posy-opt-fheight {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\twidth:100%;\n\theight:100%;\n}\n/* layer */\n.apsmx .apsmx-posy-opt-layer {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\twidth:100%;\n\theight:100%;\n\tmargin:0;\n\tpadding:0;\n\tline-height:0;\n}\n.apsmx .apsmx-posy-opt-layer[data-posy-loc=\"front\"] {\n\tposition:relative;\n\twidth:auto;\n\theight:auto;\n}\n.apsmx .apsmx-posy-opt-root.apsmx-posy-opt-fheight .apsmx-posy-opt-layer[data-posy-loc=\"front\"] {\n\tposition:absolute;\n\twidth:100%;\n\theight:100%;\n}\n.apsmx .apsmx-posy-opt-layer-ibox {\n\tposition:relative;\n}\n.apsmx .apsmx-posy-opt-root.apsmx-posy-opt-fheight .apsmx-posy-opt-layer-ibox {\n\tposition:absolute;\n}\n/* row */\n.apsmx .apsmx-posy-opt-row {\n\tposition:relative;\n\tline-height:0;\n}\n.apsmx .apsmx-posy-opt-root.apsmx-posy-opt-fheight .apsmx-posy-opt-row {\n\tposition:absolute;\n\tleft:0;\n\tright:0;\n}\n.apsmx .apsmx-posy-opt-row-ibox {\n\tposition:relative;\n\tdisplay:table;\n\twidth:100%;\n}\n.apsmx .apsmx-posy-opt-row[data-row-type=\"no-padding\"] .apsmx-posy-opt-row-ibox {\n\tpadding:0 !important;\n}\n/* cell */\n.apsmx .apsmx-posy-opt-cell {\n\tposition:relative;\n\tdisplay:table-cell;\n\ttext-align:center;\n\tvertical-align:middle;\n}\n.apsmx .apsmx-posy-opt-cell[data-posy-loc=\"left\"] {\n\ttext-align:left;\n}\n.apsmx .apsmx-posy-opt-cell[data-posy-loc=\"right\"] {\n\ttext-align:right;\n}\n.apsmx .apsmx-posy-opt-row[data-posy-loc=\"main\"] .apsmx-posy-opt-cell {\n\ttext-align:center;\n}\n.apsmx .apsmx-posy-opt-row[data-posy-loc=\"main\"] .apsmx-posy-opt-cell[data-posy-loc=\"center\"] {\n\twidth:100%;\n}\n.apsmx .apsmx-posy-opt-cell-ibox {\n\tposition:relative;\n}\n.apsmx .apsmx-posy-opt-root.apsmx-posy-opt-fheight\n .apsmx-posy-opt-row[data-posy-loc=\"main\"]\n .apsmx-posy-opt-cell[data-posy-loc=\"center\"]\n .apsmx-posy-opt-cell-ibox {\n\toverflow-y:auto;\n}\n/* wrap */\n.apsmx .apsmx-posy-opt-wrap {\n\tposition:relative;\n\tdisplay:inline-block;\n\tline-height:normal;\n\tvertical-align:middle;\n}\n.apsmx .apsmx-posy-opt-wrap[data-wrap-type=\"block\"] {\n\tdisplay:block;\n}\n.apsmx .apsmx-posy-opt-wrap[data-wrap-type=\"fit-block\"] {\n\tpadding:0 !important;\n\tdisplay:block;\n}\n/* absolute positioning */\n.apsmx .apsmx-posy-opt-aploc {\n\tposition:absolute;\n\tline-height:0;\n}\n.apsmx .apsmx-posy-opt-apcenter {\n\tdisplay:inline-block;\n}\n.apsmx .apsmx-posy-opt-apmove {\n\tdisplay:inline-block;\n\tposition:relative;\n\tline-height:normal;\n}\n/* default padding between components */\n.apsmx .apsmx-posy-opt-layer-ibox,\n.apsmx .apsmx-posy-opt-cell-ibox {\n\tpadding:0;\n}\n.apsmx .apsmx-posy-opt-wrap,\n.apsmx .apsmx-posy-opt-row-ibox {\n\tpadding:2px;\n}\n/* opt specifics */\n.apsmx\n .apsmx-posy-opt-row[data-posy-loc=\"main\"]\n .apsmx-posy-opt-cell[data-posy-loc=\"center\"]\n .apsmx-posy-opt-wrap {\n\ttext-align:left;\n}\n\r\n/* helper */\n.apsmx .apsmx-posy-page-parentsize {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\twidth:100%;\n\theight:100%;\n}\n/* root */\n.apsmx .apsmx-posy-page-root {\n\tposition:relative;\n\tmargin:0;\n\tpadding:0;\n}\n.apsmx .apsmx-posy-page-root.apsmx-posy-page-fheight {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\twidth:100%;\n\theight:100%;\n}\n/* layer */\n.apsmx .apsmx-posy-page-layer {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\twidth:100%;\n\theight:100%;\n\tmargin:0;\n\tpadding:0;\n\tline-height:0;\n}\n.apsmx .apsmx-posy-page-layer[data-posy-loc=\"front\"] {\n\tposition:relative;\n\twidth:auto;\n\theight:auto;\n}\n.apsmx .apsmx-posy-page-root.apsmx-posy-page-fheight .apsmx-posy-page-layer[data-posy-loc=\"front\"] {\n\tposition:absolute;\n\twidth:100%;\n\theight:100%;\n}\n.apsmx .apsmx-posy-page-layer-ibox {\n\tposition:relative;\n}\n.apsmx .apsmx-posy-page-root.apsmx-posy-page-fheight .apsmx-posy-page-layer-ibox {\n\tposition:absolute;\n}\n/* row */\n.apsmx .apsmx-posy-page-row {\n\tposition:relative;\n\tline-height:0;\n}\n.apsmx .apsmx-posy-page-root.apsmx-posy-page-fheight .apsmx-posy-page-row {\n\tposition:absolute;\n\tleft:0;\n\tright:0;\n}\n.apsmx .apsmx-posy-page-row-ibox {\n\tposition:relative;\n\tdisplay:table;\n\twidth:100%;\n}\n.apsmx .apsmx-posy-page-row[data-row-type=\"no-padding\"] .apsmx-posy-page-row-ibox {\n\tpadding:0 !important;\n}\n/* cell */\n.apsmx .apsmx-posy-page-cell {\n\tposition:relative;\n\tdisplay:table-cell;\n\ttext-align:center;\n\tvertical-align:middle;\n}\n.apsmx .apsmx-posy-page-cell[data-posy-loc=\"left\"] {\n\ttext-align:left;\n}\n.apsmx .apsmx-posy-page-cell[data-posy-loc=\"right\"] {\n\ttext-align:right;\n}\n.apsmx .apsmx-posy-page-row[data-posy-loc=\"main\"] .apsmx-posy-page-cell {\n\ttext-align:center;\n}\n.apsmx .apsmx-posy-page-row[data-posy-loc=\"main\"] .apsmx-posy-page-cell[data-posy-loc=\"center\"] {\n\twidth:100%;\n}\n.apsmx .apsmx-posy-page-cell-ibox {\n\tposition:relative;\n}\n.apsmx .apsmx-posy-page-root.apsmx-posy-page-fheight\n .apsmx-posy-page-row[data-posy-loc=\"main\"]\n .apsmx-posy-page-cell[data-posy-loc=\"center\"]\n .apsmx-posy-page-cell-ibox {\n\toverflow-y:auto;\n}\n/* wrap */\n.apsmx .apsmx-posy-page-wrap {\n\tposition:relative;\n\tdisplay:inline-block;\n\tline-height:normal;\n\tvertical-align:middle;\n}\n.apsmx .apsmx-posy-page-wrap[data-wrap-type=\"block\"] {\n\tdisplay:block;\n}\n.apsmx .apsmx-posy-page-wrap[data-wrap-type=\"fit-block\"] {\n\tpadding:0 !important;\n\tdisplay:block;\n}\n/* absolute positioning */\n.apsmx .apsmx-posy-page-aploc {\n\tposition:absolute;\n\tline-height:0;\n}\n.apsmx .apsmx-posy-page-apcenter {\n\tdisplay:inline-block;\n}\n.apsmx .apsmx-posy-page-apmove {\n\tdisplay:inline-block;\n\tposition:relative;\n\tline-height:normal;\n}\n/* default padding between components */\n.apsmx .apsmx-posy-page-layer-ibox,\n.apsmx .apsmx-posy-page-cell-ibox {\n\tpadding:0;\n}\n.apsmx .apsmx-posy-page-wrap,\n.apsmx .apsmx-posy-page-row-ibox {\n\tpadding:0;\n}\n\r\n/*css\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\n//\n// Ajax Poll Script v4.12\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\n// Email : admin@phpkobo.com\n// ID : APSMX-412\n// URL : http://www.phpkobo.com/ajax_poll.php\n//\n// This software is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; version 2 of the\n// License.\n//\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\n*/\n/* ready */\n.apsmx .apsmx-sa-page-ready,\n.apsmx .apsmx-sa-opt-ready {\n\tanimation-iteration-count:1;\n\tanimation-duration:1s;\n\tanimation-timing-function:linear;\n\tanimation-fill-mode:forwards;\n}\n/* go */\n.apsmx .apsmx-sa-page-go .apsmx-sa-page-blink,\n.apsmx .apsmx-sa-opt-go .apsmx-sa-opt-blink {\n\tanimation-name:apsmx-kf-sa-blink;\n}\n.apsmx .apsmx-sa-page-go .apsmx-sa-page-wiggle,\n.apsmx .apsmx-sa-opt-go .apsmx-sa-opt-wiggle {\n\tanimation-name:apsmx-kf-sa-wiggle;\n}\n.apsmx .apsmx-sa-page-go .apsmx-sa-page-glow,\n.apsmx .apsmx-sa-opt-go .apsmx-sa-opt-glow {\n\tanimation-name:apsmx-kf-sa-glow;\n}\n.apsmx .apsmx-sa-page-go .apsmx-sa-page-rotate-x,\n.apsmx .apsmx-sa-opt-go .apsmx-sa-opt-rotate-x {\n\tanimation-name:apsmx-kf-sa-rotate-x;\n}\n.apsmx .apsmx-sa-page-go .apsmx-sa-page-rotate-y,\n.apsmx .apsmx-sa-opt-go .apsmx-sa-opt-rotate-y {\n\tanimation-name:apsmx-kf-sa-rotate-y;\n}\n.apsmx .apsmx-sa-page-go .apsmx-sa-page-rotate-z,\n.apsmx .apsmx-sa-opt-go .apsmx-sa-opt-rotate-z {\n\tanimation-name:apsmx-kf-sa-rotate-z;\n}\n.apsmx .apsmx-sa-page-go .apsmx-sa-page-zoom,\n.apsmx .apsmx-sa-opt-go .apsmx-sa-opt-zoom {\n\tanimation-name:apsmx-kf-sa-zoom;\n}\n.apsmx .apsmx-sa-page-go .apsmx-sa-page-bounce,\n.apsmx .apsmx-sa-opt-go .apsmx-sa-opt-bounce {\n\tanimation-name:apsmx-kf-sa-bounce;\n}\n/* keyframe */\n@keyframes apsmx-kf-sa-blink {\n\t40% { opacity:1; }\n\t50% { opacity:0; }\n\t60% { opacity:1; }\n}\n@keyframes apsmx-kf-sa-wiggle {\n\t10% { transform:translate(-1px,-1px); }\n\t20% { transform:translate(0px,1px); }\n\t30% { transform:translate(-1px,0px); }\n\t40% { transform:translate(1px,-1px); }\n\t50% { transform:translate(-1px,0px); }\n\t60% { transform:translate(0px,-1px); }\n\t70% { transform:translate(1px,1px); }\n\t80% { transform:translate(-1px,0px); }\n\t90% { transform:translate(0px,-1px); }\n\t100% { transform:translate(0px,0px); }\n}\n@keyframes apsmx-kf-sa-glow {\n\t50% {\n\t\ttext-shadow:\n\t\t\t0 0 15px,\n\t\t\t0 0 20px,\n\t\t\t0 0 25px,\n\t\t\t0 0 30px,\n\t\t\t0 0 35px,\n\t\t\t0 0 40px;\n\t}\n}\n@keyframes apsmx-kf-sa-rotate-x {\n\t100% { transform:rotateX(360deg); }\n}\n@keyframes apsmx-kf-sa-rotate-y {\n\t100% { transform:rotateY(360deg); }\n}\n@keyframes apsmx-kf-sa-rotate-z {\n\t100% { transform:rotateZ(360deg); }\n}\n@keyframes apsmx-kf-sa-zoom {\n\t25% { transform:scale(0.5,0.5); }\n\t75% { transform:scale(1.5,1.5); }\n}\n@keyframes apsmx-kf-sa-bounce {\n\t0% {\n\t\ttransform:translateY(0%);\n\t\tanimation-timing-function:ease-out;\n\t}\n\t50% {\n\t\ttransform:translateY(-50%);\n\t\tanimation-timing-function:ease-in;\n\t}\n}\n\r\n/*css\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\n//\n// Ajax Poll Script v4.12\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\n// Email : admin@phpkobo.com\n// ID : APSMX-412\n// URL : http://www.phpkobo.com/ajax_poll.php\n//\n// This software is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; version 2 of the\n// License.\n//\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\n*/\n.apsmx ::-webkit-scrollbar {\n\twidth:8px;\n}\n.apsmx ::-webkit-scrollbar-track {\n\tshadow:inset 0 0 6px rgba(0,0,0,0.3); \n\tborder-radius:10px;\n}\n.apsmx ::-webkit-scrollbar-thumb {\n\tborder-radius:10px;\n\tbox-shadow:inset 0 0 6px rgba(0,0,0,0.5); \n\tbackground-color:rgba(0,0,0,0.2);\n}\n.apsmx * {\n\tscrollbar-color:rgba(0,0,0,0.5) rgba(0,0,0,0.2);\n\tscrollbar-width:thin;\n}\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n/* cut off left & right borders, marigns and paddings */\r\n.apsmx .apsmx-page.apsmx-slimcol-slim,\r\n.apsmx .apsmx-page.apsmx-slimcol-slim\r\n .apsmx-posy-page-row[data-posy-loc=\"main\"]\r\n .apsmx-posy-page-row-ibox,\r\n.apsmx .apsmx-page.apsmx-slimcol-slim\r\n .apsmx-cardtable {\r\n\tborder-left-width:0 !important;\r\n\tborder-right-width:0 !important;\r\n\tmargin-left:0 !important;\r\n\tmargin-right:0 !important;\r\n\tpadding-left:0 !important;\r\n\tpadding-right:0 !important;\r\n}\r\n.apsmx .apsmx-page.apsmx-slimcol-slim .apsmx-opt {\r\n\tmargin-left:0 !important;\r\n\tmargin-right:0 !important;\r\n}\r\n.apsmx .apsmx-page.apsmx-slimcol-slim .apsmx-opt-ibox {\r\n\tborder-left-width:0 !important;\r\n\tborder-right-width:0 !important;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-status {\r\n\tposition:relative;\r\n\tpadding:0 !important;\r\n}\r\n.apsmx .apsmx-status-ibox {\r\n\tposition:relative;\r\n\tmargin:0 !important;\r\n\toverflow:hidden;\r\n\tline-height:normal;\r\n\tpadding:5px 20px;\r\n\tcolor:white;\r\n\tbackground-color:rgba(0,0,0,0.3);\r\n}\r\n.apsmx .apsmx-status-msg {\r\n\tfont-size:120%;\r\n\ttext-align:center;\r\n}\r\n/* status:notstarted */\r\n.apsmx .apsmx-pss-notstarted .apsmx-status-ibox {\r\n\tcolor:white;\r\n}\r\n/* status:open */\r\n.apsmx .apsmx-pss-open .apsmx-status-ibox {\r\n\tcolor:white;\r\n}\r\n/* status:ended */\r\n.apsmx .apsmx-pss-ended .apsmx-status-ibox {\r\n\tcolor:white;\r\n}\r\n/* anim:blink */\r\n.apsmx\r\n .apsmx-sa-blink.apsmx-sa-go.apsmx-status\r\n .apsmx-sa-blink.apsmx-status-msg {\r\n\tanimation-name:apsmx-kf-sa-blink-status-msg;\r\n\tanimation-iteration-count:3;\r\n\tanimation-delay:1s;\r\n\tanimation-duration:1s;\r\n}\r\n@keyframes apsmx-kf-sa-blink-status-msg {\r\n\t40% {\r\n\t\topacity:1;\r\n\t}\r\n\t50% {\r\n\t\topacity:0;\r\n\t}\r\n\t60% {\r\n\t\topacity:1;\r\n\t}\r\n}\r\n/* sanim:glow */\r\n.apsmx\r\n .apsmx-sa-glow.apsmx-sa-go.apsmx-status\r\n .apsmx-sa-glow.apsmx-status-msg {\r\n\tanimation-name:apsmx-kf-sa-glow-status-msg;\r\n\tanimation-iteration-count:30;\r\n\tanimation-delay:1s;\r\n\tanimation-duration:1s;\r\n}\r\n@keyframes apsmx-kf-sa-glow-status-msg {\r\n\t50% {\r\n\t\ttext-shadow:\r\n\t\t\t0 0 15px,\r\n\t\t\t0 0 20px,\r\n\t\t\t0 0 25px,\r\n\t\t\t0 0 30px,\r\n\t\t\t0 0 35px,\r\n\t\t\t0 0 40px;\r\n\t}\r\n}\r\n/* sanim:wiggle */\r\n.apsmx\r\n .apsmx-sa-wiggle.apsmx-sa-go.apsmx-status\r\n .apsmx-sa-wiggle.apsmx-status-msg {\r\n\tanimation-name:apsmx-kf-sa-wiggle-status-msg;\r\n\tanimation-iteration-count:30;\r\n\tanimation-delay:1s;\r\n\tanimation-duration:1s;\r\n}\r\n@keyframes apsmx-kf-sa-wiggle-status-msg {\r\n\t10% { transform:translate(-1px,-1px); }\r\n\t40% { transform:translate(-1px,0px); }\r\n\t70% { transform:translate(-1px,1px); }\r\n\r\n\t20% { transform:translate(0px,-1px); }\r\n\t50% { transform:translate(0px,0px); }\r\n\t80% { transform:translate(0px,1px); }\r\n\r\n\t30% { transform:translate(1px,-1px); }\r\n\t60% { transform:translate(1px,0px); }\r\n\t90% { transform:translate(1px,1px); }\r\n\r\n\t100% { transform:translate(0px,0px); }\r\n}\r\n/* sanim:bounce */\r\n.apsmx\r\n .apsmx-sa-bounce.apsmx-sa-go.apsmx-status\r\n .apsmx-sa-bounce.apsmx-status-msg {\r\n\tanimation-name:apsmx-kf-sa-bounce-status-msg;\r\n\tanimation-delay:0s;\r\n\tanimation-duration:1s;\r\n\tanimation-iteration-count:10;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n@keyframes apsmx-kf-sa-bounce-status-msg {\r\n\t0% {\r\n\t\ttransform:translateY(0%);\r\n\t\tanimation-timing-function:ease-out;\r\n\t}\r\n\t50% {\r\n\t\ttransform:translateY(-50%);\r\n\t\tanimation-timing-function:ease-in;\r\n\t}\r\n}\r\n\r\n/* page */\n.apsmx .apsmx-posy-page-row[data-posy-loc=\"header\"] {\n\tbackground-color:rgba(255,255,255,0.6);\n}\n.apsmx .apsmx-posy-page-row[data-posy-loc=\"subheader\"] {\n\tbackground-color:rgba(255,255,255,0.3);\n\tline-height:0;\n}\n.apsmx .apsmx-posy-page-row[data-posy-loc=\"subheader\"] .apsmx-posy-page-cell-ibox {\n\tline-height:0;\n}\n/* text */\n.apsmx .apsmx-html {\n\tword-break:break-all;\n\tline-height:normal;\n}\n.apsmx .apsmx-html[data-name=\"title1\"] {\n\tpadding:3px 20px;\n\tfont-size:140%;\n}\n.apsmx .apsmx-html[data-name=\"note1\"] {\n\tpadding:3px 20px;\n\tfont-size:100%;\n\tborder-radius:20px;\n\tbackground-color:rgba(0,0,0,0.3);\n}\n.apsmx .apsmx-opt .apsmx-html[data-name=\"title1\"] {\n\tfont-size:100%;\n}\n\n/* padding on main-center */\n.apsmx .apsmx-posy-opt-row[data-posy-loc=\"main\"]\n .apsmx-posy-opt-cell[data-posy-loc=\"center\"]\n .apsmx-posy-opt-cell-ibox {\n\tpadding:10px;\n}\n/* padding on main-right */\n.apsmx .apsmx-posy-opt-row[data-posy-loc=\"main\"]\n .apsmx-posy-opt-cell[data-posy-loc=\"right\"]\n .apsmx-posy-opt-cell-ibox {\n\tpadding:10px;\n}\n/* alignment */\n/*\n.apsmx .apsmx-posy-opt-row[data-posy-loc=\"main\"]\n .apsmx-posy-opt-cell[data-posy-loc=\"center\"] {\n\tvertical-align:middle;\n}\n.apsmx .apsmx-posy-opt-row[data-posy-loc=\"main\"]\n .apsmx-posy-opt-cell[data-posy-loc=\"center\"]\n .apsmx-posy-opt-cell-ibox {\n\ttext-align:center;\n}\n*/\n\n\n\n\n/* test coloring */\n.apsmx .apsmx-posy-opt-row[data-posy-loc=\"header\"] {\n\txbackground-color:rgba(255,0,0,0.2);\n}\n.apsmx .apsmx-posy-opt-row[data-posy-loc=\"main\"] {\n\txbackground-color:rgba(0,255,0,0.2);\n}\n.apsmx .apsmx-posy-opt-row[data-posy-loc=\"footer\"] {\n\txbackground-color:rgba(0,0,255,0.2);\n}\n\n/* frame */\n.apsmx .apsmx-posy-opt-frame-rect {\n\tpadding:0.2em 0.2em;\n\tbackground-color:rgba(0,255,0,0.5);\n}\n.apsmx .apsmx-posy-opt-frame-round {\n\tpadding:0.2em 1em;\n\tbackground-color:rgba(0,0,0,0.5);\n\tborder-radius:0.5em;\n}\n.apsmx .apsmx-posy-opt-background-red {\n\tbackground-color:rgba(255,0,0,0.5);\n}\n\n\n/* slide */\n.apsmx .apsmx-layer-top {\n\theight:auto;\n}\n.apsmx .apsmx-layer-bottom {\n\ttop:auto;\n\tbottom:0;\n\theight:auto;\n}\n.apsmx .apsmx-desc {\n\txheight:70px;\n\tbackground-color:rgba(0,0,0,0.2);\n}\n/* square */\n.apsmx .apsmx-square {\n\tposition:relative;\n\tdisplay:block;\n\ttext-align:center;\n\tline-height:50px;\n\twidth:50px;\n\theight:50px;\n\tbackground-color:red;\n}\n.apsmx .apsmx-square-s {\n\tline-height:30px;\n\twidth:30px;\n\theight:30px;\n\tbackground-color:red;\n}\n/* circle */\n.apsmx .apsmx-circle {\n\twidth:50px;\n\theight:50px;\n\tborder-radius:50%;\n\ttext-align:center;\n}\n/* shaking/blinking entire poll option */\n.apsmx .apsmx-oss-notallowed .apsmx-opt-ibox {\n\tanimation-name:apsmx-kf-oss-notallowed-opt;\n\tanimation-iteration-count:3;\n\tanimation-duration:0.3s;\n\tanimation-fill-mode:forwards;\n}\n@keyframes apsmx-kf-oss-notallowed-opt {\n\t30% {\n/*\t\ttransform:scale(0.9,0.9);*/\n\t\ttransform:rotateZ(3deg);\n\t}\n\t70% {\n/*\t\ttransform:scale(0.9,0.9);*/\n\t\ttransform:rotateZ(-3deg);\n\t}\n}\n/* status:ended */\n.apsmx .apsmx-pss-ended .apsmx-page {\n\tbackground-color:black;\n}\n.apsmx .apsmx-pss-ended .apsmx-posy-page-row {\n\topacity:0.3;\n}\n.apsmx .apsmx-pss-ended .apsmx-posy-page-row[data-posy-loc=\"status\"] {\n\topacity:1;\n}\n\n\n/* poll row */\n.apsmx .apsmx-posy-page-row[data-posy-loc=\"total\"] {\n\tbackground-color:rgba(255,255,255,0.5);\n}\n.apsmx .apsmx-posy-page-row[data-posy-loc=\"vote\"] {\n\tbackground-color:rgba(255,255,255,0.3);\n}\n\n\n/* font color */\n.apsmx .apsmx-opt {\n\tcolor:white;\n}\n.apsmx .apsmx-poll {\n\tcolor:black;\n}\n\n\r\n/*css\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\n//\n// Ajax Poll Script v4.12\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\n// Email : admin@phpkobo.com\n// ID : APSMX-412\n// URL : http://www.phpkobo.com/ajax_poll.php\n//\n// This software is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; version 2 of the\n// License.\n//\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\n*/\n.apsmx .apsmx-toolbtn {\n\tposition:relative;\n\tpadding:0 !important;\n\tmargin:0;\n\tdisplay:block;\n}\n.apsmx .apsmx-toolbtn-ibox {\n\tposition:relative;\n\tmargin:0 !important;\n\toverflow:hidden;\n\twhite-space:nowrap;\n\ttext-decoration:none;\n\tborder-radius:4px;\n\tbackground-color:rgba(0,0,0,0.5);\n\tbox-shadow:1px 1px 1px 0 rgba(0,0,0,0.3);\n\tcursor:pointer;\n}\n.apsmx .apsmx-toolbtn:hover {\n\topacity:0.8;\n}\n.apsmx .apsmx-toolbtn:active {\n\ttop:1px;\n\tleft:1px;\n}\n.apsmx .apsmx-toolbtn-main {\n\theight:16px;\n\tfont-size:14px;\n\tline-height:100%;\n\tmargin:0.4em;\n}\n.apsmx .apsmx-toolbtn-main * {\n\tdisplay:inline-block;\n\tvertical-align:middle;\n}\n.apsmx .apsmx-toolbtn-img {\n\twidth:auto;\n\theight:100%;\n}\n.apsmx .apsmx-toolbtn-label {\n\twhite-space:nowrap;\n\tmargin:0 0.2em 0 0.5em;\n\tcolor:white;\n}\n/*\n.apsmx .apsmx-toolbtn-main {\n\theight:18px;\n\tfont-size:15px;\n}\n.apsmx .apsmx-toolbtn-main {\n\theight:20px;\n\tfont-size:16px;\n}\n.apsmx .apsmx-toolbtn-main {\n\theight:22px;\n\tfont-size:17px;\n}\n.apsmx .apsmx-toolbtn-main {\n\theight:24px;\n\tfont-size:18px;\n}\n.apsmx .apsmx-toolbtn-main {\n\theight:26px;\n\tfont-size:19px;\n}\n.apsmx .apsmx-toolbtn-main {\n\theight:28px;\n\tfont-size:20px;\n}\n*/\n.apsmx .apsmx-toolbtn-main {\n\theight:24px;\n\tfont-size:18px;\n}\n\r\n/*css\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\n//\n// Ajax Poll Script v4.12\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\n// Email : admin@phpkobo.com\n// ID : APSMX-412\n// URL : http://www.phpkobo.com/ajax_poll.php\n//\n// This software is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; version 2 of the\n// License.\n//\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\n*/\n.apsmx .apsmx-tooltip {\n\tposition:absolute !important;\n\twhite-space:nowrap !important;\n}\n.apsmx .apsmx-tooltip-tip {\n\tposition:relative !important;\n\toverflow:hidden !important;\n\tvertical-align:top !important;\n\tfont-size:0 !important;\n}\n.apsmx .apsmx-tooltip-triangle {\n\tposition:relative !important;\n\tdisplay:inline-block !important;\n\twidth:0 !important;\n\tfont-size:0 !important;\n\tline-height:0 !important;\n\tborder-style:solid !important;\n\t/*-- config --*/\n\tborder-width:7px;\n}\n.apsmx .apsmx-tooltip-triangle-top {\n\tborder-bottom-color:transparent !important;\n\tborder-left-color:transparent !important;\n\tborder-right-color:transparent !important;\n}\n.apsmx .apsmx-tooltip-triangle-bottom {\n\tborder-top-color:transparent !important;\n\tborder-left-color:transparent !important;\n\tborder-right-color:transparent !important;\n}\n.apsmx .apsmx-tooltip-triangle-left {\n\tborder-top-color:transparent !important;\n\tborder-bottom-color:transparent !important;\n\tborder-right-color:transparent !important;\n}\n.apsmx .apsmx-tooltip-triangle-right {\n\tborder-top-color:transparent !important;\n\tborder-bottom-color:transparent !important;\n\tborder-left-color:transparent !important;\n}\n.apsmx .apsmx-tooltip-msgbox {\n\tdisplay:inline-block;\n\tpadding:5px 15px;\n\tborder-radius:4px;\n\t/*-- config --*/\n\tbackground-color:rgba(0,0,0,0.6);\n}\n.apsmx .apsmx-tooltip-msg {\n\twhite-space:nowrap !important;\n\t/*-- config --*/\n\tcolor:white;\n\tfont-size:14px;\n}\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n/* should have no css-ctar prefix */\r\n.apsmx-parentsize {\r\n\tposition:absolute !important;\r\n\ttop:0 !important;\r\n\tleft:0 !important;\r\n\twidth:100% !important;\r\n\theight:100% !important;\r\n}\r\n.apsmx small {\r\n\tfont-size:70%;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-vcount {\r\n\tposition:relative;\r\n\ttext-align:right;\r\n\tpadding:0;\r\n\ttext-shadow:1px 1px 1px #888;\r\n\tfont-weight:bold;\r\n\twhite-space:nowrap;\r\n\tfont-size:120%;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-vmark {\r\n\tposition:relative;\r\n\tpadding:0 !important;\r\n}\r\n.apsmx .apsmx-vmark-height {\r\n\tposition:relative;\r\n\twidth:100%;\t\r\n\tpadding-top:100%;\r\n}\r\n.apsmx .apsmx-vmark-ibox {\r\n\tmargin:0 !important;\r\n\tposition:absolute !important;\r\n\ttop:0;\r\n\tleft:0;\r\n\twidth:100%;\r\n\theight:100%;\r\n\t/* setting */\r\n\tpadding:10%;\r\n}\r\n.apsmx .apsmx-vmark-imgbox {\r\n\tposition:relative !important;\r\n\twidth:100%;\r\n\theight:100%;\r\n}\r\n.apsmx .apsmx-vmark-circle {\r\n\tposition:absolute !important;\r\n\ttop:0;\r\n\tleft:0;\r\n\twidth:100%;\r\n\theight:100%;\r\n\tborder-radius:50%;\r\n\tbackground-color:rgba(255,255,255,0.6);\r\n}\r\n/* size */\r\n.apsmx .apsmx-vmark {\r\n\twidth:40px;\r\n}\r\n.apsmx .apsmx-vmark[data-size=\"xs\"] {\r\n\twidth:20px;\r\n}\r\n.apsmx .apsmx-vmark[data-size=\"s\"] {\r\n\twidth:30px;\r\n}\r\n.apsmx .apsmx-vmark[data-size=\"m\"] {\r\n\twidth:40px;\r\n}\r\n.apsmx .apsmx-vmark[data-size=\"l\"] {\r\n\twidth:50px;\r\n}\r\n.apsmx .apsmx-vmark[data-size=\"xl\"] {\r\n\twidth:60px;\r\n}\r\n/* sanim:radiate */\r\n.apsmx .apsmx-sa-opt-ready.apsmx-sa-opt-radiate {\r\n\tanimation-iteration-count:10;\r\n}\r\n.apsmx .apsmx-sa-opt-go .apsmx-sa-opt-radiate {\r\n\tanimation-name:apsmx-kf-sa-radiate;\r\n}\r\n@keyframes apsmx-kf-sa-radiate {\r\n\t0% {\r\n\t\topacity:0;\r\n\t\ttransform:scale(1);\r\n\t}\r\n\t50% {\r\n\t\topacity:1;\r\n\t}\r\n\t100% {\r\n\t\topacity:0;\r\n\t\ttransform:scale(2);\r\n\t}\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-votebtn {\r\n\tposition:relative;\r\n\tdisplay:inline-block;\r\n\tpadding:0 !important;\r\n\tmargin:0;\r\n}\r\n.apsmx .apsmx-votebtn-ibox {\r\n\tposition:relative;\r\n\tmargin:0 !important;\r\n\toverflow:hidden;\r\n\tbackground-color:#eee;\r\n\tborder:1px solid #ccc;\r\n\tborder-radius:5px;\r\n\tbox-shadow:1px 1px 3px 1px #777;\r\n\tcursor:pointer;\r\n}\r\n.apsmx .apsmx-votebtn-ibox:hover {\r\n\tbackground-color:#fff;\r\n}\r\n.apsmx .apsmx-votebtn-ibox:active {\r\n\ttop:1px;\r\n\tleft:1px;\r\n\tbox-shadow:none;\r\n\toutline:none;\r\n}\r\n.apsmx .apsmx-votebtn-inner {\r\n\tdisplay:table;\r\n\tfont-size:26px;\r\n\tline-height:normal;\r\n\tmargin:0.3em 1.0em;\r\n}\r\n.apsmx .apsmx-votebtn-label {\r\n\tdisplay:table-cell;\r\n\tvertical-align:middle;\r\n\ttext-align:center;\r\n\tfont-family:Verdana;\r\n\tcolor:black;\r\n\ttext-shadow:1px 1px 3px #999;\r\n}\r\n/* selcnt */\r\n.apsmx .apsmx-selcnt {\r\n\tposition:absolute;\r\n\ttop:50%;\r\n\tleft:0%;\r\n\ttransform:translate(-120%,-50%);\r\n\tpadding:2px 10px;\r\n\tfont-size:13px;\r\n\tbackground-color:#bbb;\r\n\tborder-radius:5px;\r\n\tpointer-events:none;\r\n}\r\n.apsmx .apsmx-selcnt-ready {\r\n\tbackground-color:rgba(0,128,0,1);\r\n}\r\n.apsmx .apsmx-selcnt-num {\r\n\tfont-weight:bold;\r\n\tcolor:white;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-vpercent {\r\n\tposition:relative;\r\n\ttext-align:right;\r\n\tpadding:0;\r\n\ttext-shadow:1px 1px 1px #888;\r\n\tfont-weight:bold;\r\n\twhite-space:nowrap;\r\n\tfont-size:120%;\r\n}\r\n.apsmx .apsmx-vpercent.apsmx-anim {\r\n\tanimation-name:apsmx-kf-vpercent-anim;\r\n\tanimation-iteration-count:1;\r\n\tanimation-duration:1s;\r\n\tanimation-fill-mode:forwards;\r\n}\r\n@keyframes apsmx-kf-vpercent-anim {\r\n\t0% {\r\n\t\topacity:0;\r\n\t\tleft:10px;\r\n\t}\r\n\t100% {\r\n\t\topacity:1;\r\n\t\tleft:0;\r\n\t}\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-vtotal {\r\n\tposition:relative;\r\n\tpadding:0 !important;\r\n\tmargin:10px 2px;\r\n}\r\n.apsmx .apsmx-vtotal-ibox {\r\n\tposition:relative;\r\n\tmargin:0 !important;\r\n\toverflow:hidden;\r\n}\r\n.apsmx .apsmx-vtotal-num {\r\n\tfont-size:180%;\r\n\tfont-weight:bold;\r\n\tvertical-align:-3%;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx .apsmx-wloader {\r\n\tposition:absolute !important;\r\n\ttop:0 !important;\r\n\tleft:0 !important;\r\n\twidth:100% !important;\r\n\theight:100% !important;\r\n\tmargin:0 !important;\r\n\tpadding:0 !important;\r\n}\r\n.apsmx .apsmx-wloader-ibox {\r\n\tposition:relative;\r\n\twidth:100% !important;\r\n\theight:100% !important;\r\n\tmargin:0 !important;\r\n\tpadding:0 !important;\r\n\toverflow:hidden;\r\n\tline-height:normal;\r\n\tbackground-color:rgba(0,0,0,0.5);\r\n}\r\n.apsmx .apsmx-wloader-msgbox {\r\n\tposition:absolute !important;\r\n\ttop:0;\r\n\tleft:0;\r\n\twidth:100% !important;\r\n\ttext-align:center;\r\n\tvisibility:hidden;\r\n}\r\n.apsmx .apsmx-wicon {\r\n\tposition:relative !important;\r\n\tmargin:0 auto;\r\n\tpadding:0 !important;\r\n\tfont-size:0;\r\n\tline-height:0;\r\n\twidth:100px;\r\n}\r\n.apsmx .apsmx-wicon-aspect {\r\n\tposition:relative !important;\r\n\twidth:100% !important;\r\n\tpadding-top:100% !important;\r\n}\r\n.apsmx .apsmx-wicon-inner {\r\n\tposition:absolute !important;\r\n\ttop:0 !important;\r\n\tleft:0 !important;\r\n\twidth:100% !important;\r\n\theight:100% !important;\r\n\tanimation-name:apsmx-kf-wicon-rot-z;\r\n\tanimation-duration:2s;\r\n\tanimation-timing-function:linear;\r\n\tanimation-iteration-count:infinite;\r\n}\r\n.apsmx .apsmx-wicon .apsmx-wicon-item {\r\n\tpadding:0;\r\n\tdisplay:inline-block;\r\n\t*zoom:1;\r\n\t*display:inline;\r\n\twidth:50%;\r\n\theight:50%;\r\n\tborder-radius:50%;\r\n\tanimation-name:apsmx-kf-wicon-fade-zoom;\r\n\tanimation-duration:2s;\r\n\tanimation-timing-function:linear;\r\n\tanimation-iteration-count:infinite;\r\n}\r\n.apsmx .apsmx-wicon .apsmx-wicon-item:nth-child(1) {\r\n\tbackground-color:blue;\r\n}\r\n.apsmx .apsmx-wicon .apsmx-wicon-item:nth-child(2) {\r\n\tbackground-color:red;\r\n}\r\n.apsmx .apsmx-wicon .apsmx-wicon-item:nth-child(3) {\r\n\tbackground-color:#080;\r\n}\r\n.apsmx .apsmx-wicon .apsmx-wicon-item:nth-child(4) {\r\n\tbackground-color:purple;\r\n}\r\n@keyframes apsmx-kf-wicon-rot-z {\r\n\t0% {\r\n\t\ttransform: rotateZ(0deg);\r\n\t}\r\n\t100% {\r\n\t\ttransform: rotateZ(360deg);\r\n\t}\r\n}\r\n@keyframes apsmx-kf-wicon-fade-zoom {\r\n\t0% {\r\n\t\ttransform: scale(1);\r\n\t\topacity:1;\r\n\t}\r\n\t50% {\r\n\t\ttransform: scale(2);\r\n\t\topacity:0.2;\r\n\t}\r\n\t100% {\r\n\t\ttransform: scale(1);\r\n\t\topacity:1;\r\n\t}\r\n}\r\n.apsmx .apsmx-wloader-msg {\r\n\tposition:relative;\r\n\tdisplay:inline-block;\r\n\tmargin-top:40px;\r\n\tpadding:3px 15px;\r\n\tfont-size:12px;\r\n\tfont-weight:bold;\r\n\tcolor:white;\r\n\tborder-radius:8px;\r\n\ttext-align:center;\r\n\tletter-spacing:0.2em;\r\n\tbackground:rgba(0,0,0,0);\r\n}\r\n/* size */\r\n.apsmx .apsmx-wicon {\r\n\twidth:30px;\r\n}\r\n\r\n\r\n/* overall spaciousness */\n.apsmx .apsmx-posy-page-wrap,\n.apsmx .apsmx-posy-page-row-ibox {\n\tpadding:2px;\n}\n.apsmx .apsmx-opt {\n\tmargin:2px;\n}\n\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx-pollinfo {\r\n\tbox-sizing:border-box;\r\n\tposition:relative;\r\n\tmargin:10px auto;\r\n\tpadding:10px;\r\n\tmax-width:400px;\r\n\tfont-size:16px;\r\n\tfont-family:\"Verdana\";\r\n\ttext-align:center;\r\n\tborder:1px solid #ccc;\r\n\tborder-radius:4px;\r\n\toverflow:hidden;\r\n}\r\n\r\n/*css\r\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\r\n//\r\n// Ajax Poll Script v4.12\r\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\r\n// Email : admin@phpkobo.com\r\n// ID : APSMX-412\r\n// URL : http://www.phpkobo.com/ajax_poll.php\r\n//\r\n// This software is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU General Public License\r\n// as published by the Free Software Foundation; version 2 of the\r\n// License.\r\n//\r\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\r\n*/\r\n.apsmx-resetbtn {\r\n\tbox-sizing:border-box;\r\n\tposition:relative;\r\n\tmargin:10px auto;\r\n\tmax-width:400px;\r\n\tfont-size:16px;\r\n\tfont-family:\"Verdana\";\r\n\ttext-align:center;\r\n\tborder:1px solid #ccc;\r\n\tborder-radius:4px;\r\n\toverflow:hidden;\r\n}\r\n.apsmx-resetbtn:focus {\r\n\toutline:1px dotted #ccc;\r\n}\r\n.apsmx-resetbtn-inner {\r\n\tpadding:10px;\r\n\tbackground-color:#eee;\r\n\tcursor:pointer;\r\n\tuser-select:none;\r\n}\r\n.apsmx-resetbtn-inner:hover {\r\n\tbackground-color:#ddd;\r\n}\r\n.apsmx-resetbtn-done,\r\n.apsmx-resetbtn-reboot {\r\n\tdisplay:none;\r\n\tposition:absolute;\r\n\tleft:0;\r\n\twidth:100%;\r\n\theight:100%;\r\n\tpadding:10px;\r\n\tfont-weight:bold;\r\n\tvertical-align:middle;\r\n}\r\n.apsmx-resetbtn-done {\r\n\tletter-spacing:2px;\r\n\tcolor:white;\r\n\tbackground:#080;\r\n}\r\n.apsmx-resetbtn-reboot {\r\n\tletter-spacing:2px;\r\n\tcolor:white;\r\n\tbackground:#00f;\r\n}\r\n\r\n\r\n/* circle */\n.apsmx .apsmx-circle {\n\twidth:50px;\n\theight:50px;\n\tborder-radius:50%;\n\ttext-align:center;\n}\n\r\n/* square */\n.apsmx .apsmx-square {\n\tposition:relative;\n\tdisplay:block;\n\ttext-align:center;\n\tline-height:50px;\n\twidth:50px;\n\theight:50px;\n\tbackground-color:red;\n}\n.apsmx .apsmx-square-s {\n\tline-height:30px;\n\twidth:30px;\n\theight:30px;\n\tbackground-color:red;\n}\n\r\n/*css\n//==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>\n//\n// Ajax Poll Script v4.12\n// Copyright (c) phpkobo.com ( http://www.phpkobo.com/ )\n// Email : admin@phpkobo.com\n// ID : APSMX-412\n// URL : http://www.phpkobo.com/ajax_poll.php\n//\n// This software is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; version 2 of the\n// License.\n//\n//==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<\n*/\n.apsmx .apsmx-toolbtn.apsmx-test-blink .apsmx-toolbtn-ibox {\n\tanimation-name:apsmx-kf-test-blink;\n\tanimation-duration:3s;\n\tanimation-timing-function:ease;\n\tanimation-iteration-count:infinite;\n}\n@keyframes apsmx-kf-test-blink {\n\t0% {\n\t\tbackground-color:rgba(255,255,255,0.8);\n\t\ttransform:rotateY(0deg);\n\t}\n\t100% {\n\t\tbackground-color:rgba(128,255,0,0.8);\n\t\ttransform:rotateY(180deg);\n\t}\n}\n\n"},"img":{"main":{"cmark.png":"http://wapp.solar.lan/phpkobo/my-projects/ajax-poll-sys/APSMX-412/public_html/apsmx/components/main/img/cmark.png","vmark.png":"http://wapp.solar.lan/phpkobo/my-projects/ajax-poll-sys/APSMX-412/public_html/apsmx/components/main/img/vmark.png"},"goresults":{"goresults.png":"http://wapp.solar.lan/phpkobo/my-projects/ajax-poll-sys/APSMX-412/public_html/apsmx/components/goresults/img/goresults.png","tulip.jpg":"http://wapp.solar.lan/phpkobo/my-projects/ajax-poll-sys/APSMX-412/public_html/apsmx/components/goresults/img/tulip.jpg"},"govoting":{"govoting.png":"http://wapp.solar.lan/phpkobo/my-projects/ajax-poll-sys/APSMX-412/public_html/apsmx/components/govoting/img/govoting.png"},"link":{"link-blank.png":"http://wapp.solar.lan/phpkobo/my-projects/ajax-poll-sys/APSMX-412/public_html/apsmx/components/link/img/link-blank.png","link.png":"http://wapp.solar.lan/phpkobo/my-projects/ajax-poll-sys/APSMX-412/public_html/apsmx/components/link/img/link.png"},"optreanim":{"optreanim.png":"http://wapp.solar.lan/phpkobo/my-projects/ajax-poll-sys/APSMX-412/public_html/apsmx/components/optreanim/img/optreanim.png"},"script":{"--script.png":"http://wapp.solar.lan/phpkobo/my-projects/ajax-poll-sys/APSMX-412/public_html/apsmx/components/script/img/--script.png","script.png":"http://wapp.solar.lan/phpkobo/my-projects/ajax-poll-sys/APSMX-412/public_html/apsmx/components/script/img/script.png"},"test":{"test.png":"http://wapp.solar.lan/phpkobo/my-projects/ajax-poll-sys/APSMX-412/public_html/apsmx/components/test/img/test.png"}}}; //-- pollyfill for "isArray" if (!Array.isArray) { Array.isArray = function(arg) { return Object.prototype.toString.call(arg) === '[object Array]'; }; } //-- pollyfill for "includes" if (!Array.prototype.includes) { Array.prototype.includes = function( findme ) { for( var i=0; i") == -1 ) { return this.toString(); } else { return this .replace(//g,'') .replace(/<\/sb>/g,''); } }; } //-- polyfill for JSON if (!window.JSON) { window.JSON = { parse: function(sJSON) { return eval('(' + sJSON + ')'); }, stringify: (function () { var toString = Object.prototype.toString; var isArray = Array.isArray || function (a) { return toString.call(a) === '[object Array]'; }; var escMap = {'"': '\\"', '\\': '\\\\', '\b': '\\b', '\f': '\\f', '\n': '\\n', '\r': '\\r', '\t': '\\t'}; var escFunc = function (m) { return escMap[m] || '\\u' + (m.charCodeAt(0) + 0x10000).toString(16).substr(1); }; var escRE = /[\\"\u0000-\u001F\u2028\u2029]/g; return function stringify(value) { if (value == null) { return 'null'; } else if (typeof value === 'number') { return isFinite(value) ? value.toString() : 'null'; } else if (typeof value === 'boolean') { return value.toString(); } else if (typeof value === 'object') { if (typeof value.toJSON === 'function') { return stringify(value.toJSON()); } else if (isArray(value)) { var res = '['; for (var i = 0; i < value.length; i++) { res += (i ? ', ' : '') + stringify(value[i]); } return res + ']'; } else if (toString.call(value) === '[object Object]') { var tmp = []; for (var k in value) { if (value.hasOwnProperty(k)) { tmp.push(stringify(k) + ': ' + stringify(value[k])); } } return '{' + tmp.join(', ') + '}'; } } return '"' + value.toString().replace(escRE, escFunc) + '"'; }; })() }; } var CUtil = { printError : function( msg ) { console.log( msg ); }, hsc : function( s ) { return $("
").text(s).html(); }, recalcStyle : function( jqo ) { var dummy = jqo.get(0).offsetWidth; }, ajaxSend : function( requ, obj, func ) { console.log("ajaxSend",requ); var _this = this; $.ajax({ url:appcfg.url_server, data:"requ="+encodeURIComponent(JSON.stringify(requ)), dataType:"jsonp", success:function(resp){ if ( resp.result == "OK" ) { console.log("resp",resp); func.call(obj,resp); } else { _this.printError( resp.result ); } }, error:function( jqXHR, textStatus, errorThrown ){ var s = "[$.ajax.error]\n"; s += jqXHR.responseText+"\n"; s += textStatus+"\n"; s += errorThrown; _this.printError( s ); } }); }, jsShallowCopy : function( obj ) { return $.extend({},obj); }, jsDeepCopy : function( obj ) { return $.extend(true,{},obj); }, getFilenameFromUrl : function( url ) { return url.substring(url.lastIndexOf('/')+1); }, isIE7or8 : function() { return (navigator.appVersion.indexOf("MSIE 7.")!=-1) || (navigator.appVersion.indexOf("MSIE 8.")!=-1); }, canCssAnim : function() { return ( document.createElement("div") .style.animationName !== undefined ); }, isTouchDevice : function() { return (("ontouchstart" in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)); }, shuffleArray : function(ax) { var tmp, idx; var i = ax.length; while (0 !== i) { idx = Math.floor(Math.random() * i); i -= 1; tmp = ax[i]; ax[i] = ax[idx]; ax[idx] = tmp; } return ax; }, ensureArray : function( s ) { if ( s == undefined ) { return []; } else if ( Array.isArray(s) ) { return s; } else { s = s.trim(); if ( s ) { var sx = s.split(","); for( var i=0; i v )) { v = min_n; } if (( max_n != undefined ) && ( max_n < v )) { v = max_n; } return v; }, float: function( obj, attr, def, min_n, max_n ) { if ( def == undefined ) { def = 0; } if ( obj[attr] == undefined ) { return def; } var v = parseFloat(obj[attr]); if ( isNaN(v) ) { return def; } if (( min_n != undefined ) && ( min_n > v )) { v = min_n; } if (( max_n != undefined ) && ( max_n < v )) { v = max_n; } return v; }, second : function( obj, attr, def, min_n, max_n ) { if ( def == undefined ) { def = -1; } return this.float(obj,attr,def,min_n,max_n ); }, opacity: function( obj, attr, def ) { if ( def == undefined ) { def = 1; } var v = this.float(obj,attr,def); if (( v < 0 ) || ( 1 < v )) { return def; } return v; } }; function CCmp() { this.components = []; }; CCmp.prototype = { register : function( cmp ) { this.components.push(cmp); }, load : function() { for( var i=0; i 0 ) { var ename = sx[0]; var bindex = 0; if ( sx.length > 1 ) { bindex = sx[1]; if ( bindex == "begin" ) { bindex = -100; } else if ( bindex == "end" ) { bindex = 100; } else { bindex = parseFloat(sx[1]); if ( isNaN(bindex) ) { bindex = 0; } } } if (!( ename in this.binding )) { this.binding[ename] = []; } var insert = { bindex:bindex, obj:obj, func:func }; var ls = this.binding[ename]; var b_inserted = false; for ( var j=0; j") .load(function(){ n_loaded++; if ( max_url == n_loaded ) { if ( _this.unflag(idx) ) { if ( func ) { func.call(obj); } } } }); jqo.attr("src",url); } } else { if ( func ) { func.call(obj); } } }, loadBg : function( jqo, url, obj, func ) { var isFirefox = navigator.userAgent .toLowerCase().indexOf('firefox') > -1; if ( !isFirefox ) { if ( func ) { func.call(obj,jqo,url); } return; } var t = ( pollcfg.delay_loadbg ) ? pollcfg.delay_loadbg : 1; var _this = this; var idx = this.flag(); if ( !func ) { CPageRefCnt.lock(); } var w = Math.min(100,jqo.width()); jqo .html($("") .load(function(){ $(this).animate({ opacity:0 },t*1000,function(){ $(this).remove(); if ( !func ) { CPageRefCnt.unlock(); } if ( _this.unflag(idx) ) { if ( func ) { func.call(obj,jqo,url); } } }); }) .css({ width:w+"px", opacity:1 }) .attr("src",url) ); } }; function CWinBind() { this.handler = {}; this.timer_id = {}; }; CWinBind.prototype = { bind : function( key, obj, func, delay ) { this.unbind(key); var _this = this; delay = parseFloat(delay); if ( isNaN(delay) || ( delay == 0 )) { this.handler[key] = function() { func.call(obj); }; } else { this.timer_id[key] = null; this.handler[key] = function() { if ( _this.timer_id[key] ) { clearTimeout(_this.timer_id[key]); } _this.timer_id[key] = setTimeout(function(){ func.call(obj); _this.timer_id[key] = null; },delay*1000); }; } $( window ).bind( key, this.handler[key] ); }, unbind : function(key){ if ( this.handler[key] ) { $( window ).unbind( key, this.handler[key] ); } }, unbindAll : function(){ for( var key in this.handler ) { this.unbind(key); } this.handler = {}; this.timer_id = {}; } }; var CBgSetter = { color : function( jqo, color, cfg ) { if ( jqo && jqo.length ) { if ( color ) { //-- init cfg object if ( cfg == undefined ) { cfg = {}; } //-- init css object var css = {}; //-- opacity if ( cfg.opacity != undefined ) { css.opacity = cfg.opacity; } //-- background color css["background"] = color; //-- assign css try { jqo.css(css); } catch(err) { console.log("Error:CBgSetter.color",css); } } else { jqo.css("background",""); } } }, img : function( jqo, imgrec, cfg ) { if ( jqo && jqo.length ) { if ( imgrec ) { //-- init cfg object if ( cfg == undefined ) { cfg = {}; } //-- init css object var css = {}; //-- opacity if ( cfg.opacity != undefined ) { css.opacity = cfg.opacity; } var fields = { "":null, color:null, image:null, repeat:null, attachment:null, position:"center center", size:"cover" }; for( var f in fields ) { var key = "background"+(f==""?"":"-")+f; var val = fields[f]; if ( cfg[key] ) { css[key] = cfg[key]; } else if ( val ) { css[key] = val; } } if ( imgrec.url ) { css["background-image"] = "url("+CUtil.sq(imgrec.url)+")"; } //-- assign css try { jqo.css(css); } catch(err) { console.log("Error:CBgSetter.img",css); } } else { jqo.css("background",""); } } } }; var CImg = { getNaturalSize : function( jqo_img ) { var size = {}; var img = jqo_img.get(0); if ( img.naturalWidth ) { size.w = img.naturalWidth; size.h = img.naturalHeight; } else { //IE7&8 var image = new Image(); image.src = img.src; size.w = image.width; size.h = image.height; } return size; }, getNaturalSizeFromUrl : function( url ) { return this.getNaturalSize($("") .attr("src",url)); } }; /*js */ /* = destroy old gate and create a new one this.gate = CGate.create(this.gate); = execute function if gate is open this.gate.check(function(){ .................. }) = close gate if ( this.gate ) { this.gate.close(); } = pause gate this.gate.pause(); = resume gate if ( this.gate.resume() ) { .................. } */ var CGate = this.CGate = { init : function() { this.b_paused = false; this.b_closed = false; this.flags = {}; }, create : function( obj ) { if ( obj ) { obj.close(); } obj = {}; for( var p in this ) { obj[p] = this[p]; } obj.init(); return obj; }, check : function( f, caller ) { var _this = this; return function(){ if ( _this.b_closed ) { return; } f.call(caller ? caller : this); } }, isOpen : function( str ) { if ( this.b_paused ) { return false; } else { if ( str ) { return this.checkFlag(str); } else { return true; } } }, pause : function() { this.b_paused = true; }, resume : function() { if ( this.b_paused ) { this.b_paused = false; return true; } else { return false; } }, close : function() { this.b_closed = true; }, flag( f ) { this.flags[f] = true; }, unflag( str ) { var fx = str.split(","); for( var i=0; i this.max_trashque ) { var wid_delete = appcfg.prefix_header+this.trashque.shift(); this.removeCss(wid_delete); this.removeJs(wid_delete); if ( this.pmap[wid_delete] ) { delete this.pmap[wid_delete]; } } }, run : function() { //-- load components CAppCmp.load(); CAppCMS.trigger("app-component"); CAppCMS.trigger("app-resource"); CAppCMS.trigger("app-bind"); CAppCMS.trigger("app-setup"); CAppCMS.trigger("app-start"); }, setup : function() { this.insertCss("app",app_data.css.page); this.extendJQuery(); this.setupAllInstances(); }, start : function() { this.requestToServer(); }, getParams : function( wid ) { return this.pmap[wid]; }, ajaxSend : function( requ, obj, func ) { CUtil.ajaxSend(requ,obj,func); }, extendJQuery : function() { if ( !$.fn.hoverTS ) { $.fn.extend({ hoverTS:function( handlerIn, handlerOut ) { if ( CUtil.isTouchDevice() ) { $(this) .bind("touchstart",handlerIn) .bind("touchend touchcancel",handlerOut); } else { $(this).hover(handlerIn,handlerOut); } return this; } }); } }, getNumOfPoll : function() { var cnt = 0; for (var k in this.pmap) { if (this.pmap.hasOwnProperty(k)) { cnt++; } } return cnt; }, getPswitchVal : function( pswitch ) { var ax = pswitch.split(" "); var rx = []; for( var i=0; i tag if ( media ) { try { qx = JSON.parse(media); } catch(err) { } } //-- predifined media queries for( var key in appcfg.media ) { qx[key] = appcfg.media[key]; } //-- test media queries var rx = {}; for( var key in qx ) { var query = qx[key]; rx[key] = ( window.matchMedia && window.matchMedia(query).matches ) ? 1 : 0; } //-- touch device rx["touch"] = CUtil.isTouchDevice() ? 1 : 0; return rx; }, normalizeParam : function( jqo, key ) { var ret = jqo.attr("data-"+key); if ( !ret ) { ret = jqo.attr(key); } if ( !ret ) { ret = ""; } return ret; }, setupAllInstances : function() { var _this = this; $("."+appcfg.cls_selector).each(function(){ _this.setupInstance($(this)); }); }, setupInstance : function( jqo_host ) { if ( parseInt(jqo_host.attr("data-wid")) ) { return; } this.wid++; var wid = this.wid; jqo_host.attr("data-wid",wid); var pid = this.normalizeParam(jqo_host,"pid") if ( !pid ) { return; } var tid = this.normalizeParam(jqo_host,"tid"); if ( !tid ) { return; } var iid = this.normalizeParam(jqo_host,"iid"); var pswitch = this.normalizeParam(jqo_host,"pswitch"); var media = this.normalizeParam(jqo_host,"media"); var rec = { jqo_host:jqo_host, wid:wid, pid:pid, tid:tid, iid:iid, pswitch:this.getPswitchVal(pswitch), media:this.getMediaVal(media), media_org:media, load_cnt:1 }; this.pmap[wid] = rec; }, requestToServer : function() { var polls = []; for( var wid in this.pmap ) { var rec = this.pmap[wid]; if ( !rec.done ) { polls.push({ wid:rec.wid, pid:rec.pid, tid:rec.tid, iid:rec.iid, pswitch:rec.pswitch, media:rec.media }); } } if ( polls.length ) { this.init_idx++; var requ = { "cmd":"init", "polls":polls, "init_idx":this.init_idx }; this.ajaxSend(requ,this,function(resp){ if ( resp.result == "OK" ) { this.runPolls(resp); } else { var s = "[non-OK] " + resp.result; CUtil.printError( s ); } }); } }, rebootPoll : function( data ) { var wid = data.wid; if ( this.b_running ) { return; } this.b_running = true; var rec = this.pmap[wid]; rec.host.CHost.abort(); this.trash(wid); var rec_new = {}; for( var key in rec ) { rec_new[key] = rec[key]; } this.wid++; var wid = this.wid; rec.jqo_host.attr("data-wid",wid); rec_new.wid = wid; rec_new.done = false; rec_new.load_cnt++; this.pmap[wid] = rec_new; this.requestToServer(); }, startPoll : function( px ) { if ( this.b_running ) { return; } this.b_running = true; var jqo = $(px.selector).eq(0); var wid = 0; if ( jqo.hasClass("apsmx") && jqo.attr("data-wid") ) { wid = parseInt(jqo.attr("data-wid")); if ( wid ) { var rec = this.pmap[wid]; rec.pid = px.pid; rec.tid = px.tid; if ( px.iid ) { rec.iid = px.iid } if ( px.pswitch ) { rec.pswitch = this.getPswitchVal(px.pswitch); } if ( px.media ) { rec.media = this.getMediaVal(px.media); } } } jqo .addClass("apsmx") .attr("data-pid",px.pid) .attr("data-tid",px.tid); if ( px.pswitch ) { jqo.attr("data-pswitch",px.pswitch) } if ( px.iid ) { jqo.attr("data-iid",px.iid) } if ( px.pswitch ) { jqo.attr("data-pswitch",px.pswitch) } if ( px.media ) { jqo.attr("data-media",px.media) } if ( wid ) { this.b_running = false; this.rebootPoll({wid:wid}); } else { this.run(); } }, runPolls : function( resp ) { this.resp = resp; for( var key in resp.cssx ) { this.insertCss(key,resp.cssx[key]); } for( var key in resp.jsx ) { this.insertJs(key,resp.jsx[key]); } for( var wid in this.pmap ) { var rec = this.pmap[wid]; if ( !rec.done ) { rec.done = true; var pollcfg = resp.pollx[rec.wid]; if ( pollcfg ) { //-- assign tag parameters pollcfg.pid = rec.pid; pollcfg.tid = rec.tid; pollcfg.iid = rec.iid; pollcfg.pswitch = rec.pswitch; pollcfg.media = rec.media; //-- start poll if ( rec.host ) { rec.host.CHost.run(pollcfg); } else { rec.host = new runHost(rec.jqo_host,pollcfg); rec.host.CHost.run(); } } } } //-- unflag b_running this.b_running = false; } }; CAppCmp.register(CApp); var apsmx = { version : function() { return appcfg.version; }, run : function( px ) { CApp.startPoll(px); } }; window.apsmx = apsmx; function runHost( jqo_host, pollcfg_first ) { var CHostCmp = this.CHostCmp = new CCmp(); var CHostCMS = this.CHostCMS = new CCMS("CHostCMS"); var CHost = this.CHost = { init : function() { CHostCMS.bind("host-bind",this,function(){ CHostCMS.bind("host-abort",this,function(){ this.poll.CPoll.abort(); }); }); }, fixSize : function() { //-- if there is another poll then //-- fix the size of
if ( this.poll_load_cnt > 1 ) { this.jqo_host .css({ "width":this.jqo_host.width()+"px", "height":this.jqo_host.height()+"px", }); } }, releaseSize : function() { //-- clear the height of
if ( this.poll_load_cnt == 1 ) { if ( CCfg.yn(this.pollcfg.host,"clear-height") ) { this.jqo_host.css({ "height":"auto", "max-height":"none", "min-height":0 }); } if ( CCfg.yn(this.pollcfg.host,"clear-background") ) { this.jqo_host.css({ "background":"none" }); } } //-- if there is another poll then //-- it's time to delete it if ( this.poll_load_cnt > 1 ) { if ( this.poll_prev ) { this.poll_prev.CPoll.destroy(); this.poll_prev = null; } //-- release the fixed size of
this.jqo_host.css({width:"auto",height:"auto"}); } }, appendPoll : function( jqo_css_ctar ) { this.jqo_host.append(jqo_css_ctar); }, run : function( pollcfg_second ) { if ( !pollcfg_second ) { this.poll_load_cnt = 1; this.pollcfg = pollcfg_first; this.poll_prev = null; //-- set host jqo this.jqo_host = jqo_host; //-- load components CHostCmp.load(); //-- bootup sequence CHostCMS.trigger("host-component"); CHostCMS.trigger("host-resource"); CHostCMS.trigger("host-bind"); CHostCMS.trigger("host-setup"); CHostCMS.trigger("host-start"); } else { this.poll_load_cnt++; this.pollcfg = pollcfg_second; this.poll_prev = this.poll; } //-- run poll this.poll = new runPoll(this.pollcfg); this.poll.CPoll.run(); }, abort : function() { CHostCMS.trigger("host-abort"); }, destroy : function() { this.jqo_host.remove(); } }; CHostCmp.register(CHost); var CHostTool = { init : function() { CHostCMS.bind("host-bind:begin",this,function(){ CHostCMS.bind("host-setup",this,this.setup); }); }, setup : function() { this.jqo_topbox = null; this.jqo_bottombox = null; }, insert : function( px ) { var jqo_prt = null; switch ( CCfg.text(px,"pos","bottom") ) { case "top": if ( !this.jqo_topbox ) { this.jqo_topbox = $("
") .attr("class","apsmx-hosttool-topbox"); CHost.jqo_host.before(this.jqo_topbox); } jqo_prt = this.jqo_topbox; break; case "bottom": if ( !this.jqo_bottombox ) { this.jqo_bottombox = $("
") .attr("class","apsmx-hosttool-bottombox"); CHost.jqo_host.after(this.jqo_bottombox); } jqo_prt = this.jqo_bottombox; break; } if ( jqo_prt ) { //-- put it in according to pindex var pindex_insert = CCfg.float(px,"pindex",0); px.jqo_tool.attr("data-hosttool-pindex",pindex_insert); var b_done = false; var jqos = jqo_prt.children(); for ( var i=0; i pindex_insert ) { b_done = true; jqo.before(px.jqo_tool); } } //-- if not done yet, put it at the bottom if ( !b_done ) { jqo_prt.append(px.jqo_tool); } } }, find : function( selector ) { if ( this.jqo_topbox ) { var jqo = this.jqo_topbox.find(selector); if ( jqo.length ) { return jqo; } } if ( this.jqo_bottombox ) { var jqo = this.jqo_bottombox.find(selector); if ( jqo.length ) { return jqo; } } return null; }, destroy : function() { if ( this.jqo_topbox ) { this.jqo_topbox.remove(); } if ( this.jqo_bottombox ) { this.jqo_bottombox.remove(); } } }; CHostCmp.register(CHostTool); function runPoll( pollcfg ) { var CPollCmp = this.CPollCmp = new CCmp(); var CPollCMS = this.CPollCMS = new CCMS("CPollCMS"); var CPoll = this.CPoll = { init : function() { CPollCMS.bind("poll-bind",this,function(){ CPollCMS.bind("poll-setup",this,this.setup); CPollCMS.bind("poll-start",this,function(){ CPollCMS.trigger("wloader-open"); }); CPollCMS.bind("poll-abort",this,function(){ this.page.CPage.abort(); }); CPollCMS.bind("poll-reboot",this,function(){ this.scrollToTop(0); CAppCMS.trigger("poll-reboot",{wid:pollcfg.wid}); }); }); }, checkLoadError : function() { if (pollcfg.load_error) { switch (pollcfg.load_error) { case "pid-not-found": console.log("Poll("+pollcfg.pid+") Not Found"); return false; case "tid-not-found": console.log("Template("+pollcfg.tid+") Not Found"); return false; } } return true; }, getParams : function() { return this.pmap[pollcfg.wid]; }, scrollToTop : function( top_delta ) { if ( top_delta != null ) { var y = this.jqo_css_ctar.offset().top + top_delta; var jqo_ref = $(window); if ( jqo_ref.scrollTop() > y ) { var jqo = $("html, body"); var t = ( CFlag.eanim() ) ? CCfg.float(pollcfg["scroll-to-top"], "duration",0.8)*1000 : 1; jqo.animate({scrollTop:y+"px"},t); } } }, fixSize : function() { //-- maintain min-height until a new page content //-- gets it's height, otherwize containers may shrink if ( this.page_load_cnt > 1 ) { this.jqo_poll.css({ "width":this.jqo_poll.width()+"px", "height":this.jqo_poll.height()+"px" }); } }, releaseSize : function() { CHost.releaseSize(); if ( this.page_load_cnt == 1 ) { //-- release the parentsize class so the poll can freely expand this.jqo_css_ctar.removeClass("apsmx-parentsize"); } else { this.jqo_poll.css({"width":"auto"}); this.jqo_poll.css({"height":"auto"}); //-- make page invisible this.page_prev.CPage.jqo_page.css({opacity:0}); } }, appendPage : function( jqo_page ) { if ( this.page_prev ) { this.page_prev.CPage.abort(); } jqo_page .css({opacity:0}) .appendTo(this.jqo_poll); }, displayPage : function( jqo_page ) { if ( this.page_prev ) { this.page_prev.CPage.destroy(); this.page_prev = null; } jqo_page.css({opacity:1}) if ( this.page_load_cnt > 1 ) { if ( CCfg.yn(pollcfg["scroll-to-top"],"enabled") ) { var top = CCfg.float(pollcfg["scroll-to-top"],"top",0) this.scrollToTop(top); } } CPollCMS.trigger("wloader-close"); }, callServer : function( requ, obj, func ) { //-- reassign tag parameters var rec = CApp.getParams(pollcfg.wid); var ls = ["wid","pid","tid","iid","pswitch"]; for( var i=0; i") .attr("class",pollcfg.css_ctar) .addClass("apsmx-parentsize"); //-- poll container this.jqo_poll = $("
") .attr("class","apsmx-poll") .appendTo(this.jqo_css_ctar); //-- append the new poll ( a previous poll may exist ) CHost.appendPoll(this.jqo_css_ctar); }, abort : function() { CPollCMS.trigger("poll-abort"); }, destroy : function() { this.jqo_css_ctar.remove(); } }; CPollCmp.register(CPoll); var CCfgLoader = { poll : function( type, name ) { return this.get(pollcfg[type],type,name); }, page : function( type, name ) { return this.get(pollcfg.pagecfg[type],type,name); }, opt : function( type, name ) { return this.get(pollcfg.pagecfg.opt[type],type,name); }, get : function( cfg, type, name ) { if ( name ) { if ( cfg && cfg[name] ) { cfg = cfg[name]; if ( CCfg.enabled(cfg) ) { return cfg; } } } else { if ( cfg ) { if ( CCfg.enabled(cfg) ) { return cfg; } } } return null; } }; var CFlag = { eanim : function() { return CCfg.yn(pollcfg.pagecfg.animation,"entrance-animation"); }, sanim : function() { return CCfg.yn(pollcfg.pagecfg.animation,"state-animation"); }, isVotable : function() { return CCfg.yn(pollcfg.pagecfg,"p-votable"); }, isNavigable : function() { return CCfg.yn(pollcfg.pagecfg,"p-navigable"); }, showResults : function() { return ( pollcfg.pagecfg.ptype == "r" ); } }; var CAlert = { init : function() { this.alertmsg_idx = 1000; CPollCMS.bind("poll-bind",this,function(){ CPollCMS.bind("alert-open",this,this.open); CPollCMS.bind("alert-begin",this,function(data){ CPoll.page.CPageCMS.trigger("alert-begin",data); }); CPollCMS.bind("alert-end",this,function(data){ CPoll.page.CPageCMS.trigger("alert-end",data); }); }); }, getMiddlePos : function() { var jqo_poll = CPoll.jqo_poll; var vp_top = $(window).scrollTop(); var vp_bottom = vp_top + $(window).height(); var ctar_top = jqo_poll.offset().top; var ctar_bottom = ctar_top + jqo_poll.height(); var cv_top = Math.max(vp_top,ctar_top); var cv_bottom = Math.min(vp_bottom,ctar_bottom); var y = parseInt((cv_bottom-cv_top)/2) + cv_top - ctar_top; return y; }, normalizeKey : function( key ) { if ( key[0] != ">" ) { var msg = key; key = "_alert_"+this.alertmsg_idx; CReso.set(key,msg); key = ">" + key; this.alertmsg_idx++; } return key; }, open : function( data ) { var key = this.normalizeKey(data.key); var msg = CReso.get(key); var jqo_ref = data.jqo_ref; //-- show alert var ts = 400; var d_show = 30/2; var d_intro_short = 50; var d_intro_long = 150; var jqo_poll = CPoll.jqo_poll; var jqo_alert = jqo_poll.find(".apsmx-alert"); if ( jqo_alert.length ) { jqo_alert .stop(true,true) .remove(); } jqo_poll.append(CReso.html("alert")); var jqo_alert = jqo_poll .find(".apsmx-alert") .attr("data-key",key); jqo_alert.find(".apsmx-alert-msg").html(msg.sb()); var dura = CCfg.second(pollcfg.alert,"duration",2.5) * 1000; var h = jqo_alert.height(); var d_intro, d_outro; var y; if ( jqo_ref ) { d_intro = d_intro_short; d_outro = d_intro_short; y = jqo_ref.offset().top - jqo_poll.offset().top - h - d_show; jqo_alert.attr("data-dir","up"); } else { d_intro = -d_intro_long; d_outro = -20; y = this.getMiddlePos() - h/2; d_show = -d_show; jqo_alert.attr("data-dir","down"); } CPollCMS.trigger("alert-begin",{ key:key, jqo_ref:jqo_ref }); var _this = this; jqo_alert .css({ visibility:"visible", opacity:0, top:(y+d_show+d_intro)+"px", left:0 }) .animate({ opacity:1, top:(y+d_show)+"px" },ts,function(){ $(this) .animate({ opacity:1, top:(y-d_show)+"px" },dura,"linear",function(){ $(this) .animate({ opacity:0, top:(y-d_show-d_outro)+"px" },ts,function(){ _this.close(key,$(this)); }); }); }) .click(function(e){ $(this).stop(true); _this.close(key,$(this)); }); }, close : function( key, jqo ) { jqo.remove(); CPollCMS.trigger("alert-end",{key:key}); } }; CPollCmp.register(CAlert); var CWloader = { init : function() { CPollCMS.bind("poll-setup:end",this,function(){ this.active_cnt = 0; this.s_delay_init = CCfg.second(pollcfg.wloader,"delay-init"); this.s_delay = CCfg.second(pollcfg.wloader,"delay"); this.jqo_prt = CPoll.jqo_css_ctar; var _this = this; this.handler_scroll = function(){ _this.update(); }; this.handler_resize = function(){ _this.update(); }; CPollCMS.bind("wloader-open",this,this.open); CPollCMS.bind("wloader-close",this,this.close); CPollCMS.bind("wloader-begin",this,function(){ if ( CPoll.page ) { CPoll.page.CPageCMS.trigger("wloader-begin"); } }); CPollCMS.bind("wloader-end",this,function(){ if ( CPoll.page ) { CPoll.page.CPageCMS.trigger("wloader-end"); } }); }); }, getMiddlePos : function() { var vp_top = $(window).scrollTop(); var vp_bottom = vp_top + $(window).height(); var ctar_top = this.jqo_wloader.offset().top; var ctar_bottom = ctar_top + this.jqo_wloader.height(); var cv_top = Math.max(vp_top,ctar_top); var cv_bottom = Math.min(vp_bottom,ctar_bottom); var y = parseInt((cv_bottom-cv_top)/2) + cv_top - ctar_top; return y; }, update : function() { var y = this.getMiddlePos(); if ( this.jqo_wloader.height() ) { var dd = parseInt(this.jqo_wloader_msgbox.height()/2); this.jqo_wloader_msgbox.css({ visibility:"visible", top:(y-dd)+"px" }); } else { this.jqo_wloader_msgbox.css({ visibility:"hidden" }); } }, open : function() { if ( !CCfg.yn(pollcfg.wloader,"enabled") ) { return; } if ( this.b_open ) { return; } this.b_open = true; CPollCMS.trigger("wloader-begin"); this.active_cnt++; var s_delay = ( this.active_cnt > 1 ) ? this.s_delay : this.s_delay_init; if ( s_delay < 0 ) { return; } var jqo_wloader = this.jqo_prt.find(".apsmx-wloader"); if ( jqo_wloader.length ) { jqo_wloader.remove(); } this.jqo_prt.append(CReso.html("wloader")); this.jqo_wloader = this.jqo_prt.find(".apsmx-wloader"); this.jqo_wloader_msgbox = this.jqo_wloader.find(".apsmx-wloader-msgbox"); this.jqo_wloader_msg = this.jqo_wloader.find(".apsmx-wloader-msg"); this.msg = CReso.get(CCfg.text(pollcfg.wloader,"message")); if ( this.msg ) { this.jqo_wloader_msg.html(this.msg.sb()); } else { this.jqo_wloader_msg.remove(); } $(window).bind("scroll",this.handler_scroll); $(window).bind("resize",this.handler_resize); var _this = this; setTimeout(function(){ _this.update(); },s_delay*1000); }, close : function() { if ( this.jqo_prt.find(".apsmx-wloader").length ) { $(window).unbind("scroll",this.handler_scroll); $(window).unbind("resize",this.handler_resize); //-- remove this.jqo_wloader.remove(); this.b_open = false; CPollCMS.trigger("wloader-end"); } } }; CPollCmp.register(CWloader); var CReso = { get : function( key ) { if ( !key ) { return ""; } else if ( key.substr(0,1) == ">" ) { var key = key.substr(1); var v = CCfg.text(pollcfg.resource,key+":"+pollcfg.pagecfg.ptype); v = v ? v : CCfg.text(pollcfg.resource,key); return this.filter(v); } else { return this.filter(key); } }, set : function( key, val ) { pollcfg.resource[key] = val; }, filter : function( txt ) { if ( !txt ) { return txt; } var ls = ["pid","tid","css_ctar","url_poll","url_tpl"]; for( var i=0; i>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CPollInfo = { self_type:"pollinfo", init : function() { CPollCMS.bind("poll-bind",this,function(){ CPollCMS.bind("poll-setup",this,this.setup); CPollCMS.bind("poll-page-run",this,this.pageRun); }); }, setup : function() { var jqo_pollinfo = CHostTool.find(".apsmx-pollinfo"); var b_exists = ( jqo_pollinfo != null ); if (!( this.cfg = CCfgLoader.poll(this.self_type) )) { if ( b_exists ) { jqo_pollinfo.remove(); } return; } if ( !b_exists ) { var px = CUtil.jsShallowCopy(this.cfg); px.jqo_tool = $(CReso.html( this.self_type,this.self_type)); CHostTool.insert(px); } jqo_pollinfo = CHostTool.find(".apsmx-pollinfo"); jqo_pollinfo.html(pollcfg.pid+" & "+pollcfg.tid); }, pageRun : function() { this.t1 = Date.now(); CPoll.page.CPageCMS.bind("page-start",this,this.pageStart); console.log("time measure:start"); }, pageStart : function() { var t = Date.now()-this.t1; console.log("time measure:end",t/1000); } }; CPollCmp.register(CPollInfo); /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CResetBtn = { self_type:"resetbtn", init : function() { CPollCMS.bind("poll-bind",this,function(){ CPollCMS.bind("poll-setup",this,this.setup); }); }, setup : function() { var jqo_resetbtn = CHostTool.find(".apsmx-resetbtn"); var b_exists = ( jqo_resetbtn != null ); if (!( this.cfg = CCfgLoader.poll(this.self_type) )) { if ( b_exists ) { jqo_resetbtn.remove(); } return; } if ( !b_exists ) { var px = CUtil.jsShallowCopy(this.cfg); jqo_resetbtn = px.jqo_tool = $(CReso.html( this.self_type,this.self_type)); CHostTool.insert(px); } this.jqo_inner = jqo_resetbtn.find(".apsmx-resetbtn-inner"); this.jqo_done = jqo_resetbtn.find(".apsmx-resetbtn-done"); this.jqo_reboot = jqo_resetbtn.find(".apsmx-resetbtn-reboot"); this.jqo_inner.html(CReso.get(pollcfg.resetbtn.label.reset)); this.jqo_done.html(CReso.get(pollcfg.resetbtn.label.done)); this.jqo_reboot.html(CReso.get(pollcfg.resetbtn.label.reboot)); if ( b_exists ) { this.jqo_reboot .stop(true,true) .css({ display:"none" }); this.jqo_done .stop(true,true) .css({ display:"none" }); jqo_resetbtn.unbind("click"); jqo_resetbtn.unbind("keydown"); } var _this = this; jqo_resetbtn .click(function(){ _this.resetLog(); }) .keydown(function(e){ var cc = e.which; if (( cc == 13 ) || ( cc == 32 )) { e.preventDefault(); $(this).click(); } }); }, resetLog : function() { var requ = { cmd:"reset", wid:pollcfg.wid, pid:pollcfg.pid, tid:pollcfg.tid, ext:pollcfg.ext }; CPoll.callServer( requ, this, function(resp){ var _this = this; var t1 = 400; var t2 = 250; var h = this.jqo_inner.outerHeight(); this.jqo_done .stop(true,true) .css({ opacity:0, top:(h)+"px" }) .show() .animate({ opacity:1, top:0 },t1,function(){ $(this) .animate({ opacity:1 },t2,function(){ _this.jqo_reboot .stop(true,true) .css({ opacity:0, top:(-h)+"px" }) .show() .animate({ opacity:1, top:0 },t1,function(){ $(this) .animate({ opacity:1 },t1,function(){ CPollCMS.trigger("poll-reboot"); _this.jqo_done .animate({ opacity:0 },t2); _this.jqo_reboot .animate({ opacity:0 },t2); }); }); }); }); }); } }; CPollCmp.register(CResetBtn); function runPage( pollcfg ) { var CPageCmp = this.CPageCmp = new CCmp(); var CPageCMS = this.CPageCMS = new CCMS("CPageCMS"); var CPageRefCnt = this.CPageRefCnt = new CRefCnt(); var CPageTimer = this.CPageTimer = new CTimer(); var CPagePreloader = this.CPagePreloader = new CPreloader(); var CPageWinBind = this.CPageWinBind = new CWinBind(); var COptRefCnt = this.COptRefCnt = new CRefCnt(); var CPage = this.CPage = { init : function() { CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("page-setup:begin",this,this.setup); CPageCMS.bind("page-start",this,this.start); CPageCMS.bind("page-open",this,this.open); CPageCMS.bind("opt-complete",this,function(){ CPageCMS.trigger("page-open"); }); CPageCMS.bind("page-abort",this,function(){ CPageCMS.unbindAll(); CPageTimer.clearAll(); CPagePreloader.cancelAll(); CPageWinBind.unbindAll(); }); }); }, b_open:false, setOpenFlag : function(b) { this.b_open = b; }, getOpenFlag : function() { return this.b_open; }, isVisible : function() { if ( CCfg.text(pollcfg.pagecfg.settings,"activation") == "onload" ) { return true; } else { var b_visible = (( document.hidden == undefined ) ? true : !document.hidden ); return ( b_visible ) ? COpt.isViewPort() : false; } }, setupUserSelect : function() { if ( CCfg.yn(pollcfg.settings,"user-select") ) { this.jqo_page.removeClass("apsmx-nosel"); } }, setupResize : function() { this.prev_width = this.jqo_page.width(); this.prev_height = this.jqo_page.height(); var t = CCfg.float(pollcfg.settings,"monitor-resize-event","n"); if ( t != "n" ) { CPageTimer.interval(this,function(){ this.resize(); },t*1000); } }, resize : function() { var w = this.jqo_page.width(); var h = this.jqo_page.height(); var b_change_w = ( this.prev_width != w ); var b_change_h = ( this.prev_height != h ); this.prev_width = w; this.prev_height = h; if ( b_change_w || b_change_h ) { CPageCMS.trigger("resize"); } }, esAnim : function( b_undo ) { CAnim.go( "page", this.getFront(), b_undo ); }, getFront : function() { return this.posy.find("layer","front"); }, insertCmp : function( key ) { this.posy.insert( key ); }, deleteCmp : function( px ) { this.posy.del( px ); }, /* setupImg : function() { //-- preload images var urls = []; for( var key in pollcfg.imgx ) { urls.push(pollcfg.imgx[key]); } if ( urls.length ) { CPageRefCnt.lock(); CPagePreloader.loadImgs(urls,this,function(){ CPageRefCnt.unlock(); }); } }, */ run : function() { //-- load components CPageCmp.load(); //-- for shutdown var data = {}; CPageCMS.trigger("page-preprocess",data); if ( data.abort ) { return; } //-- add/remove components CPageCMS.trigger("page-component"); //-- obtain page resource CPageCMS.trigger("page-resource"); //-- bind components CPageCMS.trigger("page-bind"); //-- bootup CPoll.fixSize(); CPageRefCnt.init(); CPageCMS.trigger("page-setup"); CPageRefCnt.setup(this,function(){ CPoll.releaseSize(); CPageRefCnt.init(); CPageCMS.trigger("page-ready"); CPageRefCnt.setup(this,function(){ CPageRefCnt.init(); CPageCMS.trigger("page-display"); CPageRefCnt.setup(this,function(){ CPageCMS.trigger("page-start"); }); }); }); }, setup : function() { //-- append page /* this.jqo_page = $(CReso.html( "page."+pollcfg.pagecfg.ptype)); */ this.jqo_page = $(pollcfg["page-html"]); CPoll.appendPage(this.jqo_page); //-- create posy this.posy = new CPosy({ app_key:"apsmx", obj_key:"page", cfg_base:pollcfg.pagecfg, jqo_ctar_list:this.jqo_page }); }, start : function() { //-- open count this.page_open_cnt = 0; //-- set user-select this.setupUserSelect(); //-- init setup this.getFront().css({opacity:0}); this.esAnim(true); //-- display page CPoll.displayPage(this.jqo_page); //-- setup resize handler this.setupResize(); //-- check activation this.checkActivation(); //-- winbind CPageWinBind.bind("visibilitychange",this,function(){ this.checkActivation(); },CCfg.second(pollcfg["bind-delay"],"visibilitychange",0.5)); CPageWinBind.bind("scroll",this,function(){ this.checkActivation(); },CCfg.second(pollcfg["bind-delay"],"scroll",0.1)); CPageWinBind.bind("resize",this,function(){ this.resize(); },CCfg.second(pollcfg["bind-delay"],"resize",0.5)); }, open : function() { /* var html = CPage.jqo_page.html(); console.log(html); */ /* CPage.jqo_page.html(""); */ /* var requ = { cmd:"loop" }; CPoll.callServer( requ, this, function(resp){ console.log("aaaaa-----"); CPage.jqo_page.html(resp.html); }); return; */ //-- page animation this.esAnim(); var alert_key = CCfg.text(pollcfg.pagecfg,"init-alert"); if ( alert_key ) { var dura = CCfg.second(pollcfg.alert, "init-delay",2.5) * 1000; CPageTimer.timeout(this,function(){ CPollCMS.trigger("alert-open",{key:alert_key}); },dura); } }, checkActivation : function() { if ( this.getOpenFlag() ) { if ( this.isVisible() ) { if ( !this.b_visible ) { this.b_visible = true; CPageCMS.trigger("visible"); } } else { if ( this.b_visible ) { this.b_visible = false; CPageCMS.trigger("hidden"); } } } else { this.b_visible = this.isVisible(); if ( this.b_visible ) { this.setOpenFlag(true); this.activate(); } } }, activate : function() { this.page_open_cnt++; if ( this.page_open_cnt == 1 ) { if ( CFlag.eanim() ) { var ms_delay = CCfg.second(pollcfg.pagecfg.opening, "delay",0)*1000; var ms_fadein = CCfg.second(pollcfg.pagecfg.opening, "fadein",0)*1000; ms_fadein = ms_fadein ? ms_fadein : 1; CPageTimer.timeout(this,function(){ var _this = this; this.getFront() .animate({ opacity:1 },ms_fadein,function(){ CPageCMS.trigger("page-begin"); }); },ms_delay); } else { this.getFront().css({opacity:1}); CPageCMS.trigger("page-begin"); } } }, abort : function() { CPageCMS.trigger("page-abort"); }, destroy : function() { this.jqo_page.remove(); } }; CPageCmp.register(CPage); var CADRes = { init : function() { CPageCMS.bind("page-resource:begin",this,function(){ this.db = {}; }); }, register : function( adrtype, rec ) { if ( !this.db[adrtype] ) { this.db[adrtype] = []; } this.db[adrtype].push(rec); }, getHighest : function( adrtype ) { var rec_h = null; if ( this.db[adrtype] ) { var ls = this.db[adrtype]; var pindex = 0; for( var i=0; i=0; i-- ) { var jqo_row = jqo_rows.eq(i); if ( jqo_row.attr("data-posy-loc") == this.default_section.row ) { jqo_flex = jqo_row; break; } else { rf.add("css",jqo_row,{ bottom:bottom+"px", height:jqo_row.outerHeight()+"px" }); bottom += jqo_row.outerHeight(true); } } //-- set row height /* var jqo_flex = jqo_prt.find("."+this.prefix+ "row[data-posy-loc='"+this.default_section.row+"']"); */ var h = jqo_prt.height()-top-bottom; if ( h > 0 ) { rf.add("css",jqo_flex,{display:"block",top:top+"px",height:h+"px"}); //-- find row padding var jqo_flex_ibox = jqo_flex.find("."+this.prefix+"row-ibox"); var ptop = parseFloat(jqo_flex_ibox.css("padding-top")); if ( isNaN(ptop) ) { ptop = 0; } var pbottom = parseFloat(jqo_flex_ibox.css("padding-bottom")); if ( isNaN(pbottom) ) { pbottom = 0; } //-- fix the height of cell and cell-ibox var hh = h-ptop-pbottom; rf.add("css",jqo_flex_ibox.find("."+this.prefix+"cell"), {"height":(hh)+"px"}); rf.add("css",jqo_flex_ibox.find("."+this.prefix+"cell-ibox"), {"max-height":(hh)+"px"}); } else { rf.add("css",jqo_flex,{display:"none"}); } } } }, /* [END] fix height */ find : function( area, loc, jqo_ctar ) { jqo_ctar = jqo_ctar ? jqo_ctar : this.jqo_ctar_list return jqo_ctar.find("."+this.prefix+area+ "[data-posy-loc='"+loc+"']"); }, /* get functions */ getRoot : function( px, b_create ) { b_create = b_create != undefined ? b_create : false; var jqo_ctar = px.jqo.ctar ? px.jqo.ctar : this.jqo_ctar_list; var jqo_root = jqo_ctar.find("."+this.prefix+"root"); if ( !jqo_root.length ) { if ( !b_create ) { return false; } var jqo_root_ctar = this.root_ctar ? jqo_ctar.find(this.root_ctar) : jqo_ctar jqo_root = $("
") .attr("class",this.prefix+"root") .appendTo(jqo_root_ctar); this.setupBox(jqo_root,"root:def"); this.setupBoxType(jqo_root,"root","def"); } px.jqo.root = jqo_root; return true; }, getBox : function( area, px, b_create ) { b_create = b_create != undefined ? b_create : false; var b_exist = ( px.pos[area] && this.cfg_define[area][px.pos[area]] ); var loc; if (( b_exist ) || ( area != "row" )) { loc = b_exist ? px.pos[area] : this.default_section[area]; } else { loc = px.pos[area]; this.cfg_define[area][loc] = {key:loc,pindex:0}; } var pindex = this.cfg_define[area][loc].pindex; var jqo_prt = px.jqo[this.parent_area[area]]; jqo_prt = this.skipInner(jqo_prt); var jqo_box = jqo_prt.find("."+this.prefix+area+ "[data-posy-loc='"+loc+"']"); if ( !jqo_box.length ) { if ( !b_create ) { return false; } //-- create a new box jqo_box = $("
") .attr("class",this.prefix+area) .attr("data-posy-loc",loc) .html($("
") .attr("class",this.prefix+area+"-ibox") ); this.setupBox(jqo_box,area+":"+loc); this.setupBoxType(jqo_box,area,loc); //-- insert it according to pindex var b_done = false; var jqo_boxes = jqo_prt.find("."+this.prefix+area); for( var i=0; i pindex ) { jqo_ref.before(jqo_box); b_done = true; break; } } if ( !b_done ) { jqo_prt.append(jqo_box); } } px.jqo[area] = jqo_box; return true; }, getLayer : function( px, b_create ) { return this.getBox("layer",px,b_create); }, getRow : function( px, b_create ) { return this.getBox("row",px,b_create); }, getCell : function( px, b_create ) { return this.getBox("cell",px,b_create); }, /* insert functions */ insert : function( cmp ) { return; if ( typeof cmp != "object" ) { cmp = {type:cmp}; } //-- normalize caller cmp.caller = cmp.caller || window; //-- specify parent boxes cmp.jqos = cmp.jqos ? cmp.jqos : this.jqo_ctar_list; //-- get html template var html; if ( cmp.html ) { if ( Array.isArray(cmp.html) ) { html = CReso.html(cmp.html[0],cmp.html[1]); } else { html = cmp.html; } } else { html = CReso.html(cmp.type); } //-- setup configurations if ( !cmp.cfg ) { cmp.cfg = this.cfg_base[cmp.type]; if ( !cmp.cfg ) { return; } } //-- iterate all instances if ( Array.isArray(cmp["name"]) ) { //-- want to instanciate some names //-- but not all decleard for( var i=0; i") .attr("class",this.prefix+"aploc") .css(css); var jqo_center = $("
") .attr("class",this.prefix+"apcenter"); if ( tran.v || tran.h ) { jqo_center.css({ transform:"translate("+tran.h+","+tran.v+")" }); } var jqo_shift = $("
") .attr("class",this.prefix+"apmove") .css({ top:shiftxy.y+"px", left:shiftxy.x+"px" }); jqo_loc.html( jqo_center.html( jqo_shift.html( px.jqo.insert ) ) ) .appendTo(jqo_prt); }, insertByRowCell : function( px ) { //-- tranverse row & cell var jqo_abs = null; if ( !px.pos.row ) { jqo_abs = px.jqo.layer; } else { this.getRow(px,true); if ( !px.pos.cell ) { jqo_abs = px.jqo.row; } else { this.getCell(px,true); jqo_abs = px.jqo.cell; } } if ( px.jqo.insert ) { //-- type if ( px["type"] ) { px.jqo.insert.attr("data-type",px["type"]); } //-- name if ( px["name"] ) { px.jqo.insert.attr("data-name",px["name"]); } //-- size if ( px.size ) { px.jqo.insert.attr("data-size",px.size.toLowerCase()); } //-- tooltip if ( px.tooltip ) { CPageCMS.trigger("tooltip-attach",{ jqo_ref:px.jqo.insert, msg:px.tooltip, type:px.loc }); } //-- insert var b_abs = ( px.pos.v && px.pos.h ); if ( b_abs && jqo_abs ) { //-- insert by absolut positioning this.insertByAbsolute(jqo_abs,px); } else { if ( px.pos.row && px.pos.cell ) { //-- insert to row & cell var b_done = false; //-- make a wrap div var jqo_wrap; if ( CCfg.yn(px,"nowrap") ) { jqo_wrap = px.jqo.insert; } else { jqo_wrap = $("
") .attr("class",this.prefix+"wrap") .html(px.jqo.insert); //-- wrap type if ( px["wrap-type"] ) { jqo_wrap.attr("data-wrap-type",px["wrap-type"]); } //-- wrap style if ( px["wrap-style"] ) { jqo_wrap.attr("style",px["wrap-style"]); } } this.setupBox(px.jqo.insert,px); //-- attach pindex if ( px.pindex ) { jqo_wrap.attr("data-posy-pindex",px.pindex); } //-- shift relatively if ( px["shift"] ){ jqo_wrap.css({ top:px["shift"].y+"px",left:px["shift"].x+"px"}); } //-- find ibox var jqo_ibox = px.jqo.cell.children("."+ this.prefix+"cell-ibox").eq(0); //-- put it in according to pindex var jqos = jqo_ibox.children(); for ( var i=0; i px.pindex ) { b_done = true; jqo.before(jqo_wrap); } } //-- if not done yet, put it at the bottom if ( !b_done ) { jqo_ibox.append(jqo_wrap); } //-- insert br this.insertBr(jqo_ibox,px); } else { //-- find ibox var jqo_ibox = px.jqo.layer.children("."+ this.prefix+"layer-ibox").eq(0); jqo_ibox.addClass(this.prefix+"parentsize"); //-- insert to layer jqo_ibox.append(px.jqo.insert); } } } return true; }, insertBr : function( jqo_prt, px ) { if (( px.pos.row == this.default_section["row"] ) && ( px.pos.cell == this.default_section["cell"] )) { var _this = this; jqo_prt.children("."+this.prefix+"wrap").each(function(){ if ( $(this).prev().hasClass(_this.prefix+"wrap") ) { $(this).before("
"); } }); } }, del : function( px ) { //-- normalize params px = this.normalizeParams(px); var b_delete_root = false; if ( px == undefined ) { px = {}; b_delete_root = true; } px.jqo = {}; //-- traverse if ( this.getRoot(px) ) { if ( b_delete_root ) { px.jqo.root.remove() } else { if ( this.getLayer(px) ) { if ( !px.pos.row ) { px.jqo.layer.remove(); } else { if ( this.getRow(px) ) { if ( !px.pos.cell ) { px.jqo.row.remove(); } if ( this.getCell(px) ) { px.jqo.cell.remove(); } } } } } } } }; this.CPosy = CPosy; var CSlimCol = { setup : function() { var cfg = pollcfg.pagecfg.slimcol; this.b_enabled = false; this.b_slim = CCfg.yn(cfg,"slim"); this.b_w100p = CCfg.yn(cfg,"w100p"); if ( !CCfg.enabled(cfg) ) { return; } var bpnt = CCfg.float(cfg,"break-point"); var ref = CCfg.text(cfg,"reference"); if ( bpnt && ref ) { var query = "("+ref+":"+bpnt+"px)"; this.b_enabled = ( bpnt && window.matchMedia && window.matchMedia(query).matches ); } }, singlecol : function() { return this.b_enabled; }, slim : function() { return this.b_enabled && this.b_slim; }, w100p : function() { return this.b_enabled && this.b_w100p; } }; var CHtml = { self_type:"html", init : function() { CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("page-setup",this,function(){ this.setup(); }); }); }, getContent : function( px ) { return CReso.get(px.content); }, setup : function() { CPage.insertCmp({ type:this.self_type, caller:this, setup:function( px ) { var jqo_content = px.jqo.insert.find(".apsmx-content"); if ( jqo_content.length ) { var content = this.getContent(px); jqo_content.html(content); } } }); } }; CPageCmp.register(CHtml); var CVote = { init : function() { CPageCMS.bind("page-bind",this,function(){ if ( !CFlag.isVotable() ) { return; } CPageCMS.bind("page-setup",this,this.pageSetup); CPageCMS.bind("page-ready",this,this.pageReady); CPageCMS.bind("opt-setup",this,this.optSetup); CPageCMS.bind("vcheck-click",this,this.click); CPageCMS.bind("vcheck-check",this,this.check); CPageCMS.bind("vcheck-uncheck",this,this.uncheck); CPageCMS.bind("vcheck-notallowed",this,this.notallowed); CPageCMS.bind("vote",this,this.vote); CPageCMS.bind("vote-validate",this,this.voteValidate); CPageCMS.bind("vote-process",this,this.voteProcess); CPageCMS.bind("vote-complete",this,this.voteComplete); }); }, pageSetup : function() { this.min_sel = CCfg.int(pollcfg["multiple-options"],"min",1); this.max_sel = CCfg.int(pollcfg["multiple-options"],"max", this.min_sel,this.min_sel); }, pageReady : function() { this.triggerSelCnt("init"); }, optSetup : function() { this.resetAllChecks(); }, click : function( data ) { var jqo_clicked = data.jqo; var oid = data.oid; var rec = jqo_clicked.data("rec"); if ( rec.state == "n" ) { var cnt = this.countChecked(); if ( this.max_sel == 1 ) { this.resetAllChecks(); rec.state = "y"; CPageCMS.trigger("vcheck-check",{ oid:oid, jqo:jqo_clicked, user:true }); cnt++; this.triggerSelCnt("check"); } else { //-- check if count is max if ( this.max_sel > cnt ) { rec.state = "y"; CPageCMS.trigger("vcheck-check",{ oid:oid, jqo:jqo_clicked, user:true }); cnt++; this.triggerSelCnt("check"); } else { CPageCMS.trigger("vcheck-notallowed",{ oid:oid, jqo:jqo_clicked, user:true }); } } if ( CCfg.yn(pollcfg.pagecfg.voting,"quick-vote") ) { if ( cnt >= this.max_sel ) { CPageCMS.trigger("vote", {jqo_clicked:jqo_clicked}); } } } else { rec.state = "n"; CPageCMS.trigger("vcheck-uncheck",{ oid:oid, jqo:jqo_clicked, user:true }); this.triggerSelCnt("uncheck"); } }, resetAllChecks : function() { COpt.each(this,function(jqo,rec){ if ( rec.state == "y" ) { rec.state = "n"; CPageCMS.trigger("vcheck-uncheck",{ oid:rec.oid, jqo:jqo, user:false }); } rec.state = "n"; }); }, countChecked : function( jqo ) { var cnt_clicked = 0; COpt.each(this,function(jqo,rec){ if ( rec.state == "y" ) { cnt_clicked++; } }); return cnt_clicked; }, getAns : function() { var ans = []; COpt.each(this,function(jqo,rec){ if ( rec.state == "y" ) { ans.push(rec.oid); } }); return ans; }, triggerSelCnt : function( event ) { var selcnt = this.countChecked(); var data = { event:event, selcnt:selcnt, total:COpt.len(), min_sel:this.min_sel, max_sel:this.max_sel, need_more:this.min_sel-selcnt }; CPageCMS.trigger("selcnt-change",data); }, toggleMark : function( data, b ) { var prev = b ? "unchecked" : "checked"; var next = b ? "checked" : "unchecked"; data.jqo .removeClass("apsmx-oss-notallowed") .removeClass("apsmx-oss-"+prev) .addClass("apsmx-oss-"+next); if ( data.user ) { data.jqo.find(".apsmx-cmark").focus(); } }, check : function( data ) { this.toggleMark(data,true); }, uncheck : function( data ) { this.toggleMark(data,false); }, notallowed : function( data ) { data.jqo .removeClass("apsmx-oss-checked") .removeClass("apsmx-oss-unchecked") .removeClass("apsmx-oss-notallowed"); CUtil.recalcStyle(data.jqo); data.jqo.addClass("apsmx-oss-notallowed"); }, vote : function( data ) { this.jqo_clicked = data.jqo_clicked; var ans = this.getAns(); var data = { ans:ans, result:true }; CPageCMS.trigger("vote-validate",data); if ( data.result ) { CPageCMS.trigger("vote-process",{ans:data.ans}); } else { this.showAlert(data.errmsg); } }, voteValidate : function( data ) { if ( !data.result ) { return; } var cnt = data.ans.length; if ( cnt < this.min_sel ) { data.errmsg = ">vote:check-option"; data.result = false; } }, voteProcess : function( data ) { CPageCMS.trigger("pause"); CPollCMS.trigger("wloader-open"); var requ = { cmd:"vote", ans:data.ans }; CPoll.callServer( requ, this, function(resp){ if ( resp.pagecfg ) { CPageCMS.trigger("vote-complete",{resp:resp}); } else { CPageCMS.trigger("resume"); CPollCMS.trigger("wloader-close"); this.showAlert(resp.alert); } }); }, voteComplete : function( data ) { CPoll.run( data.resp ); }, showAlert : function( key ) { if ( !key ) { return; } CPollCMS.trigger("alert-open", {key:key,jqo_ref:this.jqo_clicked}); } }; CPageCmp.register(CVote); function CTooltipOne(px){ for( var p in px ) { this[p] = px[p]; } this.open(); }; CTooltipOne.prototype = { getCssVal : function( cls, attr ) { var jqo_test_ctar = $("
") .css({visibility:"hidden"}) .attr("class","apsmx-tooltip") if ( this.key ) { jqo_test_ctar.attr("data-key",this.key); } if ( this.type ) { jqo_test_ctar.attr("data-type",this.type); } var jqo_test = $("
"); jqo_test .css({visibility:"hidden"}) .attr("class",cls) .appendTo(jqo_test_ctar); jqo_test_ctar.appendTo(this.prt.jqo_ctar); var v = jqo_test.css(attr); jqo_test_ctar.remove(); return v; }, getCssInt : function( cls, attr ) { return parseInt(this.getCssVal(cls,attr)); }, getTipSize : function() { return this.getCssInt("apsmx-tooltip-triangle", "border-top-width"); }, getBoxRadius : function() { return this.getCssInt("apsmx-tooltip-msgbox", "border-top-left-radius"); }, getBgColor : function() { return this.getCssVal("apsmx-tooltip-msgbox", "background-color"); }, getMsgBoxSize : function( jqo_msgbox ) { jqo_msgbox .css({visibility:"hidden"}) .appendTo(this.prt.jqo_ctar); var size = { w:parseInt(jqo_msgbox.css("width")), h:parseInt(jqo_msgbox.css("height")) }; jqo_msgbox .remove() .css({visibility:"visible"}) return size; }, getRect : function( clip, space ) { var jqo_ctar = this.prt.jqo_ctar; var view = {}; var jqo_sref = $(window); var size_cref = { w:document.body.clientWidth, h:document.body.clientHeight }; view.top = jqo_sref.scrollTop(); view.bottom = view.top + size_cref.h; view.left = jqo_sref.scrollLeft(); view.right = view.left + size_cref.w; var ctar = {}; ctar.top = jqo_ctar.offset().top; ctar.bottom = ctar.top + jqo_ctar.height(); ctar.left = jqo_ctar.offset().left; ctar.right = ctar.left + jqo_ctar.width(); var cv = {}; cv.top = Math.max(view.top,ctar.top); cv.bottom = Math.min(view.bottom,ctar.bottom); cv.left = Math.max(view.left,ctar.left); cv.right = Math.min(view.right,ctar.right); clip.x = cv.left; clip.y = cv.top; clip.w = cv.right - cv.left; clip.h = cv.bottom - cv.top; var ref = {}; ref.top = this.jqo_ref.offset().top; ref.bottom = ref.top + this.jqo_ref.outerHeight(); ref.left = this.jqo_ref.offset().left; ref.right = ref.left + this.jqo_ref.outerWidth(); space.top = ref.top - cv.top; space.bottom = cv.bottom - ref.bottom; space.left = ref.left - cv.left; space.right = cv.right - ref.right; }, findOrien : function( space, msgbox ) { var k = 1.0; var orien; var lx = { top:( space.top - msgbox.h * k ) * msgbox.w, bottom:( space.bottom - msgbox.h * k ) * msgbox.w, left:( space.left - msgbox.w * k ) * msgbox.h, right:( space.right - msgbox.w * k ) * msgbox.h }; var b_top_bottom = (( 0 < space.top ) && ( 0 < space.bottom )); var b_left_right = (( 0 < space.left ) && ( 0 < space.right )); if (( lx.top > 0 ) && b_left_right ) { orien = "top"; } else if (( lx.bottom > 0 ) && b_left_right ) { orien = "bottom"; } else if (( lx.right > 0 ) && b_top_bottom ) { orien = "right"; } else if (( lx.left > 0 ) && b_top_bottom ) { orien = "left"; } else { var n; n = lx.top; orien = "top"; if ( lx.bottom > n ) { n = lx.bottom; orien = "bottom"; } else if ( lx.right > n ) { n = lx.right; orien = "right"; } else if ( lx.left > n ) { n = lx.left; orien = "left"; } } return orien; }, open : function() { //-- tooltip's tip width and height var u = this.getTipSize(); var tri = { w:u*2, h:u }; //-- msgbox's border radius var r = this.getBoxRadius(); var radius = { x:r, y:r }; //-- container element size var clip = {}; var space = {}; this.getRect(clip,space); //-- reference element size var ref_pos = this.jqo_ref.offset(); var ref = { x:ref_pos.left, y:ref_pos.top, w:this.jqo_ref.outerWidth(), h:this.jqo_ref.outerHeight() }; //-- tooltip this.jqo_tooltip = $("
"); if ( this.key ) { this.jqo_tooltip.attr("data-key",this.key); } if ( this.type ) { this.jqo_tooltip.attr("data-type",this.type); } this.jqo_tooltip.attr("class","apsmx-tooltip apsmx-nosel"); //-- msgbox var msg = this.msg; msg = msg.replace(new RegExp("\r","g"),""); msg = msg.replace(new RegExp("\n","g"),"
"); var jqo_msgbox = $("
"); if ( this.key ) { jqo_msgbox.attr("data-key",this.key); } if ( this.type ) { jqo_msgbox.attr("data-type",this.type); } jqo_msgbox .attr("class","apsmx-tooltip-msgbox") .html($("
") .attr("class","apsmx-tooltip-msg") .html(msg) ); var msgbox = this.getMsgBoxSize(jqo_msgbox); msgbox.w += tri.w; msgbox.h += tri.w; //-- find orientation(top,bottom,left,right) var orien = this.findOrien(space,msgbox); //-- create tip var jqo_tri = $("
"); jqo_tri .attr("class","apsmx-tooltip-triangle") .css({"border-color":this.getBgColor()}) .addClass("apsmx-tooltip-triangle-"+orien) var jqo_tip = $("
") .attr("class","apsmx-tooltip-tip") .html(jqo_tri); //-- combine parts switch( orien ) { case "top": this.jqo_tooltip .append(jqo_msgbox) .append(jqo_tip); break; case "bottom": this.jqo_tooltip .append(jqo_tip) .append(jqo_msgbox); break; case "left": jqo_tip.css({display:"inline-block"}); jqo_msgbox.css({display:"inline-block"}); this.jqo_tooltip .append(jqo_msgbox) .append(jqo_tip); break; case "right": jqo_tip.css({display:"inline-block"}); jqo_msgbox.css({display:"inline-block"}); this.jqo_tooltip .append(jqo_tip) .append(jqo_msgbox); break; } //-- put it in ctar this.jqo_tooltip.appendTo(this.prt.jqo_ctar); //-- get size var msgbox = { w:jqo_msgbox.outerWidth(), h:jqo_msgbox.outerHeight() }; //-- adjust tip width or height switch( orien ) { case "top": case "bottom": jqo_tip.css({height:tri.h+"px"}); break; case "left": case "right": jqo_tip.css({ width:tri.h+"px", height:msgbox.h+"px" }); break; } //-- position tip in the center switch( orien ) { case "top": tri.y_init = 0; tri.x_init = (msgbox.w-tri.w)/2; break; case "bottom": tri.y_init = -tri.h; tri.x_init = (msgbox.w-tri.w)/2; break; case "left": tri.y_init = (msgbox.h-tri.w)/2; tri.x_init = 0; break; case "right": tri.y_init = (msgbox.h-tri.w)/2; tri.x_init = -tri.h; break; } //-- position tooltip var x, y; switch( orien ) { case "top": case "bottom": x = ref.x+ref.w/2-msgbox.w/2; tri.x = tri.x_init; var d = (x + msgbox.w)-(clip.x+clip.w); if ( d > 0 ) { tri.x = tri.x + d; var d_tri = (tri.x+tri.w)-(msgbox.w-radius.x); if ( d_tri > 0 ) { tri.x = msgbox.w-radius.x-tri.w; x = x - d + d_tri; } else { x -= d; } } var d = clip.x-x; if ( d > 0 ) { tri.x = tri.x - d; var d_tri = radius.x - tri.x; if ( d_tri > 0 ) { tri.x = radius.x; x = x + d - d_tri; } else { x += d; } } tri.y = tri.y_init; break; case "left": case "right": y = ref.y-(msgbox.h-ref.h)/2; tri.y = tri.y_init; var d = (y + msgbox.h)-(clip.y+clip.h); if ( d > 0 ) { tri.y = tri.y + d; var d_tri = (tri.y+tri.h)-(msgbox.h-radius.h); if ( d_tri > 0 ) { tri.y = msgbox.h-radius.y-tri.h; y = y - d + d_tri; } else { y -= d; } } var d = clip.y-y; if ( d > 0 ) { tri.y = tri.y - d; var d_tri = radius.y - tri.y; if ( d_tri > 0 ) { tri.y = radius.y; y = y + d -d_tri; } else { y += d; } } tri.x = tri.x_init; break; } //-- additional position calculations var d = 8; this.dx = 0; this.dy = 0; switch( orien ) { case "top": y = ref.y-(msgbox.h+tri.h); this.dy = -d; break; case "bottom": y = ref.y+ref.h; this.dy = d; break; case "left": x = ref.x-(msgbox.w+tri.h); this.dx = -d; break; case "right": x = ref.x+ref.w; this.dx = d; break; } //-- set tip poisitons jqo_tri .css({ top:tri.y+"px", left:tri.x+"px" }); //-- set tooltip poisitons var ctar_pos = this.prt.jqo_ctar.offset(); var x_end = x-ctar_pos.left; var y_end = y-ctar_pos.top; var x_start = x_end+this.dx; var y_start = y_end+this.dy; var _this = this; this.jqo_tooltip .css({ opacity:0, left:x_start+"px", top:y_start+"px" }) .animate({ opacity:1, left:x_end+"px", top:y_end+"px" }) .click(function(e){ _this.prt.close(_this.jqo_ref); }); }, close : function( b_quick ) { this.jqo_tooltip.stop(true); if ( b_quick ) { this.jqo_tooltip .css({opacity:0}) .remove(); } else { this.jqo_tooltip .animate({ opacity:0, left:"+="+this.dx+"px", top:"+="+this.dy+"px" },300,function(){ $(this).remove(); }); } } }; var CTooltip = { init : function(){ CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("page-setup",this,function(){ this.idx = 1000; this.list = {}; this.jqo_ctar = CPoll.jqo_css_ctar; }); CPageCMS.bind("tooltip-attach",this,this.attach); CPageCMS.bind("page-begin",this,function(){ CPageCMS.bind("tooltip-open",this,this.open); CPageCMS.bind("tooltip-close",this,this.close); CPageCMS.bind("tooltip-close-all",this,this.closeAll); }); CPageCMS.bind("pause,vote,"+ "opt-removed,opt-move",this,function(){ this.closeAll(); }); }); }, attach : function( data ){ var _this = this; data.jqo_ref .hoverTS(function(){ _this.hoverBegin(data); },function(){ _this.hoverEnd(data); }); }, hoverBegin : function( data ){ if ( data.client ? data.client_func.call(data.client,data) : true ) { CPageCMS.trigger("tooltip-open",data); } }, hoverEnd : function( data ){ CPageCMS.trigger("tooltip-close",data); }, open : function( data ){ this.closeAll(); if ( !data.jqo_ref.data("apsmx-tooltip-idx") ) { data.prt = this; this.list[this.idx] = new CTooltipOne(data); data.jqo_ref.data("apsmx-tooltip-idx",this.idx); this.idx++; } }, close : function( data ) { if ( data.jqo_ref && data.jqo_ref.length ) { var idx = data.jqo_ref.data("apsmx-tooltip-idx"); data.jqo_ref.data("apsmx-tooltip-idx",0); if ( idx in this.list ) { this.list[idx].close(); } } }, closeAll : function() { for ( var idx in this.list ) { var jqo_ref = this.list[idx].jqo_ref; var idx = jqo_ref.data("apsmx-tooltip-idx"); if ( idx ) { jqo_ref.data("apsmx-tooltip-idx",0); } } this.jqo_ctar.find(".apsmx-tooltip").remove(); this.list = {}; } }; CPageCmp.register(CTooltip); var CToolBtn = { self_type:"toolbtn", init : function() { CPageCMS.bind("page-resource:begin",this,function(){ this.handlers = {}; }); CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("page-setup",this,this.setup); CPageCMS.bind("toolbtn-click",this,this.click); }); }, register : function( btntype, rec ) { this.handlers[btntype] = rec; }, setup : function() { this.toolbtn_idx = 1000; this.toolbtns = {}; CPage.insertCmp({ type:this.self_type, caller:this, init:this.initToolBtn, setup:this.setupToolBtn, complete:this.completeToolBtn }); }, initToolBtn : function( px ) { if ( !this.handlers[px.btntype] ) { console.log("Unknown Toolbtn Type: "+px.btntype); return false; } var rec = this.handlers[px.btntype]; //-- call init handler var b_ok = ( rec.init ) ? rec.init.call(rec.obj,px) : true; return b_ok; }, createToolBtn : function( px ) { var rec = this.handlers[px.btntype]; return ( rec.create ) ? rec.create.call(rec.obj,px) : false; }, setupToolBtn : function( px ) { var rec = this.handlers[px.btntype]; if ( rec.setup ) { rec.setup.call(rec.obj,px); } //-- set px data this.setData( px ); //-- tabindex px.jqo.insert.attr("tabindex","0") var jqo_insert_ibox = px.jqo.insert .find(".apsmx-toolbtn-ibox"); var b_needed; //-- icon b_needed = false; var jqo_img = jqo_insert_ibox .find(".apsmx-toolbtn-img") if ( jqo_img.length && px.icon ) { var u = ""; if ( px.icon == "" ) { px.icon = px.btntype+".png"; } else { u = "@"; } var url = CReso.img(px.icon,u+px.btntype); if ( url ) { b_needed = true; jqo_img.attr("src",url); } } if ( !b_needed ) { jqo_img.remove(); } //-- label b_needed = false; var jqo_label = jqo_insert_ibox .find(".apsmx-toolbtn-label") if ( jqo_label.length && px.label ) { b_needed = true; jqo_label .html(CReso.get(px.label)) .bind("contextmenu",function(e){ e.preventDefault(); e.stopPropagation(); return false; }); } if ( !b_needed ) { jqo_label.remove(); } }, completeToolBtn : function( px ) { var _this = this; px.jqo.insert .click(function(e){ CPageCMS.trigger("tooltip-close-all"); var px = _this.getData($(this)); var rec = _this.handlers[px.btntype]; if ( rec.click_event ) { rec.click_event.call(rec.obj,px,e); } else { e.preventDefault(); } CPageCMS.trigger("toolbtn-click",{ px:px }); }) .keydown(function(e){ var cc = e.which; if (( cc == 13 ) || ( cc == 32 )) { e.preventDefault(); $(this).click(); } }) .bind("contextmenu",function(e){ e.preventDefault(); e.stopPropagation(); return false; }); var rec = this.handlers[px.btntype]; if ( rec.ready ) { rec.ready.call(rec.obj,px); } }, setData : function( px ) { px.jqo.insert.attr("data-toolbtn-idx",this.toolbtn_idx) this.toolbtns[this.toolbtn_idx] = px; this.toolbtn_idx++; }, getData : function( jqo ) { var idx = jqo.attr("data-toolbtn-idx"); return ( idx && this.toolbtns[idx] ) ? this.toolbtns[idx] : null; }, click : function( data ) { var px = data.px; if ( px ) { //-- click effect px.jqo.insert.removeClass("apsmx-toolbtn-click"); CUtil.recalcStyle(px.jqo.insert); px.jqo.insert.addClass("apsmx-toolbtn-click"); //-- call click handler var rec = this.handlers[px.btntype]; if ( rec.click ) { rec.click.call(rec.obj,px); } } } }; CPageCmp.register(CToolBtn); var CBgColor = { self_layer:"bgcolor", self_type:"bgcolor", self_name:"bgcolor1", init : function() { if (!( this.cfg = CCfgLoader.page( this.self_type,this.self_name) )) { return; } CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("page-setup",this,this.setup); }); }, setup : function() { CPage.insertCmp({ type:this.self_type, name:[this.self_name], caller:this, init:function( px ) { return this.loadColor(px["name"]); }, complete:function( px ) { var color = this.getColor(this.colorx); CBgSetter.color(px.jqo.insert,color,this.cfg); } }); }, loadColor : function( name ) { var cfg_bgcolor = pollcfg.pagecfg.bgcolor[name]; if ( !cfg_bgcolor["source"] ) { return false; } var src = cfg_bgcolor["source"]; this.opacity = CCfg.opacity(cfg_bgcolor,"opacity"); var cfg_color = pollcfg.pagecfg.color; if ( !cfg_color ) { return false; } if ( !cfg_color[src] ) { return false; } this.colorx = cfg_color[src]; return true; }, getColor : function( colorx ) { if ( typeof colorx == "string" ) { return colorx; } else if ( Array.isArray(colorx) ) { if ( colorx.length == 0 ) { return null; } else { return colorx[0]; } } else { return null; } } }; CPageCmp.register(CBgColor); var CBgImg = { self_layer:"bgimg", self_type:"bgimg", self_name:"bgimg1", init : function() { if (!( this.cfg = CCfgLoader.page( this.self_type,this.self_name) )) { return; } CPageCMS.bind("page-resource",this,function(){ var pindex = CCfg.float(pollcfg.pagecfg .define.layer.bgimg,"pindex"); var _this = this; CADRes.register("page-bgimg",{ obj:this, pindex:pindex, getImgRec:function() { return _this.imgrec; } }); }); CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("page-setup",this,this.setup); }); }, setup : function() { CPage.insertCmp({ type:this.self_type, name:[this.self_name], caller:this, init:function( px ) { return this.loadImg(px["name"]); }, complete:function( px ) { CBgSetter.img(px.jqo.insert,this.imgrec,this.cfg); } }); }, loadImg : function( name ) { var cfg_bgimg = pollcfg.pagecfg.bgimg[name]; if ( !cfg_bgimg ) { return false; } if ( !cfg_bgimg["source"] ) { return false; } var src = cfg_bgimg["source"]; var cfg_image = pollcfg.pagecfg.image; if ( !cfg_image ) { return false; } if ( !cfg_image[src] ) { return false; } var imgrecx = CIRList.make(cfg_image[src]); if ( imgrecx.length == 0 ) { this.imgrec = null; } else { this.imgrec = imgrecx[0]; } if ( this.imgrec ) { var url = this.imgrec.url; if ( url ) { CPageRefCnt.lock(); CPagePreloader.loadImgs([url],this,function(){ CPageRefCnt.unlock(); }); return true; } } return false; } }; CPageCmp.register(CBgImg); var CSelCnt = { init : function() { CPageCMS.bind("page-bind",this,function(){ //-- bind CPageCMS.bind("selcnt-change",this,function(data){ var jqo_selcnt = CPage.jqo_page.find(".apsmx-selcnt"); if ( data.need_more <= 0 ) { jqo_selcnt.addClass("apsmx-selcnt-ready"); } else { jqo_selcnt.removeClass("apsmx-selcnt-ready"); } jqo_selcnt.find(".apsmx-selcnt-num") .html(data.selcnt.toString()); }); }); } }; CPageCmp.register(CSelCnt); var CStatus = { self_layer:"status", self_type:"status", self_name:"status1", init : function() { if (!( this.cfg = CCfgLoader.page( this.self_type,this.self_name) )) { return; } this.statuskey = pollcfg.pagecfg.statuskey; CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("page-setup",this,this.setup); }); }, setup : function() { CPage.jqo_page.addClass("apsmx-pss-"+this.statuskey); CPage.insertCmp({ type:this.self_type, name:[this.self_name], caller:this, init : function( px ) { this.msg = CReso.get(CCfg.text(px.msg,this.statuskey)); return ( this.msg ); }, setup:function( px ) { if ( px.jqo.insert.length ) { px.jqo.insert.attr("data-statuskey",this.statuskey); var msg = this.msg; if ( msg ) { var jqo_msg = px.jqo.insert.find(".apsmx-status-msg"); if ( jqo_msg.length ) { jqo_msg.html(msg.sb()); } } } }, sanim:function( name, px ) { var jqo_msg = px.jqo.insert.find(".apsmx-status-msg"); if ( jqo_msg.length ) { CAnim.sanim(px.jqo.insert,px); } } }); } }; CPageCmp.register(CStatus); var CVtotal = { self_type:"vtotal", init : function() { if ( !CFlag.showResults() ) { return; } CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("page-setup",this,this.setupPage); CPageCMS.bind("opt-setup",this,this.setupOpt); }); }, update : function() { if ( this.b_page && this.b_opt ) { var vtotal_str = CReso.get(this.px.content).replace(/%vtotal%/g, ''+this.vtotal+''); this.px.jqo.insert .find(".apsmx-vtotal-msg") .html(vtotal_str.sb()); } }, setupPage : function() { CPage.insertCmp({ type:this.self_type, caller:this, setup:function( px ) { this.b_page = true; this.px = px; this.update(); } }); }, setupOpt : function() { this.b_opt = true; this.vtotal = COpt.vtotal; this.update(); } }; CPageCmp.register(CVtotal); var CVoteBtn = { self_type:"votebtn", init : function() { CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("page-setup",this,this.setup); CPageCMS.bind("page-open",this,this.enable); }); }, setup : function() { if ( !CFlag.isVotable() ) { return; } CPage.insertCmp({ type:this.self_type, caller:this, setup:function( px ) { px.jqo.insert .find(".apsmx-votebtn-label") .html(CReso.get(px.content)); } }); }, enable : function() { var _this = this; var jqo_btn = CPage.jqo_page.find(".apsmx-votebtn"); jqo_btn.click(function(e){ CPageCMS.trigger("tooltip-close-all"); _this.jqo_clicked = $(this); CPageCMS.trigger("vote",{jqo_clicked:_this.jqo_clicked}); }) .keydown(function(e){ var cc = e.which; if (( cc == 13 ) || ( cc == 32 )) { e.preventDefault(); $(this).click(); } }); } }; CPageCmp.register(CVoteBtn); var COpt = { init : function() { CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("opt-build",this,this.buildOpt); CPageCMS.bind("opt-create",this,this.createOpt); CPageCMS.bind("opt-sort",this,this.sortOpt); CPageCMS.bind("opt-setup",this,this.setupOpt); CPageCMS.bind("opt-configure",this,this.configureOpt); CPageCMS.bind("opt-height",this,this.heightOpt); CPageCMS.bind("opt-organize",this,this.organizeOpt); CPageCMS.bind("opt-layout",this,this.layoutOpt); CPageCMS.bind("opt-align",this,this.alignOpt); CPageCMS.bind("opt-move",this,this.moveOpt); CPageCMS.bind("opt-update",this,this.updateOpt); CPageCMS.bind("opt-eanim",this,this.eanimOpt); CPageCMS.bind("opt-internal",this,this.internalOpt); CPageCMS.bind("opt-complete",this,this.completeOpt); CPageCMS.bind("opt-rebuild",this,this.rebuildOpt); CPageCMS.bind("page-setup",this,function(){ //-- init this.scroll_threshold = 0; //-- insert card table //--CPage.insertCmp({type:"cardtable",html:["cardtable"]}); this.jqo_ctar = CPage.jqo_page.find(".apsmx-cardtable"); //-- if there is no poll options, send "complete" message if ( this.jqo_ctar.length == 0 ) { CPageCMS.trigger("opt-complete"); return; } //-- build poll options CPageRefCnt.lock(); CPageCMS.trigger("opt-build",{ obj:this, func:function(){ CPageRefCnt.unlock(); } }); }); CPageCMS.bind("page-setup:end",this,function(){ //-- if scroll bar shows up, //-- update one more time if ( this.checkWidthChange() ) { CPageCMS.trigger("opt-update"); } }); CPageCMS.bind("page-begin",this,function(){ CPageCMS.trigger("opt-eanim",{ obj:this, func:function(){ CPageCMS.trigger("opt-internal"); CPageCMS.trigger("opt-complete"); } }); }); CPageCMS.bind("resize",this,function(){ CPageCMS.trigger("opt-update"); }); }); }, insertCmp : function( key ) { this.posy.insert( key ); }, deleteCmp : function( px ) { this.posy.del( px ); }, each : function( obj, func ) { for( var i=0; i ctar_top ) ? ( ctar_bottom - vp_top ) : ( vp_bottom - ctar_top ); return ( vish > this.scroll_threshold ); }, checkWidthChange : function() { if ( this.ctar_width == undefined ) { this.ctar_width = this.jqo_ctar.get(0).clientWidth; return false; } else { var ctar_width = this.jqo_ctar.get(0).clientWidth; if ( this.ctar_width == ctar_width ) { return false; } else { this.ctar_width = ctar_width; return true; } } }, updateOpt : function( data ) { if ( !this.optlist.length ) {return;} //-- maximun number of columns data.max_col = CCfg.int(pollcfg.pagecfg.opt.layout,"max-column",0,0); console.log("update1"); //-- slimcol CSlimCol.setup(); if ( CSlimCol.singlecol() ) { data.max_col = 1; } if ( CSlimCol.slim() ) { CPage.jqo_page.addClass("apsmx-slimcol-slim"); } else { CPage.jqo_page.removeClass("apsmx-slimcol-slim"); } //-- CUtil.recalcStyle(CPage.jqo_page); console.log("update2"); //-- back up previus position for( var i=0; i b.rec.vcnt) {return 1;} return 0; }; break; case "desc": func = function sort_desc(a,b) { if (a.rec.vcnt < b.rec.vcnt) {return 1;} if (a.rec.vcnt > b.rec.vcnt) {return -1;} return 0; }; break; case "random": CUtil.shuffleArray(optlist); break; } if ( func ) { optlist.sort(func); } }, configureOpt : function( data ) { var area_w = data.area_w; //-- set opt width var opt_w = CCfg.float(pollcfg.pagecfg.opt.size,"width",30,0); if ( this.optlist.length > 0 ) { for( var i=0; i area_w ) { for( var i=0; i area_w ) || (( 0 < max_col ) && ( max_col <= col ))) { size.w = Math.max(x,size.w); x = 0; size.h += h; h = 0; col = 0; } rec.x = x; rec.y = size.h; x += rec.w; h = Math.max(h,rec.h); col++; num_of_col = Math.max(num_of_col,col); } size.w = Math.max(x,size.w); size.h += h; }, alignOpt : function( data ) { var size = data.size; var area = data.area; var dx = (area.w-size.w)/2; var dy = (area.h-size.h)/2; if ( data.align ) { var a = data.align; if ( a.indexOf("left") != -1 ) { dx = 0; } else if ( a.indexOf("right") != -1 ) { dx = area.w-size.w; } if ( a.indexOf("top") != -1 ) { dy = 0; } else if ( a.indexOf("bottom") != -1 ) { dy = area.h-size.h; } } for( var i=0; i 0 ) { this.imgrecx[oid] = imgrecx[0]; var url = this.imgrecx[oid].url; urls.push(url); } } CPageRefCnt.lock(); CPagePreloader.loadImgs(urls,this,function(){ CPageRefCnt.unlock(); }); return true; } }; CPageCmp.register(COptBgImg); var COptAnim = { init : function() { CPageCMS.bind("page-resource:begin",this,this.setupHandlers); CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("page-abort,opt-abort",this,this.abort); }); }, registerHandler : function( key, func ) { this.handlers[key] = func; }, setupHandlers : function() { this.handlers = {}; this.registerHandler("none", function(key) { var jqo_aboxes = this.jqo_ctar.find(".apsmx-opt-abox"); for( var i=0; i0; i--) { var jqo_abox_i = jqo_aboxes.eq(i); var rec_i = jqo_abox_i.data("rec"); var j = Math.floor(Math.random() * (i+1)); var jqo_abox_j = jqo_aboxes.eq(j); var rec_j = jqo_abox_j.data("rec"); var temp = rec_i.delay; rec_i.delay = rec_j.delay; rec_j.delay = temp; } } break; case "bottom-up": case "bottom-up-c": for( var i=0; i 1 ) { str = $.trim(sx[Math.floor(Math.random()*sx.length)]); } sx = str.split(/\s+/); if ( sx.length != 3 ) { str = "none"; } else { key = $.trim(sx[0]); order = $.trim(sx[1]); //-- duration var d = $.trim(sx[2]); b_n = ( d.substr(0,1) == "n" ); if ( b_n ) { d = d.substr(1); } dura = parseFloat(d); } } //-- validate key if (!( key in this.handlers )) { key = "none"; } //-- validate order var order_list = [ "all-at-once", "top-down", "bottom-up", "random", "top-down-c", "bottom-up-c", "random-c" ]; if ( $.inArray(order,order_list) == -1 ) { order = order_list[0]; } //-- validate dura if ( key == "none" ) { dura = 0; } else { dura = ( isNaN(dura) ) ? 0 : dura; if ( b_n ) { var len = this.jqo_ctar.find(".apsmx-opt-abox"); dura = dura * len; } } //-- setup order if ( key != "none") { this.setupOrder(order,dura); } //-- complete callback function if ( this.oncomplete ) { CPageTimer.timeout(this,function(){ this.b_running = false; this.oncomplete.call(this.obj); },( dura ? dura*1000 : 1 )); } //-- triggers CPageCMS.trigger("opt-anim-begin"); CPageTimer.timeout(this,function(){ CPageCMS.trigger("opt-anim-end"); },dura*1000); //-- execute this.handlers[key].call(this,key); }, abort : function() { if ( this.b_running ) { this.jqo_ctar.find(".apsmx-opt-abox").stop(true); } } }; CPageCmp.register(COptAnim); var COptHtml = { self_type:"html", init : function() { CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("opt-setup",this,this.setup); }); }, getContent : function( px ) { var content = ""; if ( px.content ) { if ( px.content[0] == ">" ) { var key = px.content.substr(1); var rec = px.jqo.ctar.data("rec"); if ( rec[key] ) { content = rec[key]; } } else { content = px.content; } } return content; }, setup : function() { COpt.insertCmp({ type:this.self_type, caller:this, setup:function( px ) { var jqo_content = px.jqo.insert.find(".apsmx-content"); if ( jqo_content.length ) { var content = this.getContent(px); jqo_content.html(content); } } }); } }; CPageCmp.register(COptHtml); var CCmark = { self_type:"cmark", init : function() { CPageCMS.bind("page-bind",this,function(){ if ( !CFlag.isVotable() ) { return; } CPageCMS.bind("opt-setup",this,this.optSetup); CPageCMS.bind("opt-internal",this,this.optInternal); }); }, optSetup : function() { //-- preload image var url = CReso.img("cmark.png"); CPageRefCnt.lock(); CPagePreloader.loadImgs([url],this,function(){ CPageRefCnt.unlock(); }); COpt.insertCmp({ type:this.self_type, caller:this, setup:function( px ) { px.jqo.insert .find(".apsmx-cmark-imgbox") .css({ background:"url("+CUtil.sq(url)+")", "background-size":"100% 100%", }); if ( CFlag.sanim() && px["s-animation"] ) { px.jqo.insert.addClass( "apsmx-cmark-"+px["s-animation"]); } } }); }, optInternal : function() { COpt.jqo_ctar.find(".apsmx-cmark") .css({ cursor:"pointer" }) .click(function(e){ e.preventDefault(); e.stopPropagation(); var jqo_abox = $(this) .parents(".apsmx-opt-abox").eq(0); var rec = jqo_abox.data("rec"); CPageCMS.trigger("vcheck-click",{ loc:"cmark", oid:rec.oid, jqo:jqo_abox }); }) .keydown(function(e){ var cc = e.which; if (( cc == 13 ) || ( cc == 32 )) { e.preventDefault(); $(this).click(); } }); } }; CPageCmp.register(CCmark); var CVmark = { self_type:"vmark", init : function() { if ( !CFlag.showResults() ) { return; } CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("opt-setup",this,this.setupOpt); }); }, setupOpt : function() { //-- create list of voted options var jqo_aboxes = COpt.jqo_ctar.find(".apsmx-opt-abox"); var jqos = $("#apsmx-does-not-exist"); jqo_aboxes.each(function(){ if ( $(this).data("rec").vmark ) { jqos = jqos.add($(this)); } }); //-- vmark image var url = CReso.img("vmark.png"); CPageRefCnt.lock(); CPagePreloader.loadImgs([url],this,function(){ CPageRefCnt.unlock(); }); //-- insert COpt.insertCmp({ type:this.self_type, jqos:jqos, caller:this, setup:function( px ) { px.jqo.insert .find(".apsmx-vmark-imgbox") .css({ background:"url("+CUtil.sq(url)+")", "background-size":"100% 100%" }); }, sanim:function( px ) { if ( px["s-animation"] == "radiate" ) { this.setupRadiate(px); } else { CAnim.sanim("opt",px); } } }); //-- mark as "voted" jqos.addClass("apsmx-ovs-voted"); }, setupRadiate : function( px ) { this.radiation_delay = px["s-animation-delay"]; px["s-animation-delay"] = null; var jqo_circle = px.jqo.insert.find(".apsmx-vmark-circle"); //-- radiation-strength, delay, and duration var num_of_circle = CCfg.int(px, "s-animation-radiation-strength",1,1,100); var delay = CCfg.float(this,"radiation_delay",0); var dura = CCfg.float(px,"s-animation-duration",1); var gap = dura / num_of_circle; for( var i=1; i<=num_of_circle; i++ ) { var sec = (i-1)*gap+delay; jqo_circle = $("
") .attr("class","apsmx-vmark-circle") .addClass("apsmx-sa-opt-ready") .addClass("apsmx-sa-opt-radiate") .css("animation-delay",sec.toString()+"s") .insertAfter(jqo_circle); CAnim.applyParams("s",jqo_circle,px); } px["s-animation-delay"] = this.radiation_delay; } }; CPageCmp.register(CVmark); var CVpercent = { self_type:"vpercent", init : function() { if ( !CFlag.showResults() ) { return; } CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("opt-setup",this,this.setupOpt); }); }, setupOpt : function() { COpt.insertCmp({ type:this.self_type, caller:this, setup:function( px ) { var rec = px.jqo.ctar.data("rec"); var jqo_msg = px.jqo.insert.find(".apsmx-vpercent-msg"); var vpercent = rec.vper; var decimal = ( px.decimal ) ? px.decimal : 0; vpercent = vpercent.toFixed(decimal); var content = px.content.replace(/%vpercent%/g,vpercent); jqo_msg.html(content); } }); } }; CPageCmp.register(CVpercent); var CVcount = { self_type:"vcount", init : function() { if ( !CFlag.showResults() ) { return; } CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("opt-setup",this,this.setup); }); }, setup : function() { COpt.insertCmp({ type:this.self_type, caller:this, setup:function( px ) { var rec = px.jqo.ctar.data("rec"); var jqo_msg = px.jqo.insert.find(".apsmx-vcount-msg"); var content = px.content.replace(/%vcount%/g,rec.vcnt); jqo_msg.html(content); } }); } }; CPageCmp.register(CVcount); var CBgraph = { self_type:"bgraph", init : function() { if ( !CFlag.showResults() ) { return; } CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("opt-setup",this,this.setup); }); }, setup : function() { COpt.insertCmp({ type:this.self_type, caller:this, setup:function( px ) { var rec = px.jqo.ctar.data("rec"); var jqo_bg = px.jqo.insert.find(".apsmx-bgraph-bg"); var jqo_box = jqo_bg.find(".apsmx-bgraph-box"); if (jqo_box.length) { var vper; var b_relative = CCfg.yn(px,"relative"); if ( b_relative ) { var vhighest = COpt.vhighest; vper = vhighest ? rec.vcnt*100/vhighest : 0; } else { vper = rec.vper; } if ( vper > 0 ) { jqo_box.css({width:vper+"%"}); if (!( CFlag.sanim() && CAnim.enabled(px,"s-animation") && CUtil.canCssAnim() )) { jqo_bg.find(".apsmx-bgraph-inner") .css({width:"100%"}); } } else { jqo_box .css({ visibility:"hidden", width:0 }) } } }, sanim:function( px ) { var cls = []; switch( px["s-animation"] ) { case "stretchbar": cls = [".apsmx-bgraph-inner"]; break; case "bouncebar": cls = [".apsmx-bgraph-inner", ".apsmx-bgraph-box"]; break; case "flashbar": cls = [".apsmx-bgraph-inner", ".apsmx-bgraph-bg"]; break; } for( var i=0; i>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CDropOpt = { init : function() { CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("opt-setup",this,this.setup); }); }, setup : function() { this.total = COpt.len(); this.start(); }, start : function() { var _this = this; CPageCMS.bind("square-click",this,function(data){ this.remove(data); }); }, remove : function( data ) { var _this = this; CPageCMS.trigger("opt-removed",data); data.jqo.fadeOut(300,function(){ $(this).remove(); _this.doRemove(); }); }, doRemove : function() { CPageCMS.trigger("opt-update",{ no_height_adjust:1, align:"top" }); if ( COpt.len() == 0 ) { this.rebuild(); this.setup(); } }, rebuild : function() { CPageCMS.trigger("opt-abort"); CPageCMS.trigger("opt-rebuild"); } }; CPageCmp.register(CDropOpt); /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CGoResults = { init : function() { CPageCMS.bind("page-resource",this,function(){ var rec = { obj:this, init:this.init_toolbtn, click:this.click }; CToolBtn.register("goresults",rec); CPageCMS.bind("goresults",this,function(){ this.run(); }); }); }, init_toolbtn : function( cfg ) { return ( CCfg.text(pollcfg.pagecfg,"ptype") != "r" ) && CFlag.isNavigable(); }, click : function( cfg ) { CPageCMS.trigger("goresults"); }, run : function() { CPageCMS.trigger("pause"); var requ = { cmd:"goresults" }; CPollCMS.trigger("wloader-open"); CPoll.callServer( requ, this, function(resp){ CPoll.run( resp ); }); } }; CPageCmp.register(CGoResults); /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CGoVoting = { init : function() { CPageCMS.bind("page-resource",this,function(){ var rec = { obj:this, init:this.init_toolbtn, click:this.click }; CToolBtn.register("govoting",rec); CPageCMS.bind("govoting",this,function(){ this.goVoting(); }); }); }, init_toolbtn : function( cfg ) { return ( CCfg.text(pollcfg.pagecfg,"ptype") != "v" ) && CFlag.isNavigable(); }, click : function( cfg ) { CPageCMS.trigger("govoting"); }, goVoting : function() { CPageCMS.trigger("pause"); var requ = { cmd:"govoting" }; CPollCMS.trigger("wloader-open"); CPoll.callServer( requ, this, function(resp){ CPoll.run( resp ); }); } }; CPageCmp.register(CGoVoting); /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CLink = { init : function() { CPageCMS.bind("page-resource",this,function(){ var rec = { obj:this, click_event:this.click_event, ready:this.ready, click:this.click }; CToolBtn.register("link",rec); }); }, click_event : function( px, e ) { //-- do nothing }, ready : function( px ) { if ( px.href ) { px.jqo.insert.attr("href",px.href); } if ( px.target ) { px.jqo.insert.attr("target",px.target); } }, click : function( px ) { //-- do nothing } }; CPageCmp.register(CLink); /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var COptReAnim = { init : function() { CPageCMS.bind("page-resource",this,function(){ var rec = { obj:this, click:this.click }; CToolBtn.register("optreanim",rec); }); }, click : function() { pollcfg.pagecfg.opt["e-animation"] = "fadein top-down 2,"+ "zoom-out random 2,"+ "sway top-down 3,"+ "rotate-x all-at-once 1,"+ "rotate-y top-down 2.5,"+ "rotate-z random-c 2,"+ "bounce-x all-at-once 2.5,"+ "bounce-y top-down 4,"+ "bounce-z all-at-once 2.5,"+ "scroll-up top-down-c 2,"+ "scroll-down bottom-up-c 2,"+ "scroll-left top-down 2,"+ "scroll-right bottom-up 2,"+ "spread all-at-once 1.5"; CPageCMS.trigger("opt-abort"); CPageCMS.trigger("opt-rebuild"); } }; CPageCmp.register(COptReAnim); /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CScript = { init : function() { CPageCMS.bind("page-resource",this,function(){ var rec = { obj:this, click:this.click }; CToolBtn.register("script",rec); }); }, click : function( px ) { if ( px.code ) { eval(px.code); } } }; CPageCmp.register(CScript); /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CCircle = this.CCircle = { self_type:"circle", init : function() { CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("opt-setup",this,function(){ this.setup(); }); }); }, setup : function() { COpt.insertCmp({ type:this.self_type, html:[this.self_type,"shape"], caller:this, setup:function( px ) { if ( px.content ) { var jqo_content = px.jqo.insert.find(".apsmx-content"); if ( jqo_content.length ) { jqo_content.html(px.content); } } } }); } }; CPageCmp.register(CCircle); /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CSquare = this.CSquare = { self_type:"square", init : function() { CPageCMS.bind("page-bind",this,function(){ CPageCMS.bind("opt-setup",this,this.setup); }); }, setup : function() { COpt.insertCmp({ type:this.self_type, html:[this.self_type,"shape"], caller:this, setup:function( px ) { if ( px.content ) { var jqo_content = px.jqo.insert.find(".apsmx-content"); if ( jqo_content.length ) { jqo_content.html(px.content); } } px.jqo.insert .click(function(e){ e.preventDefault(); e.stopPropagation(); CPageCMS.trigger("tooltip-close-all"); var jqo_abox = $(this).parents(".apsmx-opt-abox"); var rec = jqo_abox.data("rec"); var data = { oid:rec.oid, jqo:jqo_abox }; CPageCMS.trigger("square-click",data); }); }, complete:function( px ) { px.jqo.insert .css({ cursor:"pointer" }); } }); } }; CPageCmp.register(CSquare); /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CSpace = { init : function() { CPageCMS.bind("page-resource",this,function(){ var rec = { obj:this, setup:this.setup }; CToolBtn.register("space",rec); }); }, setup : function( px ) { var w = px.width ? px.width : 0; px.jqo.insert .html("") .css({ visibility:"hidden", cursor:"default", "padding":0, "margin":0, "min-width":0, "max-width":"none", width:w+"px" }); } }; CPageCmp.register(CSpace); /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Script v4.12 // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APSMX-412 // URL : http://www.phpkobo.com/ajax_poll.php // // This software is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the // License. // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CTest = { init : function() { CPageCMS.bind("page-bind",this,function(){ var rec = { obj:this, show:this.show, click:this.click }; CToolBtn.register("test",rec); }); }, show : function( px ) { px.jqo.insert.addClass("apsmx-test-blink"); }, click : function() { CPageCMS.trigger("pause"); var requ = { cmd:"test", wid:pollcfg.wid, pid:pollcfg.pid, tid:pollcfg.tid, ext:pollcfg.ext }; CPollCMS.trigger("wloader-open"); CPoll.callServer( requ, this, function(resp){ CPollCMS.trigger("wloader-close"); CPollCMS.trigger("alert-open",{key:resp.alert}); }); } }; CPageCmp.register(CTest); var imports = {CUtil:CUtil, CCfg:CCfg, CCmp:CCmp, CCMS:CCMS, CRefCnt:CRefCnt, CTimer:CTimer, CPreloader:CPreloader, CWinBind:CWinBind, CBgSetter:CBgSetter, CImg:CImg, CGate:CGate, CIRList:CIRList, CAnim:CAnim, CApp:CApp, CHost:CHost, CHostTool:CHostTool, CPoll:CPoll, CCfgLoader:CCfgLoader, CFlag:CFlag, CAlert:CAlert, CWloader:CWloader, CReso:CReso, CExtFunc:CExtFunc, CPollInfo:CPollInfo, CResetBtn:CResetBtn, CPage:CPage, CADRes:CADRes, CPosy:CPosy, CSlimCol:CSlimCol, CHtml:CHtml, CVote:CVote, CTooltip:CTooltip, CToolBtn:CToolBtn, CBgColor:CBgColor, CBgImg:CBgImg, CSelCnt:CSelCnt, CStatus:CStatus, CVtotal:CVtotal, CVoteBtn:CVoteBtn, COpt:COpt, COptBgColor:COptBgColor, COptBgImg:COptBgImg, COptAnim:COptAnim, COptHtml:COptHtml, CCmark:CCmark, CVmark:CVmark, CVpercent:CVpercent, CVcount:CVcount, CBgraph:CBgraph, CVoteBtn:CVoteBtn, CAppCmp:CAppCmp, CAppCMS:CAppCMS, CHostCmp:CHostCmp, CHostCMS:CHostCMS, CPollCmp:CPollCmp, CPollCMS:CPollCMS, CPageCmp:CPageCmp, CPageCMS:CPageCMS, CPageRefCnt:CPageRefCnt, CPageTimer:CPageTimer, CPagePreloader:CPagePreloader, CPageWinBind:CPageWinBind, COptRefCnt:COptRefCnt}; CExtFunc.setup(this,imports); }; }; }; $(document).ready(function(){ CApp.run(); }); };