// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
// "DEMO". // ? // : // 1. , , , // ( ), , ( ) , // . - , , ? // 2. , ( javascript' - window) // , , , // , , . // , , , . // , // . if ( typeof DEMO == "undefined" || !DEMO) { var DEMO = {}; } // Lang - , . // , - , , // , . // // , , Lang DEMO, , // , , , // , (, ), // , - // DEMO.Lang , , . DEMO.Lang = typeof DEMO.Lang != 'undefined' && DEMO.Lang ? DEMO.Lang : { isUndefined : function (o) { return typeof o === 'undefined' ; }, isString : function (o) { return typeof o === 'string' ; } }; // DOM - , DOM. - // , get . DEMO.DOM = typeof DEMO.DOM != 'undefined' && DEMO.DOM ? DEMO.DOM : { get : function (el) { return (el && el.nodeType) ? el : document .getElementById(el); }, addListener : function (el, type, fn) { // el dom-, , dom- id, if (DEMO.Lang.isString(el)) { el = this .get(el); } // // feature-testing. // , : www.unix.com.ua/orelly/webprog/jscript/ch20_01.htm // : fastcoder.org/articles/?aid=17 if (el.addEventListener) { el.addEventListener(type, fn, false ); } else if (el.attachEvent) { el.attachEvent( 'on' + type, fn); } else { el[ 'on' + type] = fn; } }, removeListener : function (el, type, fn) { if (DEMO.Lang.isString(el)) { el = this .get(el); } if (el.removeEventListener){ el.removeEventListener(type, fn, false ); } else if (el.detachEvent) { el.detachEvent( 'on' + type, fn); } else { el[ 'on' + type] = function () { return true ; }; } } }; * This source code was highlighted with Source Code Highlighter .
* This source code was highlighted with Source Code Highlighter .
- if ( typeof DEMO == "undefined" ||! DEMO) {
- var DEMO = {};
- }
- // Pay attention - the object is built on the so-called "modular" pattern proposed by YAHOO!
- // read more: ajaxian.com/archives/a-javascript-module-pattern
- DEMO.Dialog = typeof DEMO.Dialog! = ' Undefined ' && DEMO.Dialog? DEMO.Dialog: function () {
- // "private" properties
- // create a dialog container and remember it.
- var dialog = document .createElement ( 'div' );
- dialog.className = 'dialog' ;
- document .body.appendChild (dialog);
- // Main function. The input can come as a string (in this case, it becomes the text of the window)
- // same way with properties:
- // body {String} - window text
- // buttons {Array} is an array of buttons, with each button being an object of the form:
- // id: {String} - button id
- // text: {String} - button text
- // callback: {Function | Object} is either a function (in this case it will be hung by clicking on the button), or an object of the form:
- // fn: {Function} directly function
- // type: {String} type of the event to which the function will be attached.
- var render = function (o) {
- var html, i, length = ( typeof o.buttons === 'undefined' )? 0: o.buttons.length,
- button;
- // dialog box text
- if ( typeof o === 'string' ) {
- html = '<p>' + o + '</ p>' ;
- } else {
- html = '<p>' + ((o.body)? o.body: o) + '</ p>' ;
- }
- for (i = 0; i <length; i ++) {
- button = o.buttons [i];
- html + = '<a href="#" id="' + button.id +'">' + button.text + '</a>' ;
- }
- // we don’t need to worry about memory leaks, Douglas Crockford worried about us
- DEMO.DOM.setInnerHTML (dialog, html);
- activateListeners (o.buttons);
- };
- // hang event handlers on the buttons. If there are no buttons, we do nothing.
- var activateListeners = function (buttons) {
- var i, length, button, isUndefined = DEMO.Lang.isUndefined;
- if (DEMO.Lang.isUndefined (buttons)) { return ; }
- length = buttons.length;
- for (i = 0; i <length; i ++) {
- button = buttons [i];
- if (! isUndefined (button.callback.type) &&! isUndefined (button.callback.fn)) {
- DEMO.DOM.addListener (button.id, button.callback.type, button.callback.fn);
- } else {
- DEMO.DOM.addListener (button.id, 'click' , button.callback);
- }
- }
- cached_buttons = buttons;
- };
- return {
- // public function
- // show dialog dialog
- show: function (o) {
- render (o);
- },
- // hide the dialog box
- hide: function () {
- dialog.style.display = 'none' ;
- }
- };
- } ();
* This source code was highlighted with Source Code Highlighter .
- DEMO.Dialog.show ({
- body: 'Would you like some coffee?' ,
- buttons: [
- {
- id: 'cancel' ,
- text: 'Not' ,
- callback: function () {DEMO.Dialog.hide (); }
- },
- {
- id: accept ,
- text: 'Yes!' ,
- callback: function () {
- DEMO.Dialog.hide ();
- document .body.appendChild ( document .createTextNode ( 'Me too :)' ));
- }
- }
- ]
- });
* This source code was highlighted with Source Code Highlighter .
- DEMO.Dialog.show ({
- body: "Um ... um ... your coffee ran away!" ,
- buttons: [
- {
- id: accept ,
- text: 'Where? o_O ' ,
- callback: function () {DEMO.Dialog.hide (); }
- }
- ]
- });
Source: https://habr.com/ru/post/45968/
All Articles