This is the new code implemented it solves the problem of the penetrating balls. The only problem now is it's taken away the transfer of momentum
like in the old one when two collided they bounce off in opposite directions whereas in this one they just push each other. Please help me with this last bit. 
Actionscript Code:
function checkBallCollisions() {
for (var i:int = 0; i<Props.length; i++) {
var ballA = Props[i];
for (var j:int = i+1; j<Props.length; j++) {
var ballB = Props[j];
var dx = ballA.xPos+ballA.xVel-ballB.xPos-ballB.xVel;
var dy = ballA.yPos+ballA.yVel-ballB.yPos-ballB.yVel;
var dis = (ballA.Mass+ballB.Mass)/2;
if(dx*dx+dy*dy<dis*dis) {
var angle = Math.atan2(dy,dx);
var tx = dis*Math.cos(angle)-dx;
var ty = dis*Math.sin(angle)-dy;
ballA.xVel += tx*ballA.Mass/(dis*2);
ballA.yVel += ty*ballA.Mass/(dis*2);
ballB.xVel -= tx*ballB.Mass/(dis*2);
ballB.yVel -= ty*ballB.Mass/(dis*2);
}
}
}
}
Thanks in advance.