OnetimeKey	= Math.floor(Math.random() * 999998) + 1;

//フォーム送信フック
function HookSubmit(Form){
	//ワンタイムキー付与
	CreateHiddenParam(Form,"onetime_key",OnetimeKey);
	return true;
}

//SUBMITパラメータ変更
function CustomSubmit(Parent, strAction, strTarget){
	PrevAction		= Parent.action;
	PrevTarget		= Parent.target;
	Parent.action	= strAction;
	Parent.target	= strTarget;
	Parent.submit();
	Parent.action	= PrevAction;
	Parent.target	= PrevTarget;
}

//パラメータ追加
function CreateHiddenParam(FormElem, Name, Value){
	var	KeyElem	= document.createElement('input');
	KeyElem.setAttribute("type",	"hidden");
	KeyElem.setAttribute("name",	Name);
	KeyElem.setAttribute("value",	Value);
	FormElem.appendChild(KeyElem);
}
