'else' encountered without matching 'if' error

checkTheMouse = function()
{
cursor_mc._x = _xmouse;
cursor_mc._y = _ymouse;

if (_xmouse < centerX-10) 
{ 
 panLeft(cursor_mc.gotoAndStop(2)); 
}

else if (_xmouse > centerX+10 )  
{ 
 panRight(cursor_mc.gotoAndStop(2)); 
}


else if 
{
 dontPan();
}

}

Error Scene=Scene 1, layer=actions, frame=1:Line 27: ‘else’ encountered without matching ‘if’
else if (_xmouse > centerX+10 )

anyone can help with this? =(