Problem when try to move vector feature

Hello!

I created a vector feature on the map. it appears correctly. The code is showing below:

var style={ externalGraphic: “airplane.gif”, graphicWidth: 12, graphicHeight: 14, fillOpacity: 50 };
style.rotation = Math.floor(Math.random() * 360);
var feature=new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(x, y), {angle: planeangle, x_extra: 0, y_extra: 0},style);
vectorLayer.addFeatures([feature]); //it works fine and appears on the map correctly until here

But then I try to move it to a new place, an error occured.

var planeangle = feature.attributes.angle;
if (planeangle >= 180) {
var a = 450-planeangle;
} else {
var a = 90 - planeangle;
}
var newx = feature.geometry.x - Math.cos(aMath.PI/180)/10 + feature.attributes.x_extra;
var newy = feature.geometry.y - Math.sin(a
Math.PI/180)/10 + feature.attributes.y_extra;
var newPoint = new OpenLayers.LonLat(newx, newy);
feature.attributes.angle += Math.floor(Math.random()*20);
if(feature.attributes.angle>360){feature.attributes.angle -= 360;}
feature.move(newPoint);

And the error in the IE says: “Message: Arg: Fraction out of range (0 to 1 allowed)”

I have been stucked here for a whole day. I appreciate any of you comments.

Thanks a million.