An air conditioner, comprising: a blow out port which is formed on a front surface of a cabinet; a panel which is provided for covering the front surface, the panel being capable of being opened both upwardly and downwardly with an upper or a lower shaft as a center; an opening and closing mechanism for opening and closing the panel; a control apparatus which controls the opening and closing mechanism for opening and closing the panel; and a position detecting sensor which detects whether or not the panel is in a closed state, characterised in that: the opening and closing mechanism locks the upper shaft and the lower shaft when the panel is in the closed state, and when the panel being opened downwardly, locks and holds the lower shaft so as to rotate freely and releases the upper shaft and when the panel being opened upwardly, locks and holds the upper shaft so as to rotate freely and releases the lower shaft, the opening and closing mechanism being configured by a moving section which brings the panel close to and away from the cabinet and a regulating section which regulates the opening direction of the panel at the time when the panel is moved; and the control apparatus, when it is detected that the panel is in the closed state at starting an operation, performs an opening operation of the panel without performing an initial operation for bringing the panel into an initial closed state, and when it is detected that the panel is not in the closed state, executes the initial operation and performs an opening operation of the panel after it is detected that the panel is brought into the closed state. a blow out port which is formed on a front surface of a cabinet; a panel which is provided for covering the front surface, the panel being capable of being opened both upwardly and downwardly with an upper or a lower shaft as a center; an opening and closing mechanism for opening and closing the panel; a control apparatus which controls the opening and closing mechanism for opening and closing the panel; and a position detecting sensor which detects whether or not the panel is in a closed state, characterised in that: the opening and closing mechanism locks the upper shaft and the lower shaft when the panel is in the closed state, and when the panel being opened downwardly, locks and holds the lower shaft so as to rotate freely and releases the upper shaft and when the panel being opened upwardly, locks and holds the upper shaft so as to rotate freely and releases the lower shaft, the opening and closing mechanism being configured by a moving section which brings the panel close to and away from the cabinet and a regulating section which regulates the opening direction of the panel at the time when the panel is moved; and the control apparatus, when it is detected that the panel is in the closed state at starting an operation, performs an opening operation of the panel without performing an initial operation for bringing the panel into an initial closed state, and when it is detected that the panel is not in the closed state, executes the initial operation and performs an opening operation of the panel after it is detected that the panel is brought into the closed state. the opening and closing mechanism locks the upper shaft and the lower shaft when the panel is in the closed state, and when the panel being opened downwardly, locks and holds the lower shaft so as to rotate freely and releases the upper shaft and when the panel being opened upwardly, locks and holds the upper shaft so as to rotate freely and releases the lower shaft, the opening and closing mechanism being configured by a moving section which brings the panel close to and away from the cabinet and a regulating section which regulates the opening direction of the panel at the time when the panel is moved; and the control apparatus, when it is detected that the panel is in the closed state at starting an operation, performs an opening operation of the panel without performing an initial operation for bringing the panel into an initial closed state, and when it is detected that the panel is not in the closed state, executes the initial operation and performs an opening operation of the panel after it is detected that the panel is brought into the closed state.