function ComEvent() {
	this.initialize.apply(this, arguments);
}
ComEvent.prototype = {
    initialize: function(act, action, method, isDblSubmit, target) {
		this.act = "";
		if (act) {
			this.act = act;
		}
		this.action = action;
		this.method = method;
		if (!this.method) {
			this.method = "post";
		}
		this.isDblSubmit = isDblSubmit;
		if (this.isDblSubmit==null || this.isDblSubmit==undefined) {
			this.isDblSubmit = true;
		}
		this.target = target;
		if (this.target==null || this.target==undefined) {
			this.target = "_self";
		}
    },
    execute: function(frm, reqParamNames, reqValues) {
		// リクエストパラメータを設定
		var tempReqParamNames = reqParamNames;
		var tempReqValues = reqValues;
		
		// actを追加
		if (!tempReqParamNames) {
			tempReqParamNames = new Array('act');
			tempReqValues = new Array(this.act);
		}
		else {
			tempReqParamNames.push('act');
			tempReqValues.push(this.act);
		}

		
		if (tempReqParamNames) {
			// パラメータが設定されている場合
			for (var i=0; i<tempReqParamNames.length; i++) {
				//var p = document.getElementsByName(tempReqParamNames[i]);
				//if (p.item(0)) {
				//	// パラメータを設定
				//	p.item(0).value = tempReqValues[i];
				//}
				var p =  eval("frm." + tempReqParamNames[i]);
				if (p) {
					// パラメータを設定
					p.value = tempReqValues[i];
				}
				else {
					// hidden等がない場合
					var elem = document.createElement( 'input' );
					elem.type = 'hidden';
					elem.name = tempReqParamNames[i];
					elem.value = tempReqValues[i];
				    frm.appendChild(elem);
				}
			}
		}
		if (this.action) {
			// アクションが設定されている場合
			frm.action = this.action;
		}
		frm.method = this.method;
		frm.target = this.target;

		try {
			// 送信
			if (this.isDblSubmit) {
				// ２重送信
				checkAndSubmit(frm);
			}
			else {
				// 普通に送信
				frm.submit();
			}
		}
		catch(e) {
			if (e.number == -2147024891) {
				alert(e.message);	//「アクセスが拒否されました。」
			}
		}
    }
};
