     var Baseflg: Bool = false
     var Partsflg: Bool = false
     var Stoneflg: Bool = false
+    var Upperflg: Bool = false
     
     //SelecNailViewControllerからの引数
     var _second:String = ""

        nailImg.image = selectedImage
        nailImg.tintColor = UIColor(red: 255/255, green: 225/255, blue: 230/255, alpha: 255/255)
        
    }
    
    //color button
    internal func BaseColorbtnPush(sender: UIButton){
        switch sender.tag {
        case 0:
            nailImg.tintColor = UIColor(red: 255/255, green: 82/255, blue: 46/255, alpha: 255/255)
        case 1:
            nailImg.tintColor = UIColor(red: 251/255, green: 221/255, blue: 64/255, alpha: 255/255)
        case 2:
            nailImg.tintColor = UIColor(red: 3/255, green: 243/255, blue: 194/255, alpha: 255/255)
        case 3:
            nailImg.tintColor = UIColor(red: 3/255, green: 77/255, blue: 111/255, alpha: 255/255)
        default:
            break // do nothing
        }
        
    }
    
    //select parts button
    internal func SelectPartsbtnPush(sender: UIButton){
        switch sender.tag {
        case 0:
            var iname: String = ""
            if _second == "g_oval.png"{iname = "oval01.png"}
            else if _second == "g_round.png"{iname = "round01.png"}
            else if _second == "g_square.png"{iname = "square01.png"}
            
            //setimageview
            //setPartsView = UIImageView(frame: CGRectMake(0,0,90, 200))
            setPartsView.image = UIImage(named: iname)
            let selectedImage: UIImage = setPartsView.image!.imageWithRenderingMode(.AlwaysTemplate)
            setPartsView.image = selectedImage
            setPartsView.tintColor = UIColor(red: 255/255, green: 0/255, blue: 0/255, alpha: 255/255)
            
            setPartsView.contentMode = UIViewContentMode.ScaleAspectFit
            
        case 1:
            nailImg.tintColor = UIColor(red: 251/255, green: 221/255, blue: 64/255, alpha: 255/255)
        case 2:
            nailImg.tintColor = UIColor(red: 3/255, green: 243/255, blue: 194/255, alpha: 255/255)
        default:
            break // do nothing
        }
    }
    
    //base button

    var basecolor3: UIButton!
    var basecolor4: UIButton!
    
    //upperviewbutton
    var uppercolor1: UIButton!
    var uppercolor2: UIButton!
    var uppercolor3: UIButton!
    var uppercolor4: UIButton!
    
    //partsview button
    var partsbtn1: UIButton!
    var partsbtn2: UIButton!
