We did something similar, we wanted to log the event. We popped the
following code at the end of the function DispDocItemEx in ows.js
and redirected to a writeviewevent.aspx page, parse the url to get
the document name and then via web service check-out the document.
var objSrvHTTP;
objSrvHTTP = new ActiveXObject("msxml2.xmlhttp.3.0");
//var WinSettings
= "center:yes;resizable:no;dialogHeight:300px";
//var ref = "/./_layouts/1033/WriteViewEvent.aspx?href=" +
szHref;
//window.showModalDialog(ref);
objSrvHTTP.open
("GET","ServerName/WriteEvents/WriteViewEvent.aspx?href=" +
szHref,false);
objSrvHTTP.send("");
alert(objSrvHTTP.responseText);
return;
}