function topmenuOnOff(){
	let password = $("#lock_password"),
		mouseTrackingBox = $("#mouse_tracking"),
		btnPassword = $("#btn_password"),
		valPassword = $("#user_password"),
		worngPassword = $("#worng_password"),
		unlockBox = $("#btn_m_unlockBox");
	$("#btn_m_lock").toggle(function() {
		if ( $(this).is(':visible') == false ){
			password.removeClass('off');
			// it has to be passed password here to open other buttons
			btnPassword.click(function() {
				if ( valPassword.val() === "7796" ) { // password can be changed
					password.addClass('off');
					mouseTrackingBox.addClass('off');
					unlockBox.removeClass('off');
				} else {
					// Show the sentence next to password box
					// when you try to change to alret box, whenever you try to asscess again without reload, it will be repeared
					worngPassword.text("No Authorization");
				}
			})
			detectBtn(lockBox_1, btnSensors, emptyBox_1);
			detectBtn(lockBox_3, btnHistory, emptyBox_3);
			detectBtn(lockBox_4, btnFeature, emptyBox_4);
			detectBtn(lockTbl_1, btnCritical);
			detectBtn(lockTbl_2, btnOprHrs);
			detectBtn(lockTbl_3, btnResources);
			// below function ( detectBtnTbl ) is for inside of table column
			function detectBtnTbl(col, btn) {
				if ( col.hasClass('off') == false ) {
					btn.addClass('on');
				} else {
					btn.removeClass('on');
				}
			}
			detectBtnTbl(drawCol_1, btnReason);
			detectBtnTbl(drawCol_2, btnConfidRate);
		} else {
			valPassword.val('');
			worngPassword.text('');
			mouseTrackingBox.removeClass('off');
			unlockBox.addClass('off');
		}
	});
}
/* 
	Name : topmenuOnOff
	Desc : Only manager can control menus 
	+ 3.Sep.2019 added Password stage
	------------------------------------------------
*/
Name : topmenuOnOff
Desc : Only manager can control menus
+ 3.Sep.2019 added Password stage
Name : topmenuOnOff Desc : Only manager can control menus + 3 . Sep . 2019 added Password stage
function topmenuOnOff(){
	let password = $("#lock_password"),
		mouseTrackingBox = $("#mouse_tracking"),
		btnPassword = $("#btn_password"),
		valPassword = $("#user_password"),
		worngPassword = $("#worng_password"),
		unlockBox = $("#btn_m_unlockBox");
	$("#btn_m_lock").toggle(function() {
		if ( $(this).is(':visible') == false ){
			password.removeClass('off');
			btnPassword.click(function() {
				if ( valPassword.val() === "7796" ) { 
					password.addClass('off');
					mouseTrackingBox.addClass('off');
					unlockBox.removeClass('off');
				} else {
					worngPassword.text("No Authorization");
				}
			})
			detectBtn(lockBox_1, btnSensors, emptyBox_1);
			detectBtn(lockBox_3, btnHistory, emptyBox_3);
			detectBtn(lockBox_4, btnFeature, emptyBox_4);
			detectBtn(lockTbl_1, btnCritical);
			detectBtn(lockTbl_2, btnOprHrs);
			detectBtn(lockTbl_3, btnResources);
			function detectBtnTbl(col, btn) {
				if ( col.hasClass('off') == false ) {
					btn.addClass('on');
				} else {
					btn.removeClass('on');
				}
			}
			detectBtnTbl(drawCol_1, btnReason);
			detectBtnTbl(drawCol_2, btnConfidRate);
		} else {
			valPassword.val('');
			worngPassword.text('');
			mouseTrackingBox.removeClass('off');
			unlockBox.addClass('off');
		}
	});
}
function topmenuOnOff ( ) { let password = $ ( "#lock_password" ) , mouseTrackingBox = $ ( "#mouse_tracking" ) , btnPassword = $ ( "#btn_password" ) , valPassword = $ ( "#user_password" ) , worngPassword = $ ( "#worng_password" ) , unlockBox = $ ( "#btn_m_unlockBox" ) ; $ ( "#btn_m_lock" ) . toggle ( function ( ) { if ( $ ( this ) . is ( ':visible' ) == false ) { password . removeClass ( 'off' ) ; btnPassword . click ( function ( ) { if ( valPassword . val ( ) === "7796" ) { password . addClass ( 'off' ) ; mouseTrackingBox . addClass ( 'off' ) ; unlockBox . removeClass ( 'off' ) ; } else { worngPassword . text ( "No Authorization" ) ; } } ) detectBtn ( lockBox_1 , btnSensors , emptyBox_1 ) ; detectBtn ( lockBox_3 , btnHistory , emptyBox_3 ) ; detectBtn ( lockBox_4 , btnFeature , emptyBox_4 ) ; detectBtn ( lockTbl_1 , btnCritical ) ; detectBtn ( lockTbl_2 , btnOprHrs ) ; detectBtn ( lockTbl_3 , btnResources ) ; function detectBtnTbl ( col , btn ) { if ( col . hasClass ( 'off' ) == false ) { btn . addClass ( 'on' ) ; } else { btn . removeClass ( 'on' ) ; } } detectBtnTbl ( drawCol_1 , btnReason ) ; detectBtnTbl ( drawCol_2 , btnConfidRate ) ; } else { valPassword . val ( '' ) ; worngPassword . text ( '' ) ; mouseTrackingBox . removeClass ( 'off' ) ; unlockBox . addClass ( 'off' ) ; } } ) ; }
Name : topmenuOnOff
Desc : Only manager can control menus
+ 3.Sep.2019 added Password stage
Name : topmenuOnOff Desc : Only manager can control menus + 3 . Sep . 2019 added Password stage
// it has to be passed password here to open other buttons // password can be changed // Show the sentence next to password box // when you try to change to alret box, whenever you try to asscess again without reload, it will be repeared // below function ( detectBtnTbl ) is for inside of table column