SIM0210.js
4.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
//文字コードはEUCで保存すること
jQuery.noConflict();
jQuery(function($) {
//ツールチップ
$(".comclass").tipsy({
gravity: 'w',
fade: true
});
});
//文字コードはEUCで保存すること
var menuDiv1 = new Array();
var menuDiv2 = new Array();
var LinkComments = new Array();
var Lflag = 1;
var scrX = 800;
var scrY = 600;
var ret = "";
function Mover(n){
ret = Get_BName();
if (!event) var event=window.event;
if (!event.pageX) event.pageX = event.clientX + document.body.scrollLeft;
if (!event.pageY) event.pageY = event.clientY + document.body.scrollTop;
// alert("x:" + event.pageX + " y:" + event.pageY);
menuSPAN = document.getElementById("span"+n);
menuDiv = document.getElementById("menu"+n);
if(ret=="POST"){
if (menuDiv.style.visibility == "visible") {
return false;
}
menuDiv.style.visibility = "visible";
menuDiv.style.left = event.pageX - 100;
menuDiv.style.top = event.pageY - 30;
}
if(ret=="GET"){
menuDiv.visibility = "show";
}
}
function Mout(n){
ret = Get_BName();
menuDiv = document.getElementById("menu"+n);
if(ret=="POST"){
menuDiv.style.visibility = "hidden";
}
if(ret=="GET"){
menuDiv.visibility = "hide";
}
}
function chg_lst(flg){
document.frm.target = "_self";
document.frm.action = "SIM0210.php?chgmode="+flg;
document.frm.method="POST";
document.frm.submit();
}
function chk_up(flg){
var txtName1 = "";
var txtName2 = "";
var icnt = 0 ;
if (flg==1) {
txtName1 = "txtin1[]";
}else{
txtName1 = "txtout1[]";
}
if(document.frm.elements[txtName1].length > 0){
icnt = eval(document.frm.elements[txtName1].length);
}else{
icnt = 1;
}
for(i=0;i<icnt;i++){
for(j=1;j<=12;j++){
if (flg==1) {
txtName2 = "txtin"+j+"[]";
}else{
txtName2 = "txtout"+j+"[]";
}
//数値チェック
if (icnt==1){
val = document.frm.elements[txtName2].value;
}else{
val = document.frm.elements[txtName2][i].value;
}
//数値チェック
if (val.match(/[^0-9.]/g) && val != "") {
alert("数値以外が含まれています。");
if (icnt==1){
document.frm.elements[txtName2].focus();
}else{
document.frm.elements[txtName2][i].focus();
}
return false;
}
//マイナスチェック
if (eval(val) < 0) {
alert("負の数は入力できません");
if (icnt==1){
document.frm.elements[txtName2].focus();
}else{
document.frm.elements[txtName2][i].focus();
}
return false;
}
//桁数チェック
if (icnt==1){
val = document.frm.elements[txtName2].value.length;
}else{
val = document.frm.elements[txtName2][i].value.length;
}
if (val > 9) {
alert("金額が大き過ぎます。");
if (icnt==1){
document.frm.elements[txtName2].focus();
}else{
document.frm.elements[txtName2][i].focus();
}
return false;
}
}
}
document.frm.target = "_self";
document.frm.action = "SIM0211.php";
document.frm.method="POST";
document.frm.submit();
}
function cp_money(num,cnt,mode){
if(mode == 1){
name1="txtin"+num+"[]";
name2="txtin"+(num+1)+"[]";
}else if(mode == 2){
name1="txtout"+num+"[]";
name2="txtout"+(num+1)+"[]";
}
if (document.frm.elements[name1].length > 1){
document.frm.elements[name2][cnt].value = document.frm.elements[name1][cnt].value;
}else{
document.frm.elements[name2].value = document.frm.elements[name1].value;
}
}
function cp_tolast(num,cnt,mode){
for(i=num;i<12;i++){
if(mode == 1){
name1="txtin"+i+"[]";
name2="txtin"+(i+1)+"[]";
}else if(mode == 2){
name1="txtout"+i+"[]";
name2="txtout"+(i+1)+"[]";
}
if (document.frm.elements[name1].length > 1){
document.frm.elements[name2][cnt].value = document.frm.elements[name1][cnt].value;
}else{
document.frm.elements[name2].value = document.frm.elements[name1].value;
}
}
}
function Get_BName(){
if (navigator.appName == "Microsoft Internet Explorer"){
return "POST";
}else if (navigator.appName == "Netscape"){
return "GET";
}else{
return "GET";
}
}
function lnk_comment(cnt,sMode,yyyy,mm,bSeq,dSeq,cSeq){
objWin = window.open("" , "subwin", "Width=580, Height=160,status=no,menubar=no,favorites=no,resizable=no");
document.frm.target = "subwin";
document.frm.action = "SIM0220.php?sMode="+sMode+"&yyyy="+yyyy+"&mm="+mm+"&bSeq="+bSeq+"&dSeq="+dSeq+"&cSeq="+cSeq;
document.frm.method = "POST";
document.frm.submit();
}
function lnk_shoukubun(){
location.href = "SIM0820.php";
}
function lnk_list(flg){
document.frm.target = "_self";
document.frm.action = "SIM0200.php?back="+flg;
document.frm.method="POST";
document.frm.submit();
}
function lnk_Table(){
location.href = "SIM0500.php";
}