/*
Licencováno pod MIT Licencí

© 2008 Seznam.cz, a.s.

Tímto se uděluje bezúplatná nevýhradní licence k oprávnění užívat Software,
časově i místně neomezená, v souladu s příslušnými ustanoveními autorského zákona.

Nabyvatel/uživatel, který obdržel kopii tohoto softwaru a další přidružené 
soubory (dále jen „software“) je oprávněn k nakládání se softwarem bez 
jakýchkoli omezení, včetně bez omezení práva software užívat, pořizovat si 
z něj kopie, měnit, sloučit, šířit, poskytovat zcela nebo zčásti třetí osobě 
(podlicence) či prodávat jeho kopie, za následujících podmínek:

- výše uvedené licenční ujednání musí být uvedeno na všech kopiích nebo 
podstatných součástech Softwaru.

- software je poskytován tak jak stojí a leží, tzn. autor neodpovídá 
za jeho vady, jakož i možné následky, ledaže věc nemá vlastnost, o níž autor 
prohlásí, že ji má, nebo kterou si nabyvatel/uživatel výslovně vymínil.



Licenced under the MIT License

Copyright (c) 2008 Seznam.cz, a.s.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/{if(typeof SZN!="object"){var SZN={"NAME":"SZN"};};SZN.bind=function(obj,fnc){return function(){return fnc.apply(obj,arguments);};};SZN.idGenerator=function(){this.idCnt=this.idCnt<10000000?this.idCnt:0;var ids="m"+new Date().getTime().toString(16)+"m"+this.idCnt.toString(16);this.idCnt++;return ids;};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(item,from){var len=this.length;var i=from||0;if(i<0){i+=len;}for(;i<len;i++){if(i in this&&this[i]===item){return i;}}return -1;};}if(!Array.indexOf){Array.indexOf=function(obj,item,from){return Array.prototype.indexOf.call(obj,item,from);};}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(item,from){var len=this.length;var i=from||len-1;if(i<0){i+=len;}for(;i>-1;i--){if(i in this&&this[i]===item){return i;}}return -1;};}if(!Array.lastIndexOf){Array.lastIndexOf=function(obj,item,from){return Array.prototype.lastIndexOf.call(obj,item,from);};}if(!Array.prototype.forEach){Array.prototype.forEach=function(cb,_this){var len=this.length;for(var i=0;i<len;i++){if(i in this){cb.call(_this,this[i],i,this);}}};}if(!Array.forEach){Array.forEach=function(obj,cb,_this){Array.prototype.forEach.call(obj,cb,_this);};}if(!Array.prototype.every){Array.prototype.every=function(cb,_this){var len=this.length;for(var i=0;i<len;i++){if(i in this&&!cb.call(_this,this[i],i,this)){return false;}}return true;};}if(!Array.every){Array.every=function(obj,cb,_this){return Array.prototype.every.call(obj,cb,_this);};}if(!Array.prototype.some){Array.prototype.some=function(cb,_this){var len=this.length;for(var i=0;i<len;i++){if(i in this&&cb.call(_this,this[i],i,this)){return true;}}return false;};}if(!Array.some){Array.some=function(obj,cb,_this){return Array.prototype.some.call(obj,cb,_this);};}if(!Array.prototype.map){Array.prototype.map=function(cb,_this){var len=this.length;var res=new Array(len);for(var i=0;i<len;i++){if(i in this){res[i]=cb.call(_this,this[i],i,this);}}return res;};}if(!Array.map){Array.map=function(obj,cb,_this){return Array.prototype.map.call(obj,cb,_this);};}if(!Array.prototype.filter){Array.prototype.filter=function(cb,_this){var len=this.length;var res=[];for(var i=0;i<len;i++){if(i in this){var val=this[i];if(cb.call(_this,val,i,this)){res.push(val);}}}return res;};}if(!Array.filter){Array.filter=function(obj,cb,_this){return Array.prototype.filter.call(obj,cb,_this);};}String.prototype.lpad=function(char,count){var ch=char||"0";var cnt=count||2;var s="";while(s.length<(cnt-this.length)){s+=ch;}s=s.substring(0,cnt-this.length);return s+this;};String.prototype.rpad=function(char,count){var ch=char||"0";var cnt=count||2;var s="";while(s.length<(cnt-this.length)){s+=ch;}s=s.substring(0,cnt-this.length);return this+s;};String.prototype.trim=function(){return this.match(/^\s*([\s\S]*?)\s*$/)[1];};Date.prototype._dayNames=["Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle"];Date.prototype._dayNamesShort=["Po","Út","St","Čt","Pá","So","Ne"];Date.prototype._monthNames=["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"];Date.prototype._monthNamesShort=["Led","Úno","Bře","Dub","Kvě","Čer","Črc","Srp","Zář","Říj","Lis","Pro"];Date.prototype.format=function(str){var suffixes={"1":"st","2":"nd","3":"rd","21":"st","22":"nd","23":"rd","31":"st"};var result="";var escape=false;for(var i=0;i<str.length;i++){var ch=str.charAt(i);if(escape){escape=false;result+=ch;continue;}switch(ch){case "\\":if(escape){escape=false;result+=ch;}else{escape=true;}break;case "d":result+=this.getDate().toString().lpad();break;case "j":result+=this.getDate();break;case "w":result+=this.getDay();break;case "N":result+=this.getDay()||7;break;case "S":var d=this.getDate();result+=suffixes[d]||"th";break;case "D":result+=this._dayNamesShort[(this.getDay()||7)-1];break;case "l":result+=this._dayNames[(this.getDay()||7)-1];break;case "z":var t=this.getTime();var d=new Date(t);d.setDate(1);d.setMonth(0);var diff=t-d.getTime();result+=diff/(1000*60*60*24);break;case "W":var d=new Date(this.getFullYear(),this.getMonth(),this.getDate());var day=d.getDay()||7;d.setDate(d.getDate()+(4-day));var year=d.getFullYear();var day=Math.floor((d.getTime()-new Date(year,0,1,-6))/(1000*60*60*24));result+=(1+Math.floor(day/7)).toString().lpad();break;case "m":result+=(this.getMonth()+1).toString().lpad();break;case "n":result+=(this.getMonth()+1);break;case "M":result+=this._monthNamesShort[this.getMonth()];break;case "F":result+=this._monthNames[this.getMonth()];break;case "t":var t=this.getTime();var m=this.getMonth();var d=new Date(t);var day=0;do{day=d.getDate();t+=1000*60*60*24;d=new Date(t);}while(m==d.getMonth());;result+=day;break;case "L":var d=new Date(this.getTime());d.setDate(1);d.setMonth(1);d.setDate(29);result+=(d.getMonth()==1?"1":"0");break;case "Y":result+=this.getFullYear().toString().lpad();break;case "y":result+=this.getFullYear().toString().lpad().substring(2);break;case "a":result+=(this.getHours()<12?"am":"pm");break;case "A":result+=(this.getHours()<12?"AM":"PM");break;case "G":result+=this.getHours();break;case "H":result+=this.getHours().toString().lpad();break;case "g":result+=this.getHours()%12;break;case "h":result+=(this.getHours()%12).toString().lpad();break;case "i":result+=this.getMinutes().toString().lpad();break;case "s":result+=this.getSeconds().toString().lpad();break;case "Z":result+=-60*this.getTimezoneOffset();break;case "O":case "P":var base=this.getTimezoneOffset()/-60;var o=Math.abs(base).toString().lpad();if(ch=="P"){o+=":";}o+="00";result+=(base>=0?"+":"-")+o;break;case "U":result+=this.getTime()/1000;break;case "u":result+="0";break;case "c":result+=arguments.callee.call(this,"Y-m-d")+"T"+arguments.callee.call(this,"H:i:sP");break;case "r":result+=arguments.callee.call(this,"D, j M Y H:i:s O");break;default:result+=ch;break;}}return result;};if(!window.console){window.console={"log":function(){}};}SZN.ClassMaker={};SZN.ClassMaker.VERSION="4.1";SZN.ClassMaker.NAME="ClassMaker";SZN.ClassMaker.CLASS="static";SZN.ClassMaker.copyObj=null;SZN.ClassMaker.makeClass=function(params){if(!params.NAME){throw new Error("No NAME passed to SZN.ClassMaker.makeClass()");}if(!this.copyObj&&SZN.ObjCopy){this.copyObj=new SZN.ObjCopy();}var version=params.VERSION||"1.0";var extend=params.EXTEND||false;var implement=params.IMPLEMENT||[];var depend=params.DEPEND||[];var type=params.CLASS;if(!(implement instanceof Array)){implement=[implement];}var result=false;if(result=this._testDepend(depend)){throw new Error("Dependency error in class "+params.NAME+" ("+result+")");}if(type=="static"){var obj={};obj.VERSION=version;obj.NAME=params.NAME;obj.CLASS="static";return obj;}var constructor=function(){var inicializator=false;if("$constructor" in arguments.callee.prototype){inicializator=arguments.callee.prototype.$constructor;}else{if(params.NAME in arguments.callee.prototype){inicializator=arguments.callee.prototype[params.NAME];}}if(inicializator){inicializator.apply(this,arguments);}};constructor.NAME=params.NAME;constructor.VERSION=version;constructor.EXTEND=extend;constructor.IMPLEMENT=implement;constructor.DEPEND=depend;constructor.CLASS=type;constructor.destroy=this._destroy;this._setInheritance(constructor);constructor.prototype.sConstructor=constructor;constructor.prototype.callSuper=this._callSuper;constructor.prototype.$super=this._$super;constructor.prototype.constructor=constructor;return constructor;};SZN.ClassMaker._destroy=function(obj){for(var p in obj){obj[p]=null;};};SZN.ClassMaker._setInheritance=function(constructor){if(constructor.EXTEND){this._makeInheritance(constructor,constructor.EXTEND);}for(var i=0;i<constructor.IMPLEMENT.length;i++){this._makeInheritance(constructor,constructor.IMPLEMENT[i],true);}};SZN.ClassMaker._makeInheritance=function(constructor,parent,noSuper){for(var p in parent.prototype){var item=parent.prototype[p];if(typeof (item)!="function"){continue;}if(!item.owner){item.owner=parent;}}if(!noSuper){var tmp=function(){};tmp.prototype=parent.prototype;constructor.prototype=new tmp();if(this.copyObj!=null){for(var i in parent.prototype){if(typeof parent.prototype[i]=="object"){constructor.prototype[i]=this.copyObj.copy(parent.prototype[i]);}}}return;}for(var p in parent.prototype){if(typeof parent.prototype[p]=="object"){if(this.copyObj!=null){constructor.prototype[p]=this.copyObj.copy(parent.prototype[p]);}}else{if(noSuper&&((p=="$constructor")||(p=="$destructor"))){continue;}constructor.prototype[p]=parent.prototype[p];}}};SZN.ClassMaker._testDepend=function(depend){var out=true;for(var i=0;i<depend.length;i++){var item=depend[i];if(!item.sClass){return "Unsatisfied dependency";}if(!item.ver){return "Version not specified in dependency";}var depMajor=item.sClass.VERSION.split(".")[0];var claMajor=item.ver.split(".")[0];if(depMajor!=claMajor){return "Version conflict in "+item.sClass.NAME;}}return false;};SZN.ClassMaker._callSuper=function(methodName,callingFunction){var owner=callingFunction.owner||this.constructor;var sup=owner.EXTEND;if(!sup){throw new Error("\"No super-class available\"");}var method=sup.prototype[methodName];if(!method||(typeof method!="function")){throw new Error("Super-class doesn't have method '"+methodName+"'");}var mySelf=this;return function(){return method.apply(mySelf,arguments);};};SZN.ClassMaker._$super=function(){var caller=arguments.callee.caller;if(!caller){throw new Error("Function.prototype.caller not supported");}var owner=caller.owner||this.constructor;var callerName=false;for(var name in owner.prototype){if(owner.prototype[name]==caller){callerName=name;}}if(!callerName){throw new Error("Cannot find supplied method in constructor");}var parent=owner.EXTEND;if(!parent){throw new Error("No super-class available");}if(!parent.prototype[callerName]){throw new Error("Super-class doesn't have method '"+callerName+"'");}var func=parent.prototype[callerName];return func.apply(this,arguments);};SZN.Events=SZN.ClassMaker.makeClass({"NAME":"Events","VERSION":"2.2","CLASS":"static"});SZN.Events.eventFolder={};SZN.Events._domReadyTimer=null;SZN.Events._domReadyCallback=[];SZN.Events._domReadyAlreadyRun=false;SZN.Events._windowLoadListenerId="";SZN.Events.onDomReady=function(obj,func){SZN.Events._domReadyCallback[SZN.Events._domReadyCallback.length]={"obj":obj,"func":func};SZN.Events._onDomReady();};SZN.Events._onDomReady=function(){if((/Safari/i.test(navigator.userAgent))||(/WebKit|Khtml/i.test(navigator.userAgent))){SZN.Events._domReadyTimer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(SZN.Events._domReadyTimer);SZN.Events._domReady();}},10);}else{if(document.all&&!window.opera){try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,1);return;}SZN.Events._domReady();}else{if(document.addEventListener){document.addEventListener("DOMContentLoaded",SZN.Events._domReady,false);}}}SZN.Events._windowLoadListenerId=SZN.Events.addListener(window,"load",window,function(){SZN.Events._domReady();},false,true);};SZN.Events._domReady=function(){if(!SZN.Events._domReadyAlreadyRun){SZN.Events._domReadyAlreadyRun=true;if(document.addEventListener){document.removeEventListener("DOMContentLoaded",SZN.Events._domReady,true);}SZN.Events.removeListener(SZN.Events._windowLoadListenerId);for(var i=0;i<SZN.Events._domReadyCallback.length;i++){var callback=SZN.Events._domReadyCallback[i];if(typeof callback.func=="string"){callback.obj[callback.func]();}else{callback.func.apply(callback.obj,[]);}}SZN.Events._domReadyCallback=[];}};SZN.Events.destructor=function(){this.removeAllListeners();this.sConstructor.destroy(this);};SZN.Events.getEvent=function(e){return e||window.event;};SZN.Events.getTarget=function(e){var e=e||window.event;return e.target||e.srcElement;};SZN.Events.addListener=function(elm,eType,obj,func,capture){var capture=capture||false;var method=null;var toFold=null;if(typeof (obj)=="function"){toFold=this._addListener(elm,eType,obj,capture);}else{if(typeof (obj)=="object"){var cached=true;if(typeof (func)=="string"){if(typeof (obj[func])=="function"){method=this._getMethod(obj,func,elm);toFold=this._addListener(elm,eType,method,capture);}else{throw new Error("Events.addListener: arguments[3] must be method of arguments[2]");}}else{if(typeof (func)=="function"){method=this._getMethod(obj,func,elm);toFold=this._addListener(elm,eType,method,capture);}}}else{throw new Error("Events.addListener: arguments[2] must be object or function");}}toFold.push(obj);toFold.push(func);return this._storeToFolder(toFold);};SZN.Events._addListener=function(elm,eType,func,capture){if(document.addEventListener){if(window.opera&&(elm==window)){elm=document;}elm.addEventListener(eType,func,capture);}else{if(document.attachEvent){elm.attachEvent("on"+eType,func);}}return [elm,eType,func,capture];};SZN.Events._getMethod=function(obj,func,elm){if(typeof (func)=="string"){return function(e){return obj[func].apply(obj,[e,elm]);};}else{return function(e){return func.apply(obj,[e,elm]);};}};SZN.Events._storeToFolder=function(data){var id=SZN.idGenerator();this.eventFolder[id]={};this.eventFolder[id].trg=data[0];this.eventFolder[id].typ=data[1];this.eventFolder[id].action=data[2];this.eventFolder[id].capture=data[3];this.eventFolder[id].obj=data[4];this.eventFolder[id].func=data[5];return id;};SZN.Events.removeListener=function(elm,eType,obj,func,capture,cached){var capture=arguments[4]?arguments[4]:false;var cached=arguments[5]?arguments[5]:false;cached=(arguments.length==1)?arguments[0]:cached;if(typeof cached=="string"){return this._removeById(cached);}if(typeof obj=="function"){return this._removeListener(elm,eType,obj,capture);}throw new Error("Events.removeListener: wrong arguments");};SZN.Events._removeListener=function(elm,eType,func,capture){if(document.removeEventListener){if(window.opera&&(elm==window)){elm=document;}elm.removeEventListener(eType,func,capture);}else{if(document.detachEvent){elm.detachEvent("on"+eType,func);}}return 0;};SZN.Events._removeById=function(cached){try{var obj=this.eventFolder[cached];this._removeListener(obj.trg,obj.typ,obj.action,obj.capture);this.eventFolder[cached]=null;delete (this.eventFolder[cached]);}catch(e){return 1;}return 0;};SZN.Events.removeAllListeners=function(){for(var p in this.eventFolder){this._removeById(p);}};SZN.Events.stopEvent=function(e){var e=e||window.event;if(e.stopPropagation){e.stopPropagation();}else{e.cancelBubble=true;}};SZN.Events.cancelDef=function(e){var e=e||window.event;if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}};SZN.Events.addTimeFunction=function(owner,handleFuncName,exeFunc,exeObj){if(!!exeObj){owner[handleFuncName]=function(){return exeFunc.apply(exeObj,[]);};}else{owner[handleFuncName]=function(){return exeFunc.apply(owner,[]);};}};SZN.Events.getInfo=function(){var output=[];for(var i in SZN.Events.eventFolder){var o=SZN.Events.eventFolder[i];var obj=window;var func=null;if(o.obj){obj=o.obj;func=o.func;}else{func=o.action;}output.push({"nNode":o.trg,"sSource":"JAK","aListeners":[{"sType":o.typ,"sFunction":(obj!=window?"["+obj.constructor.NAME+"]":"")+(typeof (func)=="string"?"."+func+" = "+obj[func].toString():" "+func.toString()),"bRemoved":false}]});}return output;};SZN.Browser=SZN.ClassMaker.makeClass({"NAME":"Browser","VERSION":"2.2","CLASS":"static"});SZN.Browser.platform="";SZN.Browser.client="";SZN.Browser.klient="";SZN.Browser.version=0;SZN.Browser.agent="";SZN.Browser.mouse={};SZN.Browser._getPlatform=function(){if((this._agent.indexOf("X11")!=-1)||(this._agent.indexOf("Linux")!=-1)){return "nix";}else{if(this._agent.indexOf("Mac")!=-1){return "mac";}else{if(this._agent.indexOf("Win")!=-1){return "win";}else{return "oth";}}}};SZN.Browser._getKlient=function(){if(window.opera){return "opera";}else{if(document.attachEvent&&(typeof navigator.systemLanguage!="undefined")){return "ie";}else{if(document.getAnonymousElementByAttribute){return "gecko";}else{if(this._agent.indexOf("KHTML")){if(this._vendor=="KDE"){return "konqueror";}else{return "safari";}}else{return "oth";}}}}};SZN.Browser._getMouse=function(){var left;var right;var middle;if((SZN.Browser.client=="ie")||(SZN.Browser.client=="konqueror")){left=1;middle=4;right=2;}else{if((SZN.Browser.client=="opera")&&(SZN.Browser.version>7)&&(SZN.Browser.version<9)){left=1;middle=4;right=2;}else{if(SZN.Browser.client=="safari"){if(parseInt(SZN.Browser.version)>2){left=0;middle=0;right=2;}else{left=1;middle=1;right=2;}}else{left=0;middle=1;right=2;}}}return {"left":left,"right":right,"middle":middle};};SZN.Browser._getVersion=function(){var out=0;var fncName="_get_"+this.client+"_ver";if(typeof this[fncName]=="function"){return this[fncName]();}else{return 0;}};SZN.Browser._get_ie_ver=function(){if(typeof Function.prototype.call!="undefined"){if(window.XMLHttpRequest){return "7";}else{if(typeof document.doctype=="object"){return "6";}else{return "5.5";}}}else{return "5.0";}};SZN.Browser._get_opera_ver=function(){if(document.designMode&&document.execCommand){if(typeof Object.__defineGetter__=="function"){return "9.5";}else{return "9";}}else{if((document.selection)&&(document.createRange)){return "8";}else{if(document.createComment){return "7";}else{return "6";}}}};SZN.Browser._get_gecko_ver=function(){if(document.getElementsByClassName){return "3";}else{if(window.external){return "2";}else{return "1.5";}}};SZN.Browser._get_konqueror_ver=function(){var num=this._agent.indexOf("KHTML")+6;var part=this._agent.substring(num);var end=part.indexOf(" ");var x=part.substring(0,end-2);return x;};SZN.Browser._get_safari_ver=function(){if(this._agent.match(/chrome/i)){return 3;}var ver=this._agent.match(/version\/([0-9]+)/i);return (ver?ver[1]:"1");};SZN.Browser.getBrowser=function(){this._agent=this.agent=navigator.userAgent;this._platform=navigator.platform;this._vendor=navigator.vendor;this.platform=this._getPlatform();this.client=this._getKlient();this.klient=this.client;this.version=this._getVersion();this.mouse=this._getMouse();};SZN.Browser.getBrowser();SZN.Components=SZN.ClassMaker.makeClass({"NAME":"Components","VERSION":"1.2","CLASS":"class"});SZN.Components.prototype.hasComponents=function(){if((this.components instanceof Array)&&this.components.length){return true;}else{return false;}};SZN.Components.prototype.addAllComponents=function(){if(!this.hasComponents()){return false;}for(var i=0;i<this.components.length;i++){this._addComponent(this.components[i]);}return true;};SZN.Components.prototype.addNewComponent=function(component){if(!this.hasComponents()){this.components=new Array();}this.components.push(component);this._addComponent(component);};SZN.Components.prototype._addComponent=function(component){if(typeof component.part!="undefined"){if(typeof component.name=="undefined"){component.name=component.part.NAME.substring(0,1).toLowerCase();component.name+=component.part.NAME.substring(1);}if(typeof component.setting!="undefined"){this[component.name]=new component.part(this,component.name,component.setting);}else{this[component.name]=new component.part(this,component.name);}}};SZN.Components.prototype.registredMethod=function(owner){var field=[this,this.sConstructor];for(var i=0;i<field.length;i++){var obj=field[i];for(var j in obj){if(obj[j]===null)continue;if(typeof obj[j]=="undefined")continue;if((typeof obj[j].access!="undefined")&&(obj[j].access.indexOf("public")==0)){var name=this._createMethodName(obj,j);if(typeof owner[name]=="undefined"){owner[name]=(obj==this.sConstructor)?this.sConstructor[j]:SZN.bind(this,this[j]);}else{throw new Error("registredMethod: method \""+name+"\" already exist!");}}}}};SZN.Components.prototype.unregistredMethod=function(owner){var field=[this,this.sConstructor];for(var i=0;i<field.length;i++){var obj=field[i];for(var j in obj){if(obj[j]===null)continue;if(typeof obj[j]=="undefined")continue;if((typeof obj[j].access!="undefined")&&(obj[j].access.indexOf("public")==0)){var name=this._createMethodName(obj,j);if(typeof owner[name]!="undefined"){delete (owner[name]);}}}}};SZN.Components.prototype._createMethodName=function(obj,methodName){var nameFirstChar=methodName.substring(0,1).toUpperCase();var nameNext=methodName.substring(1);var mods=obj[methodName].access.replace(/[ ]{2,}/gi," ").split(" ");if(mods.length>1){var name=mods[1];}else{var namePrefix=(obj==this.sConstructor)?obj.NAME:this._name;var name=namePrefix+nameFirstChar+nameNext;}return name;};SZN.Components.prototype.getMain=function(){var obj=this;while(typeof obj.TOP_LEVEL=="undefined"){if(typeof obj._owner=="undefined"){throw new Error("can't find TOP LEVEL Class");}else{obj=obj._owner;}}return obj;};SZN.Components.prototype.callChildDestructor=function(){this.inDestruction=true;if(!this.hasComponents()){return false;}for(var i=0;i<this.components.length;i++){var cName=this.components[i].name;if(this[cName]==null){continue;}if((typeof this[cName].CLASS!="undefined")&&(typeof this[cName].inDestruction!="boolean")){var name="$destructor";if((typeof this[cName][name]!="undefined")&&(typeof this[cName][name]=="function")){this[cName][name]();}this[cName]=null;}}};SZN.Components.prototype.removeComponent=function(component,withDestruction){for(var i=0;i<this.components.length;i++){var c=this.components[i];if(component==c.name||component==this[c.name]){if(withDestruction&&(typeof this[c.name].$destructor=="function")){this[c.name].$destructor();}this[c.name]=null;c=null;this.components.splice(i,1);break;}}};SZN.Dom=SZN.ClassMaker.makeClass({"NAME":"Dom","VERSION":"3.4","CLASS":"static"});SZN.cEl=function(tagName,id,className,styleObj,doc){var d=doc||document;var node=d.createElement(tagName);if(arguments.length==1){return node;}if(id){node.id=id;}if(className){node.className=className;}if(styleObj)for(p in styleObj){node.style[p]=styleObj[p];}return node;};SZN.cTxt=function(str,doc){var d=doc||document;return d.createTextNode(str);};SZN.gEl=function(ids){if(typeof (ids)=="string"){return document.getElementById(ids);}else{return ids;}};SZN.Dom.append=function(){for(var i=0;i<arguments.length;i++){var arr=arguments[i];var head=arr[0];for(var j=1;j<arr.length;j++){head.appendChild(arr[j]);}}};SZN.Dom.hasClass=function(element,className){var arr=element.className.split(" ");for(var i=0;i<arr.length;i++){if(arr[i]==className){return true;}}return false;};SZN.Dom.addClass=function(element,className){if(SZN.Dom.hasClass(element,className)){return;}element.className+=" "+className;};SZN.Dom.removeClass=function(element,className){var names=element.className.split(" ");var newClassArr=[];for(var i=0;i<names.length;i++){if(names[i]!=className){newClassArr.push(names[i]);}}element.className=newClassArr.join(" ");};SZN.Dom.clear=function(element){while(element.firstChild){element.removeChild(element.firstChild);}};SZN.Dom.getDocSize=function(){var x=0;var y=0;if(document.compatMode!="BackCompat"){if(document.documentElement.clientWidth&&SZN.Browser.klient!="opera"){x=document.documentElement.clientWidth;y=document.documentElement.clientHeight;}else{if(SZN.Browser.klient=="opera"){if(parseFloat(SZN.Browser.version)<9.5){x=document.body.clientWidth;y=document.body.clientHeight;}else{x=document.documentElement.clientWidth;y=document.documentElement.clientHeight;}}}if((SZN.Browser.klient=="safari")||(SZN.Browser.klient=="konqueror")){y=window.innerHeight;}}else{x=document.body.clientWidth;y=document.body.clientHeight;}return {"width":x,"height":y};};SZN.Dom.getBoxPosition=function(obj,ref){var top=0;var left=0;var refBox=ref||obj.ownerDocument.body;if(obj.getBoundingClientRect&&!ref){var de=document.documentElement;var box=obj.getBoundingClientRect();var scroll=SZN.Dom.getScrollPos();return {"left":box.left+scroll.x-de.clientLeft,"top":box.top+scroll.y-de.clientTop};}while(obj&&obj!=refBox){top+=obj.offsetTop;left+=obj.offsetLeft;obj=obj.offsetParent;}return {"top":top,"left":left};};SZN.Dom.getFullBoxPosition=function(obj,parent,fixed){var pos=SZN.Dom.getBoxPosition(obj,parent,fixed);var scroll=SZN.Dom.getBoxScroll(obj,parent,fixed);pos.left-=scroll.x;pos.top-=scroll.y;return {"left":pos.left,"top":pos.top};};SZN.Dom.getBoxScroll=function(obj,ref,fixed){var x=0;var y=0;var cur=obj.parentNode;var limit=ref||obj.ownerDocument.documentElement;var fix=false;while(1){if(SZN.Browser.client=="opera"&&SZN.Dom.getStyle(cur,"display")!="block"){cur=cur.parentNode;continue;}if(SZN.Browser.client=="opera"&&cur==document.documentElement){break;}if(fixed&&SZN.Dom.getStyle(cur,"position")=="fixed"){fix=true;}if(!fix){x+=cur.scrollLeft;y+=cur.scrollTop;}if(cur==limit){break;}cur=cur.parentNode;if(!cur){break;}}return {"x":x,"y":y};};SZN.Dom.getScrollPos=function(){if(document.documentElement.scrollTop||document.documentElement.scrollLeft){var ox=document.documentElement.scrollLeft;var oy=document.documentElement.scrollTop;}else{if(document.body.scrollTop||document.body.scrollLeft){var ox=document.body.scrollLeft;var oy=document.body.scrollTop;}else{var ox=0;var oy=0;}}return {"x":ox,"y":oy};};SZN.Dom.getStyle=function(elm,property){if(document.defaultView&&document.defaultView.getComputedStyle){var cs=elm.ownerDocument.defaultView.getComputedStyle(elm,"");if(!cs){return false;}return cs[property];}else{return elm.currentStyle[property];}};SZN.Dom.setStyle=function(elm,style){for(name in style){elm.style[name]=style[name];}};SZN.Dom.elementsHider=function(obj,elements,action){var elems=elements;if(!elems){elems=["select","object","embed","iframe"];}var hidden=arguments.callee.hidden;if(hidden){hidden.forEach(function(node){node.style.visibility="visible";});arguments.callee.hidden=[];}function testParent(node){var ok=false;var cur=node;while(cur.parentNode&&cur!=document){if(cur==obj){ok=true;}cur=cur.parentNode;}return ok;}if(action=="hide"){if(typeof obj=="string"){obj=SZN.gEl(obj);}var hidden=[];var box=this.getBoxPosition(obj);box.width=obj.offsetWidth+box.left;box.height=obj.offsetHeight+box.top;for(var e=0;e<elems.length;++e){var elm=document.getElementsByTagName(elems[e]);for(var f=0;f<elm.length;++f){var node=this.getBoxPosition(elm[f]);if(testParent(elm[f])){continue;}node.width=elm[f].offsetWidth+node.left;node.height=elm[f].offsetHeight+node.top;if(!((box.left>node.width)||(box.width<node.left)||(box.top>node.height)||(box.height<node.top))){elm[f].style.visibility="hidden";hidden.push(elm[f]);}}}arguments.callee.hidden=hidden;}};SZN.Dom.getElementsByClass=function(searchClass,node,tag){if(document.getElementsByClassName&&!tag){var elm=node||document;return SZN.Dom.arrayFromCollection(elm.getElementsByClassName(searchClass));}if(document.querySelectorAll&&!tag){var elm=node||document;return SZN.Dom.arrayFromCollection(elm.querySelectorAll("."+searchClass));}var classElements=[];var node=node||document;var tag=tag||"*";var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)");for(var i=0,j=0;i<elsLen;i++){if(pattern.test(els[i].className)){classElements[j]=els[i];j++;}}return classElements;};SZN.Dom.arrayFromCollection=function(col){var result=[];try{result=Array.prototype.slice.call(col);}catch(e){for(var i=0;i<col.length;i++){result.push(col[i]);}}finally{return result;}};SZN.ObjLib=SZN.ClassMaker.makeClass({"NAME":"ObjLib","VERSION":"1.2","CLASS":"class"});SZN.ObjLib.prototype.DEEP=200;SZN.ObjLib.prototype.$constructor=function(){this.deep=this.DEEP;this.setUndefinedHandler();};SZN.ObjLib.prototype.$destructor=function(){};SZN.ObjLib.prototype.setDeep=function(num){this.deep=num;};SZN.ObjLib.prototype.getDeep=function(){return this.deep;};SZN.ObjLib.prototype.setUndefinedHandler=function(handleType){var types={"throw":1,"nothing":1,"def":"throw"};this.undefHandler=types[handleType]?handleType:types["def"];};SZN.ObjLib.prototype.getUndefinedHandler=function(){return this.undefHandler;};SZN.ObjLib.prototype.pretty=function(str,sep){var arr=str.toString().split("");var newline=this._isIE()?"\n\r":"\n";var tab=sep?sep:"\t";var ptr=0;var depth=0;var inSpecial="";function countBackslashes(){var cnt=0;var ptr2=ptr-1;while(ptr2>=0&&arr[ptr2]=="\\"){cnt++;ptr2--;}return cnt;}while(ptr<arr.length){var ch=arr[ptr];switch(ch){case "\"":if(inSpecial=="re"){break;}var num=countBackslashes();if(!(num&1)){inSpecial=(inSpecial?"":"str");}break;case "/":if(inSpecial=="str"){break;}var num=countBackslashes();if(!(num&1)){inSpecial=(inSpecial?"":"re");}break;case ",":if(!inSpecial){arr.splice(++ptr,0,newline);for(var i=0;i<depth;i++){arr.splice(++ptr,0,tab);}}break;case "{":case "[":if(!inSpecial){depth++;arr.splice(++ptr,0,newline);for(var i=0;i<depth;i++){arr.splice(++ptr,0,tab);}}break;case "}":case "]":if(!inSpecial){arr.splice(ptr++,0,newline);depth--;for(var i=0;i<depth;i++){arr.splice(ptr++,0,tab);}}break;}ptr++;}return arr.join("");};SZN.ObjLib.prototype.serialize=function(objToSource,showFlag){var deepFlag=0;var startString="{";var endString="}";var propertySep=":";var propertyEnd=",";var mySelf=this;var output="";var firstStep=true;var cache=[];var mySource=function(obj){if(mySelf.deep&&(mySelf.deep<deepFlag)){throw new Error("Serialize: structure is so deep.");}if(cache.indexOf(obj)!=-1){throw new Error("serialize: Circular reference encountered");return null;}if(typeof arguments[1]!="undefined"){var propName=arguments[1];}else{var propName=false;}if(!(obj instanceof Object)){switch(typeof obj){case "string":return "'"+mySelf._formatString(obj)+"'";break;case "undefined":switch(mySelf.undefHandler){case "nothing":return obj;break;default:throw new Error("serialize: property "+(propName?propName:"obj")+" is not defined!!");break;}break;default:return obj;break;}}else{cache.push(obj);var buildIn=mySelf._buildInObjectSerialize(obj);if(buildIn.isSet){return buildIn.output;}else{if(typeof obj=="function()"){throw new Error("Serialize: can't serialize object with some method - ** "+(propName?"obj":propName)+" **");}var output=startString;deepFlag++;for(var i in obj){for(var j in obj[i]){if(j){var isEmpty=false;break;}}var propName=mySelf._formatString(i);output+="'"+propName+"'"+propertySep+(isEmpty?"{}":mySource(obj[i],i))+propertyEnd;}var charNum=(output.lastIndexOf(",")>=0)?output.lastIndexOf(","):output.length;output=output.substring(0,charNum);deepFlag--;return output+endString;}}};var source=mySource(objToSource);if(showFlag){return this.pretty(source,showFlag);}else{return source;}};SZN.ObjLib.prototype.arraySerialize=function(fieldToSerialize){var fieldStr="";var mySelf=this;var mySource=function(field){if(field instanceof Array){for(var i=0;i<field.length;i++){if(typeof field[i]=="function"&&!(field[i] instanceof RegExp)){throw new Error("Serialize: can't serialize Function");}if((typeof field[i]!="object")&&((typeof field[i]!="function"))){if(typeof field[i]=="string"){var str=mySelf._formatString(field[i]);fieldStr+="'"+str+"',";}else{fieldStr+=field[i]+",";}}else{fieldStr+=mySelf.serialize(field[i],0)+",";}}return "["+fieldStr.substring(0,fieldStr.length-1)+"]";}else{throw new Error("arraySerialize: Attribute is not Array");}};var myString=mySource(fieldToSerialize);return myString;};SZN.ObjLib.prototype.unserialize=function(serializedString){eval("var newVar="+serializedString);return newVar;};SZN.ObjLib.prototype.match=function(refObj,matchObj){if(this.serialize(refObj,0).length==this.serialize(matchObj,0).length){var step1=this._matchProcess(refObj,matchObj);var step2=this._matchProcess(matchObj,refObj);return (step1&&step2);}else{return false;}};SZN.ObjLib.prototype._matchProcess=function(refObj,matchObj){var success=true;var mySelf=this;var firstStep=true;var myMatch=function(obj1,obj2){if(firstStep){var buildIn=mySelf._matchBuildInObj(obj1,obj2);if((buildIn.isSet)&&(!buildIn.success)){success=false;return false;}firstStep=false;}for(var i in obj1){if(((typeof obj1[i]!=undefined)&&(typeof obj2[i]!=undefined))||((typeof obj1[i]==undefined)&&(typeof obj2[i]==undefined))){if((typeof obj1[i]!="object")&&(typeof obj1[i]!="function")){if(obj1[i]!=obj2[i]){success=false;return success;}else{succes=success;}}else{var buildIn=mySelf._matchBuildInObj(obj1,obj2);if(buildIn.isSet){if(!buildIn.success){success=false;return false;}}else{success=myMatch(obj1[i],obj2[i]);}}}else{success=false;return success;}}return success;};success=myMatch(refObj,matchObj);return success;};SZN.ObjLib.prototype._matchBuildInObj=function(refObj,matchObj){var objField=["String","Number","RegExp","Date","Boolean"];var success=false;var isSet=false;for(var i=0;i<objField.length;i++){if((refObj instanceof window[objField[i]])&&(matchObj instanceof window[objField[i]])){isSet=true;if((this.serialize(refObj,0))==(this.serialize(matchObj,0))){success=true;}}}return {"isSet":isSet,"success":success};};SZN.ObjLib.prototype._buildInObjectSerialize=function(testedObj){var output=null;var isSet=false;if(testedObj instanceof String){output="new String(\""+this._formatString(testedObj)+"\")";isSet=true;}else{if(testedObj instanceof Number){output="new Number("+testedObj+")";isSet=true;}else{if(testedObj instanceof RegExp){output="new RegExp("+testedObj+")";isSet=true;}else{if(testedObj instanceof Array){output=this.arraySerialize(testedObj);isSet=true;}else{if(testedObj instanceof Date){var tm=testedObj.getTime();output="new Date("+tm+")";isSet=true;}else{if(testedObj instanceof Boolean){output="new Boolean("+testedObj+")";isSet=true;}else{if(testedObj==null){isSet=true;}}}}}}}return {"isSet":isSet,"output":output};};SZN.ObjLib.prototype._isIE=function(){if(document.all&&document.attachEvent&&!window.opera){return true;}return false;};SZN.ObjLib.prototype.copy=function(objToCopy){var str=this.serialize(objToCopy);return this.unserialize(str);};SZN.ObjLib.prototype._formatString=function(s){var re=/["\\']/g;var re2=/[\n\r\t]/g;var replace={"\n":"\\n","\t":"\\t","\r":"\\r"};return s.replace(re,this._addSlashes).replace(re2,function(ch){return replace[ch];});},SZN.ObjLib.prototype._addSlashes=function(ch){return "\\"+ch;};SZN.ObjLib.prototype.arrayCopy=function(arrayToCopy){if(field instanceof Array){var out=this.arraySerialize(arrayToCopy);return this.unserialize(out);}else{throw new Error("ObjCopy.arrayCopy: Attribute is not Array");}};SZN.ObjCopy=SZN.ClassMaker.makeClass({"NAME":"ObjCopy","VERSION":"1.1","CLASS":"class","EXTEND":SZN.ObjLib});SZN.ObjCopy.prototype.$constructor=function(){this.callSuper("$constructor",arguments.callee)();};SZN.HTTPRequest=SZN.ClassMaker.makeClass({"NAME":"HTTPRequest","VERSION":"1.1","CLASS":"class"});SZN.HTTPRequest.prototype.$constructor=function(url,callBackObj,callBackFunc){this.data=new Object();this.url=url?url:"";this.callBackObj=callBackObj;this.callBackFunc=callBackFunc;this.setFormat();this.setMode();this.setMethod();this.setPostData();this.setHeaders();};SZN.HTTPRequest.Setting=function(url,method,postData,headers,mode,format){this.url=url?url:"";this.method=method?method:"";this.mode=mode?mode:"";this.format=format?format:"";this.headers=headers?headers:"";this.postData=postData?postData:"";};SZN.HTTPRequest.prototype.METHOD={"post":"post","get":"get","def":"get"};SZN.HTTPRequest.prototype.FORMAT={"xml":"xml","txt":"txt","def":"txt"};SZN.HTTPRequest.prototype.MODE={"async":true,"sync":false,"def":true};SZN.HTTPRequest.prototype.HEADER=[{"typ":"Content-Type","content":"application/x-www-form-urlencoded"}];SZN.HTTPRequest.prototype.destructor=function(){for(var i in this){this[i]=null;}};SZN.HTTPRequest.prototype.init=function(){};SZN.HTTPRequest.prototype.setMethod=function(method){this.data.method=this._getMethod(method);};SZN.HTTPRequest.prototype.setMode=function(mode){this.data.mode=this._getMode(mode);};SZN.HTTPRequest.prototype.setFormat=function(format){this.data.format=this._getFormat(format);};SZN.HTTPRequest.prototype.setHeaders=function(headers){this.data.headers=this._setHeaders(headers);};SZN.HTTPRequest.prototype.setPostData=function(data){this.data.postData=data?data:"";};SZN.HTTPRequest.prototype.send=function(url,obj,method,requestData,returnOnly){var mySelf=this;var param=requestData?requestData:{};var data=this._setFromData(url,obj,method,param);var XHR=this._getRequest();try{XHR.open(data.method,data.url,data.mode);}catch(e){return 0;}for(var i=0;i<data.headers.length;i++){XHR.setRequestHeader(data.headers[i].typ,data.headers[i].content);}if(data.mode){function stateChangeFunction(){if(XHR.readyState==4){if(data.format=="xml"){var out=XHR.responseXML;}else{if(data.format=="txt"){var out=XHR.responseText;}}var status=0;try{status=XHR.status;}catch(e){}finally{data.callBackObj[data.callBackFunc](out,status);XHR=null;}}}XHR.onreadystatechange=stateChangeFunction;}if(data.method==this.METHOD["post"]){if(typeof data.postData!="undefined"){XHR.send(data.postData);}else{return 0;}}else{XHR.send(null);}if(!data.mode){if(data.format=="xml"){var out=XHR.responseXML;}else{var out=XHR.responseText;}if(returnOnly){return {"status":XHR.status,"data":out};}else{data.callBackObj[data.callBackFunc](out,XHR.status);}}else{return XHR;}};SZN.HTTPRequest.prototype.abort=function(XHR){if(typeof XHR=="object"&&XHR.readyState!=4){XHR.abort();}else{return 0;}};SZN.HTTPRequest.prototype._getMethod=function(method){return (typeof this.METHOD[method]!="undefined")?this.METHOD[method]:this.METHOD["def"];};SZN.HTTPRequest.prototype._getMode=function(mode){return (typeof this.MODE[mode]!="undefined")?this.MODE[mode]:this.MODE["def"];};SZN.HTTPRequest.prototype._getFormat=function(format){return (typeof this.FORMAT[format]!="undefined")?this.FORMAT[format]:this.FORMAT["def"];};SZN.HTTPRequest.prototype._setHeaders=function(headers){var headers=(headers instanceof Array)?headers:new Array();var out=new Array();var setContent=false;for(var i=0;i<headers.length;i++){if(headers[i].typ=="Content-Type"){setContent=true;}out[i]={"typ":headers[i].typ,"content":headers[i].content};}if(!setContent){out.push({"typ":this.HEADER[0].typ,"content":this.HEADER[0].content});}return out;};SZN.HTTPRequest.prototype._setFromData=function(url,obj,func,setting){var data=new Object();for(var i in this.data){switch(i){case "method":if(setting[i]){data[i]=this._getMethod(setting[i]);}else{data[i]=this.data[i];}break;case "format":if(setting[i]){data[i]=this._getFormat(setting[i]);}else{data[i]=this.data[i];}break;case "mode":if(setting[i]){data[i]=this._getMode(setting[i]);}else{data[i]=this.data[i];}break;case "headers":if(setting[i]){data.headers=this._setHeaders(setting[i]);}else{data.headers=this._setHeaders(this.data[i]);}break;default:if(setting[i]){data[i]=setting[i];}else{data[i]=this.data[i];}break;}}data.url=url?url:this.url;data.callBackObj=obj?obj:this.callBackObj;data.callBackFunc=func?func:this.callBackFunc;return data;};SZN.HTTPRequest.prototype._getRequest=function(){if(typeof (XMLHttpRequest)!="undefined"){return new XMLHttpRequest();}else{try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return 0;}}}};SZN.Signals=SZN.ClassMaker.makeClass({"NAME":"Signals","VERSION":"1.4","CLASS":"class"});SZN.Signals.prototype.$constructor=function(owner,name){this._owner=owner;this._name=name;this.messageFolder={};this.myEventFolder={};this.myHandleFolder={};this.apiHandler=null;};SZN.Signals.prototype.$destructor=function(){};SZN.Signals.prototype.setApiHandler=function(handler){this.apiHandler=handler;};SZN.Signals.prototype.setMessage=function(msgName,msgValue){this.messageFolder[msgName]=msgValue;};SZN.Signals.prototype.getMessage=function(msgName){return this.messageFolder[msgName];};SZN.Signals.prototype.addListener=function(owner,type,funcOrString,sender){if(!(type in this.myHandleFolder)){this.myHandleFolder[type]={};}for(var p in this.myHandleFolder[type]){var item=this.myHandleFolder[type][p];if((item.eFunction==funcOrString)&&(item.eOwner==owner)&&(item.eSender==sender)){return null;}}var id=SZN.idGenerator();this.myHandleFolder[type][id]={"eOwner":owner,"eFunction":funcOrString,"eSender":sender};return id;};SZN.Signals.prototype.removeListener=function(owner,type,funcOrString,sender){var removed=1;if(arguments.length==1){var id=arguments[0];for(var t in this.myHandleFolder){var set=this.myHandleFolder[t];if(id in set){set[id]=null;delete (set[id]);removed=0;}}}else{for(var id in this.myHandleFolder[type]){var item=this.myHandleFolder[type][id];if((item.eFunction==funcOrString)&&(item.eOwner==owner)&&(item.eSender==sender)){item=null;delete (this.myHandleFolder[type][id]);removed=0;}}}return removed;};SZN.Signals.prototype.makeEvent=function(type,trg,accessType,timestamp,data){var ids=SZN.idGenerator();this.myEventFolder["e-"+ids]=new SZN.Signals.NewEvent(type,trg,accessType,timestamp,ids,data);this.myEventHandler(this.myEventFolder["e-"+ids]);};SZN.Signals.NewEvent=function(type,trg,access,time,ids,data){this.type=type;this.target=trg;this.accessType=access;this.timeStamp=time;this._id=ids;this.data=(data&&typeof data=="object")?data:null;};SZN.Signals.prototype.myEventHandler=function(myEvent){var functionCache=[];for(var type in this.myHandleFolder){if(type==myEvent.type||type=="*"){for(var p in this.myHandleFolder[type]){var item=this.myHandleFolder[type][p];if(!item.eSender||item.eSender==myEvent.target){functionCache.push(item);}}}}for(var i=0;i<functionCache.length;i++){var item=functionCache[i];var owner=item.eOwner;var fnc=item.eFunction;if(typeof fnc=="string"){owner[fnc](myEvent);}else{if(typeof fnc=="function"){fnc(myEvent);}}}if((myEvent.accessType=="public")&&(this.apiHandler!=null)&&(myEvent._owner!="api")){this.apiHandler._apiEventHandler(myEvent);}this.destroyEvent(myEvent._id);};SZN.Signals.prototype.destroyEvent=function(ids){this.myEventFolder["e-"+ids]=null;delete (this.myEventFolder["e-"+ids]);};SZN.signals=new SZN.Signals();SZN.SigInterface=SZN.ClassMaker.makeClass({"NAME":"SigInterface","VERSION":"1.3","CLASS":"class"});SZN.SigInterface.prototype.setInterface=function(interfaceName){if(typeof (this[interfaceName])!="object"){var owner=this._owner;while(typeof (owner[interfaceName])=="undefined"){if(typeof owner.TOP_LEVEL!="undefined"){throw new Error("SetInterface:Interface not found");}else{owner=owner._owner;}}return owner[interfaceName];}};SZN.SigInterface.prototype.addListener=function(type,handleFunction,sender){return this.getInterface().addListener(this,type,handleFunction,sender);};SZN.SigInterface.prototype.removeListener=function(type,handleFunction,sender){if(arguments.length==1){return this.getInterface().removeListener(arguments[0]);}else{return this.getInterface().removeListener(this,type,handleFunction,sender);}};SZN.SigInterface.prototype.makeEvent=function(type,accessType,data){var time=new Date().getTime();this.getInterface().makeEvent(type,this,accessType,time,data);};SZN.SigInterface.prototype.setSysMessage=function(msgName,msgValue){this.getInterface().setMessage(msgName,msgValue);};SZN.SigInterface.prototype.getSysMessage=function(msgName){return this.getInterface().getMessage(msgName);};SZN.SigInterface.prototype.getInterface=function(){return (typeof (this.signals)=="object"?this.signals:SZN.signals);};}
