Problem solved! After doing some reading on javascript I found out that javascript variables cannot start with a number (like the postid).. So I fixed it by adding a prefix to the variable like so:
onClick="java script:showDiv('pf$post[postid] ')"
Now its working.

For those who are interrested, the hack has been released here:
https://vborg.vbsupport.ru/showthrea...threadid=54759