I am testing what happens when I declare variables/methods with var, this, and global, and am wondering what is the best approach. I have the following code:

```
myApp.ConfirmationWindow = function (temptype) {
    var _type = temptype;
    this.type = temptype;
    type2 = temptype;

    this.getType = function () {
        return _type;
    } 

    this.showConfirmationWindow = function (message) {
        var a = _type;  //valid
        var b = this.type; //valid
        var c = type2; // valid
        var d = this.getType(); // valid

        this.showWindow(message);
        showWindow2(message);
        showWindow3(message);
    }

    this.showWindow = function (message) {
      var a = _type;  //valid
      var b = this.type; //valid
      var c = type2; // valid  
      var d = this.getType(); // valid
  }

  showWindow2 = function (message) {
      var a = _type;  //valid
      var b = this.type; //invalid
      var c = type2; // valid
      var d = this.getType(); // invalid
  }

  var showWindow3 = function (message) {
      var a = _type;  //valid
      var b = this.type; //invalid
      var c = type2; // valid
      var d = this.getType(); // invalid
  }
};

```

Usage:
 myApp.ConfirmationWindow1 = new myApp.ConfirmationWindow(1);
 myApp.ConfirmationWindow1.showConfirmationWindow('Are you sure?');

The goal is to have the type variable and the showWindow function private. As you can see from my example, there are a lot of ways to achieve this. What is the recommended way?