var myty = {version:'4.2.0 Beta',revision:'10553',basePath:'/tycon',topic:'',setTopic:function(t){this.topic=t;},theme:'appleme',session:{name:'PHPSESSID',id:'f5aitie66k1f0is8fb2j0ebh55'}};var mytySimplePopinLoader = { _loadState : 0, _loadCSS : false, loadScript : function(callback){ if(0 === this._loadState){ this._loadState = 1; var _this = this; $ty.getScript(myty.basePath+"/scripts/tyquery/plugins/mytysimplepopin.js",function(d,s){ _this._loadState = 2; if($ty.isFunction(callback) ){ callback.call(this); }; }); }else if(2 === this._loadState){ if($ty.isFunction(callback) ){ callback.call();}; } }, loadCSS : function(){ if(false === this._loadCSS){ this._loadCSS = true; $ty('head').append('<link rel="stylesheet" href="'+myty.basePath+'/themes/appleme/styles_frontend/mytysimplepopin.css" type="text/css" />'); } }, load : function(callback){ this.loadCSS(); this.loadScript(callback); }, }; var mytySmartLogin={ popin : null, stateNr : 0, topic : '', setTopic : function(s){ this.topic = s; }, open : function(){ if(0 === this.stateNr){ this.stateNr = 1; var _this = this; var callback = function(){ _this.popin = new $ty.mytySimplePopIn({popin_container_id:"mytyLoginPopin",onclose : function(){mytySmartLogin.stateNr = 0;}}); _this.popin.open('<iframe id="mytyLoginIFrame" src="'+myty.basePath+'/index.php?view=iframe&fromTopic='+mytySmartLogin.topic+'" style="width:500px;height:345px;" scrolling="no" marginheight="0" marginwidth="0" frameborder="0"/>',function(){}); }; mytySimplePopinLoader.load(callback); } }, close : function(){this.popin.close();} } 
