Your IP : 216.73.216.240


Current Path : /home/juvelize/www/administrator/components/com_proforms/js/
Upload File :
Current File : /home/juvelize/www/administrator/components/com_proforms/js/mwindow.js

// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// @license: Mad4Media Javascipt License - copyright Mad4Media - Fahrettin Kutyol - All rights reserved    ++
// (re-) publishing or forking for any purpose of commercial or non-commercial use is not allowed.		   ++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
var MoojWindow=function(){this.cover=_newElement2Body("div",{"opacity":"0.7","display":"none","backgroundColor":"black","left":"0","top":"0","position":"fixed","width":"100%","height":"100%","zIndex":"10000"},"","mCover");this.container=_newElement2Body("div",{"display":"none","backgroundColor":"white","position":"fixed","width":"800px","height":"600px","outline":this.outline,"border":(dojo.isIE&&dojo.isIE!=8)?this.outline:"none","zIndex":"10001"},"","mWindowContainer");this.closeButton=_newElement2Body("div",{"display":"none","position":"fixed","width":"24px","height":"24px","zIndex":"10002"},"","mWindowCloseButton");this.closeButton.innerHTML="<img src=\"components/com_proforms/images/close.png\" width=\"24\" height=\"24\" border=\"0\" style=\"cursor:pointer;\" onclick=\"javascript: mWindow.close();\" />";this.closeCallBack=this.emptyCall;};MoojWindow.prototype={width:800,height:600,outline:"10px solid black",cover:undefined,container:undefined,closeButton:undefined,emptyCall:function(){return true;},closeCallBack:undefined,code:"",setOutline:function(_1){this.outline=_1;if(this.container){this.container.style.outline=_1;}},setCode:function(_2){this.code=_2;},close:function(){dojo.fadeOut({node:this.cover,duration:500,onEnd:dojo.hitch(this,function(){this.cover.style.display="none";})}).play();dojo.fadeOut({node:this.container,duration:500,onEnd:dojo.hitch(this,function(){this.container.style.display="none";this.closeCallBack();})}).play();dojo.fadeOut({node:this.closeButton,duration:500,onEnd:dojo.hitch(this,function(){this.closeButton.style.display="none";})}).play();},open:function(_3){var _4=_WindowSize();var _5={x:Math.round(_4.width/2),y:Math.round(_4.height/2)};if(_3){var _6=_4.width-80;var _7=_4.height-80;this.width=(_3.width>_6)?_6:_3.width;this.height=(_3.height>_7)?_7:_3.height;}this.container.style.width=this.width+"px";this.container.style.height=this.height+"px";var wH=Math.round(this.width/2);var hH=Math.round(this.height/2);this.container.style.left=(_5.x-wH)+"px";this.container.style.top=(_5.y-hH)+"px";var _8=(dojo.isIE==7)?0:12;this.closeButton.style.left=(_5.x+wH-_8)+"px";this.closeButton.style.top=(_5.y-hH-_8)+"px";this.cover.style.display="block";_fx.fadeOpacity(this.cover,500,0,0.7);dojo.fadeIn({node:this.container,duration:500,onPlay:dojo.hitch(this,function(){this.container.style.display="block";})}).play();dojo.fadeIn({node:this.closeButton,duration:500,onPlay:dojo.hitch(this,function(){this.closeButton.style.display="block";})}).play();},openAuto:function(){this.open({width:999999,height:999999});},iFrame:function(_9,_a,_b){this.closeCallBack=(_b)?_b:this.emptyCall;this.container.innerHTML="<iframe name=\"mWindowIFrame\" id=\"mWindowIFrame\" src=\""+_9+"\" frameborder=\"0\" scrolling=\"auto\"></iframe>";if(_a){this.open(_a);}else{this.openAuto();}var ws=_S("mWindowIFrame");ws.width="100%";ws.height="100%";},content:function(_c,_d){this.closeCallBack=(_d)?_d:this.emptyCall;this.container.innerHTML=this.code;this.open(_c);},fromNode:function(_e,_f,_10){this.closeCallBack=(_10)?_10:this.emptyCall;_e=dojo.byId(_e);if(_e){this.container.innerHTML=_e.innerHTML;}this.open(_f);},load:function(_11,_12,_13){this.closeCallBack=(_13)?_13:this.emptyCall;var lcb=dojo.hitch(this,function(_14,_15){this.container.innerHTML=_14;this.open(_12);return true;});var _16=dojo.hitch(this,function(_17,_18){this.container.innerHTML="ERROR";this.open(_12);return false;});return dojo.xhrGet({url:_11,load:lcb,error:_16});}};var mWindow=undefined;dojo.addOnLoad(function(){mWindow=new MoojWindow();});