     {   
         super.commitCurrentState();
         
-        if (currentState == "down") 
-            borderClass = downBorderSkin;
-        else
-            borderClass = upBorderSkin;
+        borderClass = getBorderClassForCurrentState();
         
         if (!(bgImg is borderClass))
         {

        graphics.drawRect(1, 1, unscaledWidth - 1, unscaledHeight - 1);
        graphics.endFill();
    }

}
}
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5 
     *  @productversion Flex 4.5
     */ 
    protected function drawBackground(unscaledWidth:Number, unscaledHeight:Number):void
    {
