現在アクティブな要素を取得するには、document.activeElement と記述します。Chrome23ではundefinedとなります。
戻り値はオブジェクトになります。
以下、ソースです。
<script language="JavaScript">
<!--
function a(){
alert(document.activeElement.type);
alert(document.activeElement.name);
alert(document.activeElement.id);
}
// -->
</script>