// JavaScript Document
var web_doc_alias = '';
$(document).ready(function(){
	callNotice();

	//ログアウト
	$('#btnLogOut').on('click',function() {
		$('#prgname').val('A001');
		$('#fmMenu').submit();
	});

	//各メニュー
	$('.btn').on('click',function(){
		btnName = $(this).attr('btn-name');
		if (btnName){
			if (btnName == "btnMenu1") {
				submitMenu("A110");
			} else if (btnName == "btnMenu2") {
				submitMenu("A130");
			} else if (btnName == "btnMenu3") {
				submitMenu("A140");
			} else if (btnName == "btnMenu4") {
				submitMenu("A400");
			} else if (btnName == "btnMenu5") {
				submitMenu("A700");
			} else if (btnName == "btnMenu6") {
				submitMenu("A810");
			} else if (btnName == "btnMenu7") {
				submitMenu("A070");
			} else if (btnName == "btnMenu8") {
				submitMenu("A900");
			} else if (btnName == "btnMenu9") {
				submitMenu("A930");
			} else{
			}
		}
	});
});

function callNotice(){
	var param = {
		'appname': nasiappname,
		'prgname':'A090',
		'param1': nasiappname,
		'param2': $('#ssid').val(),
		'arguments':'param1,param2'
	};
	var noticeHtml = ajaxFunctionHtml(param);
	$('#divNotice').append($(noticeHtml).find('#form_A090')[0].innerHTML);
}

function submitMenu(prgname) {
	if(prgname === 'A110'){
		$('#arguments').val('paramAppName,ssid,param1');
		$('#param1').val('A020');
	}else {
		$('#arguments').val('paramAppName,ssid');
		$('#param1').val('');
	}
	$('#prgname').val(prgname);
	$('#fmMenu').submit();
}