MySpace.UI.IframePopup=function(D,C,F,B,E,A){this._elementID=D;this._showID=C;this._iFrameId=F;this._iFrameSrc=B;this._elementClass=E;this._iframeClass=A;this._element=null;this._elementStyle=null;this._showElement=null;this._pxFromTop=125;this._initialized=false;if(this._showID!==""){this._hookHandler()}window._iframepopup=this};MySpace.UI.IframePopup.prototype={setiframesrc:function(B,A){if("undefined"===typeof(A)){$get(this._iFrameId).src=B}else{$get(this._iFrameId).src=B+A}},_initialize:function(){var A=document.createElement("div");A.id=this._elementID;var B=new Sys.StringBuilder("<div id='iframepopupinner' style='margin:auto' class='");B.append(this._elementClass);B.append("'><iframe id='PWOIframeID' frameborder='0' scrolling='no' class='");B.append(this._iframeClass);B.append("'></iframe></div>");A.innerHTML=B.toString();this._element=A;this._elementStyle=this._element.style;this._elementStyle.zIndex="1000201";this._elementStyle.width="100%";this._elementStyle.left="0px";if(Sys.Browser.InternetExplorer===Sys.Browser.agent){this._elementStyle.position="absolute"}else{this._elementStyle.position="fixed"}this._elementStyle.top=this._pxFromTop+"px";document.body.appendChild(this._element);$get("PWOIframeID").id=this._iFrameId;this._initialized=true},_hookHandler:function(){var D;var C;var B=this._showID.split(",");this._showElement={};for(var A=0;A<B.length;A++){D=B[A];this._showElement[D]=$get(D);$addHandler(this._showElement[D],"click",Function.createDelegate(this,this.show))}},show:function(A){if(!this._initialized){this._initialize()}var B=this._showID.split(",");if("undefined"===typeof(A)){this.setiframesrc(this._iFrameSrc);this._elementStyle.display="block";this._elementStyle.visibility="visible";window.get_overlay().show();if(this._iFrameId){$get(this._iFrameId).style.display="block";$get(this._iFrameId).style.visibility="visible"}this._vertScroll()}else{if(Array.contains(B,A.target.id)){this.setiframesrc(this._iFrameSrc,A.target.id.split("_")[0]);this._elementStyle.display="block";this._elementStyle.visibility="visible";window.get_overlay().show();if(this._iFrameId){$get(this._iFrameId).style.display="block";$get(this._iFrameId).style.visibility="visible"}this._vertScroll()}}return false},showMe:function(A){if(!this._initialized){this._initialize()}$get(this._iFrameId).src=String.format(this._iFrameSrc,A);this._elementStyle.display="block";this._elementStyle.visibility="visible";window.get_overlay().show();if(this._iFrameId){$get(this._iFrameId).style.display="block";$get(this._iFrameId).style.visibility="visible"}this._vertScroll();return false},hide:function(){window.get_overlay().hide();this._elementStyle.display="none";if(this._iFrameId){$get(this._iFrameId).style.display="none";$get(this._iFrameId).src=""}},_vertScroll:function(){if(Sys.Browser.InternetExplorer===Sys.Browser.agent){var A=0;if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){A=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){A=document.documentElement.scrollTop}}this._elementStyle.top=this._pxFromTop+A+"px"}},dispose:function(){this._initialized=false;MySpace.UI.IframePopup.callBaseMethod(this,"dispose")}};window.get_iframepopup=function(){if(!window._iframepopup){return null}else{return window._iframepopup}};MySpace.UI.IframePopup.registerClass("MySpace.UI.IframePopup");if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()};
