Hi

I'm using this function for collision detection. But it doesn't work in IE. Help please...

Code:
function distance(obj1, obj2) {
var difx = obj2.x - obj1.x;
var dify = obj2.y - obj1.y;
return Math.sqrt((difx*difx) + (dify*dify));
};
IE says "SCRIPT5007: Unable to get value of the property 'x': object is null or undefined "