 
     let DEFAULT_BACKGROUND_IMAGE = "2801-11"
     
+    enum direction
+    {
+        case toRight
+        case toLeft
+    }
+    
     var imageBackGround : UIImage!
     var ZERO_TRAILLING_CONSTRAINT : CGFloat!
     var timer1 : NSTimer? = nil
     var FlagPauseAnimation : Bool? = nil
+    var lastPosToReach : CGFloat?
+    var lastDuration : NSTimeInterval?
+    var lastDirection : direction?
+    var secondElapse : Int?
+    var justWakeUp :Bool?
     
 
     @IBOutlet var backgroundImageView: UIImageView!

    func stopanimation(notification :NSNotification)
    {
        FlagPauseAnimation = true
        PauseLayer(self.view.layer)
    }
    

    func resumeanimation(notification :NSNotification)
    {

//        justWakeUp = true
//        self.backImageTrailingConstraint.constant = ZERO_TRAILLING_CONSTRAINT

        self.backImageTrailingConstraint.constant = lastPosToReach!
        ///force layout
        self.view.layoutIfNeeded()
        
        if let letimer = timer1
        {
            if letimer.valid
