
if(typeof dhtmlwindow=="undefined")
alert('ERROR: Modal Window script requires all files from "DHTML Window widget" in order to work!')
var dhtmlmodal={veilstack:0,open:function(t,contenttype,contentsource,title,attr,recalonload){var d=dhtmlwindow
this.interVeil=document.getElementById("interVeil")
this.veilstack++
this.loadveil()
if(recalonload=="recal"&&d.scroll_top==0)
d.addEvent(window,function(){dhtmlmodal.adjustveil()},"load")
var t=d.open(t,contenttype,contentsource,title,attr,recalonload)
t.controls.firstChild.style.display="none"
t.controls.onclick=function(){dhtmlmodal.close(this._parent,true)}
t.fim.onclick=function(){dhtmlmodal.close(this._parent,true)}
t.show=function(){dhtmlmodal.show(this)}
t.hide=function(){dhtmlmodal.close(this)}
return t},loadveil:function(){var d=dhtmlwindow
d.getviewpoint()
this.docheightcomplete=(d.standardbody.offsetHeight>d.standardbody.scrollHeight)?d.standardbody.offsetHeight:d.standardbody.scrollHeight
this.interVeil.style.width=d.docwidth+"px"
this.interVeil.style.height=this.docheightcomplete+"px"
this.interVeil.style.left=0
this.interVeil.style.top=0
this.interVeil.style.visibility="visible"
this.interVeil.style.display="block"},adjustveil:function(){if(this.interVeil&&this.interVeil.style.display=="block")
this.loadveil()},closeveil:function(){this.veilstack--
if(this.veilstack==0)
this.interVeil.style.display="none"},close:function(t,forceclose){t.contentDoc=(t.contentarea.datatype=="iframe")?window.frames["_iframe-"+t.id].document:t.contentarea
if(typeof forceclose!="undefined")
t.onclose=function(){return true}
if(dhtmlwindow.close(t))
this.closeveil()},show:function(t){dhtmlmodal.veilstack++
dhtmlmodal.loadveil()
dhtmlwindow.show(t)}}
document.write('<div id="interVeil"></div>')
dhtmlwindow.addEvent(window,function(){if(typeof dhtmlmodal!="undefined")dhtmlmodal.adjustveil()},"resize")