var mbWidth=498;var mbHeight=575;var mbScroll="yes";ha.ui.modalbox={init:function(){$j("a.modalbox").click(function(){var d=this.title||this.name||null;if(d==null){d=""}var c=this.href;var b=$j(this).attr("args");ha.ui.modalbox.show(d,c,b);this.blur();return false})},show:function(j,a,h){var c="";var k="";var b='<div id="mb-load"><img src="/resources/9835/images/icon/modal-loader.gif" /></div>';try{if(typeof document.body.style.maxHeight=="undefined"){$j("body","html").css({height:"100%",width:"100%"});$j("html").css("overflow","hidden");if(document.getElementById("mb-hide")==null){c+='<iframe id="mb-hide"></iframe>';c+='<div id="mb-overlay"></div>';c+='<div id="mb-window"></div>'}}else{if(document.getElementById("mb-overlay")==null){c+='<div id="mb-overlay"></div>';c+='<div id="mb-window"></div>'}}$j("body").append(c);$j("#mb-overlay").click(ha.ui.modalbox.remove);$j("body").append(b);$j("#mb-load").show();if(h.length>0){h=h.split(":");for(var d=0;d<h.length;d++){if(d==0){mbWidth=h[0]}else{if(d==1){mbHeight=h[1]}else{if(d==2){mbScroll=h[2]}}}}}var k='<div id="mb-frame-box">';k+='<iframe frameborder="0" hspace="0" src="'+a+'" scrolling="'+mbScroll+'" title="'+j+'"id="mb-iframe" name="mb-iframe" style="width:'+mbWidth+"px; height:"+mbHeight+'px;" allowtransparency="true" onload="ha.ui.modalbox.showIframe()"> </iframe>';k+="</div>";$j("#mb-window").append(k);ha.ui.modalbox.position();$j(window).resize(function(){ha.ui.modalbox.position()});if(frames["mb-iframe"]===undefined){$j("#mb-load").remove();$j("#mb-window").css({display:"block"});$j(document).keyup(function(l){var i=l.keyCode;if(i==27){ha.ui.modalbox.remove()}})}var f=document.getElementById("mb-iframe");if(document.all){f.document.body.focus()}else{f.contentDocument.body.focus()}}catch(g){}},showIframe:function(){$j("#mb-load").remove();$j("#mb-window").css({display:"block"})},remove:function(){$j("#mb-overlay").unbind("click");$j("#mb-window").fadeOut("fast",function(){$j("#mb-window,#mb-overlay,#mb-hide").remove()});$j("#mb-load").remove();if(typeof document.body.style.maxHeight=="undefined"){$j("body","html").css({height:"auto",width:"auto"});$j("html").css("overflow","")}document.onkeydown="";return false},position:function(){var a=$j(window).height();if(mbHeight>a){$j("#mb-frame-box").css({height:(a-30)+"px",overflow:"scroll"});if(!$j.browser.msie6){$j("#mb-window").css({marginTop:"0px",top:"0"})}}else{$j("#mb-frame-box").css({height:mbHeight+"px",overflow:"visible"});$j("#mb-window").css({marginTop:"-"+parseInt((mbHeight/2),10)+"px",top:"50%"})}$j("#mb-window").css({marginLeft:"-"+parseInt((mbWidth/2),10)+"px",width:mbWidth+"px"})}};
