/***************** Forca/Client/SAK.js BEGIN *****************/ var _thises = new Array(); var _this; var _event; var Debug = { i: function() {return { write: function (){}, writeln: function (){}, writelnXML: function (){} }; } }; var LoadingIndicator = { i: function() {return { on: function(){}, off: function(){} }; } }; var AdminHttp = { i: function() { return { goto: function(url) { window.location = url; }, submitForm: function() { document.getElementById('form1').submit(); } }; } }; var IE = navigator.userAgent.match(/IE/); function include(file) { aj.open('GET', file+'?'+(new Date).getTime(), false); aj.send(null); eval(aj.responseText); } var NAMESPACE = ''; function _import(className) { if (NAMESPACE.length) include('/'+NAMESPACE+'/Client/'+className+'.js'); else include('/Forca/Client/'+className+'.js') } function hasProperties(object) { for (var i in object) { return true; } return false; } Date.prototype.getDaysInMonth = function(month,year) { if (typeof month == 'undefined') month = this.getMonth(); switch (month) { case 0: case 2: case 4: case 6: case 7: case 9: case 11: return 31; case 1: return (((typeof year==Number)?year: this.getFullYear())%4)?28:29; default: return 30; } }; String.prototype._replace = function(regexp,replacement) { var result = this; while (result.search(regexp)>=0) result=result.replace(regexp,replacement); return result; }; function $(id) { return document.getElementById(id); } function _(element) { return document.createElement(element); } /***************** Forca/Client/SAK.js END *****************/ /***************** Forca/Client/class.js BEGIN *****************/ // John Resig's (Mozilla javascript developer) hybrid variation of Base + Prototype version of inheritance technique // with little add-on for event handling methods convenience by jaborandi (function(){ var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; // The base Class implementation (does nothing) this.Class = function(){}; // singleton, added by jaborandi Class.i = function() { if (typeof this.__singleton == 'undefined') this.__singleton = new this.__class({}); return this.__singleton; }; // Create a new Class that inherits from this class Class.extend = function(prop) { var _super = this.prototype; // Instantiate a base class (but only create the instance, // don't run the init constructor) initializing = true; var prototype = new this(); initializing = false; // Copy the properties over onto the new prototype for (var name in prop) { // Check if we're overwriting an existing function prototype[name] = typeof prop[name] == "function" && typeof _super[name] == "function" && fnTest.test(prop[name]) ? (function(name, fn){ return function() { var tmp = this._super; // Add a new ._super() method that is the same method // but on the super-class this._super = _super[name]; // The method only need to be bound temporarily, so we // remove it when we're done executing var ret = fn.apply(this, arguments); this._super = tmp; return ret; }; })(name, prop[name]) : prop[name]; } // The dummy class constructor function Class() { // // All construction is actually done in the init method if ( !initializing && this.init ) { for (var i in this) if(this[i] && (typeof(this[i])=='function') && (!i.match(/^_/)) && (typeof(this['_'+i])!='function')) { this['_'+i] = this[i]; this[i] = new Function("/* "+i+"*/ if (typeof event != 'undefined') _event = event; if (_this) _thises.push(_this); _this = arguments.callee.__this; var ret = arguments.callee._actual.apply(this,arguments); if (_thises.length) _this = _thises.pop(); return ret;"); this[i]._actual = this['_'+i]; this[i].__this = this; } this.init.apply(this, arguments); } } // self-reference for anonymouse instantiation (for singleton), jaborandi Class.__class = Class; // Populate our constructed prototype object Class.prototype = prototype; // Enforce the constructor to be what we expect Class.constructor = Class; // And make this class extendable Class.extend = arguments.callee; Class.i = this.i; return Class; }; })(); /***************** Forca/Client/class.js END *****************/ /***************** Forca/Client/Class.js BEGIN *****************/ // John Resig's (Mozilla javascript developer) hybrid variation of Base + Prototype version of inheritance technique // with little add-on for event handling methods convenience by jaborandi (function(){ var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; // The base Class implementation (does nothing) this.Class = function(){}; // singleton, added by jaborandi Class.i = function() { if (typeof this.__singleton == 'undefined') this.__singleton = new this.__class({}); return this.__singleton; }; // Create a new Class that inherits from this class Class.extend = function(prop) { var _super = this.prototype; // Instantiate a base class (but only create the instance, // don't run the init constructor) initializing = true; var prototype = new this(); initializing = false; // Copy the properties over onto the new prototype for (var name in prop) { // Check if we're overwriting an existing function prototype[name] = typeof prop[name] == "function" && typeof _super[name] == "function" && fnTest.test(prop[name]) ? (function(name, fn){ return function() { var tmp = this._super; // Add a new ._super() method that is the same method // but on the super-class this._super = _super[name]; // The method only need to be bound temporarily, so we // remove it when we're done executing var ret = fn.apply(this, arguments); this._super = tmp; return ret; }; })(name, prop[name]) : prop[name]; } // The dummy class constructor function Class() { // // All construction is actually done in the init method if ( !initializing && this.init ) { for (var i in this) if(this[i] && (typeof(this[i])=='function') && (!i.match(/^_/)) && (typeof(this['_'+i])!='function')) { this['_'+i] = this[i]; this[i] = new Function("/* "+i+"*/ if (typeof event != 'undefined') _event = event; if (_this) _thises.push(_this); _this = arguments.callee.__this; var ret = arguments.callee._actual.apply(this,arguments); if (_thises.length) _this = _thises.pop(); return ret;"); this[i]._actual = this['_'+i]; this[i].__this = this; } this.init.apply(this, arguments); } } // self-reference for anonymouse instantiation (for singleton), jaborandi Class.__class = Class; // Populate our constructed prototype object Class.prototype = prototype; // Enforce the constructor to be what we expect Class.constructor = Class; // And make this class extendable Class.extend = arguments.callee; Class.i = this.i; return Class; }; })(); /***************** Forca/Client/Class.js END *****************/ /***************** Forca/Client/Lightbox.js BEGIN *****************/ LightBox = Class.extend ({ init: function(ini) { for (var i in ini) this[i] = ini[i]; this.img = new Image; this.img.onload = this.imageLoaded; this.img.src = ini.src; }, imageLoaded: function() { dY = (navigator.userAgent.match(/MSIE 6\.0/))? document.documentElement.scrollTop:0; document.body.appendChild(this); var oHeight = this.height; var oWidth = this.width if (this.offsetHeight + 50 > document.documentElement.clientHeight) { this.height = document.documentElement.clientHeight - 50; this.width = Math.floor(oWidth * this.height/oHeight); } document.body.removeChild(this); _this.div = document.createElement('DIV'); var width = this.width; _this.div.style.width = width + 'px'; var height = this.height; _this.div.style.height = height + 'px'; _this.div.appendChild(this); _this.div.className = 'light-box-image'; _this.div.style.left = (document.body.clientWidth - width)/2 + 'px'; _this.div.style.top = (document.documentElement.clientHeight - height)/2 + dY + 'px'; if (navigator.userAgent.match(/MSIE 6\.0/)) { _this.fictive = document.createElement('DIV'); document.body.appendChild(_this.fictive); } _this.shade = document.createElement('DIV'); document.body.appendChild(_this.shade); _this.shade.className = 'light-box-shade'; _this.shade.style.width = document.documentElement.clientWidth; _this.shade.style.height = document.body.clientHeight; document.body.appendChild(_this.div); if (_this.title) { _this.titleDiv = document.createElement('DIV'); _this.titleDiv.className = 'light-box-title'; _this.titleDiv.innerHTML = _this.title; document.body.appendChild(_this.titleDiv); _this.titleDiv.style.left = _this.div.offsetLeft + 'px'; _this.titleDiv.style.top = _this.div.offsetTop - _this.titleDiv.offsetHeight + 'px'; _this.titleDiv.style.width = this.width + 'px'; } _this.closeButton = document.createElement('DIV'); _this.closeButton.innerHTML = 'X'; _this.closeButton.className = 'light-box-close-button'; document.body.appendChild(_this.closeButton); _this.closeButton.style.left = _this.div.offsetLeft + _this.div.offsetWidth - _this.closeButton.offsetWidth + 'px'; _this.closeButton.style.top = _this.div.offsetTop - _this.closeButton.offsetHeight + 'px'; _this.closeButton.onmouseup = _this.close; _this.left = document.createElement('DIV'); _this.left.className = 'light-box-arrow'; _this.left.innerHTML = '<'; _this.left.onmousedown = _this.switchToPrevious; _this.right = document.createElement('DIV'); _this.right.className = 'light-box-arrow'; _this.right.innerHTML = '>'; _this.right.onmousedown = _this.switchToNext; _this.left.style.left = _this.left.style.right = _this.right.style.left = _this.right.style.right = 0; if (_this.previous) document.body.appendChild(_this.left); if (_this.next) document.body.appendChild(_this.right); _this.left.style.left = (_this.div.offsetLeft - _this.left.offsetWidth) + 'px'; _this.right.style.left = (_this.div.offsetLeft + _this.div.offsetWidth) + 'px'; _this.left.style.top = _this.right.style.top = (document.documentElement.clientHeight - _this.left.offsetHeight)/2 + dY + 'px'; }, switchToPrevious: function() { $(_this.previous).onclick(); _this.close(); }, switchToNext: function() { $(_this.next).onclick(); _this.close(); }, close: function() { var els = { 0: _this.div, 1: _this.shade, 2: _this.left, 3: _this.right, 4: _this.closeButton, 5: _this.titleDiv }; for (var i in els) if (els[i].parentNode) els[i].parentNode.removeChild(els[i]); delete _this; } }); /***************** Forca/Client/Lightbox.js END *****************/