DOM Popup kit error

hi,
I’m using the DOM Popup kit to display chromeless popup windows in my
application.
But I’m getting a javascript error as:

Object.extend is not a function.

at the line:

initialize: function(popup, link) {
var options = Object.extend({
modal: false,
effect: ‘fade’,
hidden: true,
closebox: ‘popup_closebox’, // CSS class name of
click-to-close elements.
draghandle: ‘popup_draghandle’ // CSS class name of drag handle
elements.
}, arguments[2] || {});

I read a solution for this that the popup.js file should be loaded at
the last.
But that didn’t work…
Can anyone please suggest…how can I solve this error…
Thank You.