var ModalDialog=function(D){var G="sf-modalbox-overlay";var J=D&&D.overlayZIndex||(jQuery.browser.msie?19000:15);var I=D&&D.overlayOpacity||0.5;var E=D&&D.overlayBgColor||"#ccc";var H=null;var L=null;function B(){return{x:window.pageXOffset||document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft,y:window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop,w:window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body.clientWidth,h:window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body.clientHeight}}var F="top: 0; left: 0; z-index: "+J+"; display: none;background-color: "+E+";";var A=B();L=jQuery("#"+G);if(L.length<=0){var K=null;if(jQuery.browser.msie){F+="filter: alpha(opacity="+((100*I))+");position: absolute;width:"+(A.x+A.w)+"px;height:"+Math.max(A.y+A.h,jQuery(document.body).height())+"px;";K="<iframe  src='javascript:false' id='"+G+"' style='"+F+"'></iframe>"}else{F+="position:fixed; opacity: "+I+"; width: 100%; height: 100%; ";K="<div id='"+G+"' style='"+F+"'></div>"}jQuery(document.body).prepend(K);if(jQuery.browser.msie){var C=document.getElementById(G).contentWindow.document;C.open();C.write("<html><body style='background-color: "+E+"; filter:alpha(opacity="+(100*I)+");'></body></html>");C.close()}L=jQuery("#"+G)}this.show=function(O){H=O;var N=B();L.css({display:"block"});if(jQuery.browser.msie){L.css({width:N.x+N.w+"px",height:N.y+N.h+"px"})}var M=N.y+100;H.css({display:"block",position:"absolute",visibility:"hidden",zIndex:J+1,top:M+"px"});setTimeout(function(){H.css({left:(N.x+(N.w-H.width())/2)+"px",visibility:"visible"})},100)};this.hide=function(){L.css({display:"none"});H.css({display:"none"})}};
