How to Display image/icon in the title bar of a window

Hi,
I wanted some pointers on how to display an image/icon, along with the title, in the title bar of a window. Can this be achieved using AppleScript. Any pointers using Cocoa-objective C is also welcome.

Thanks,
M