';
exwin();
function exwin() {
nwin = window.open("", "CAIMST-JSH Preview","width=800,height=600");
nwin.document.open();
nwin.document.write("
");
nwin.document.writeln("CAIMST-JSH Preview");
nwin.document.writeln("");
nwin.document.write(R);
nwin.document.write("");
nwin.document.close();
}
}//prvのおわり
function spins(){
var j0=parseInt(document.getElementById("from").value);
var j1=parseInt(document.getElementById("to").value);
if(j199){jlast=99}
for(z=j1+1;z<=jlast;z++){
for(k=1;k<=11;k++){
if(k<10){kk="0"+k.toString()} else{kk=k.toString()}
if(z<10){zz="0"+z.toString()} else{zz=z.toString()}
var x="cell" + zz + kk.toString();
target=document.getElementsByName(x);
target[0].value=hyo[z-j1+j0-1][k];
}
}
}// spins のおわり
function bs(){ //行削除
var j0=parseInt(document.getElementById("from").value);
var j1=parseInt(document.getElementById("to").value);
if(j199){jlast=99}
for(z=j0;z<=jlast;z++){
for(k=1;k<=11;k++){
if(k<10){kk="0"+k.toString()} else{kk=k.toString()}
if(z<10){zz="0"+z.toString()} else{zz=z.toString()}
var x="cell" + zz + kk.toString();
target=document.getElementsByName(x);
target[0].value=hyo[z+j1-j0+1][k];
}
}
}
function cp(){
//問題数
while(j<98){
j++;
if(ji(j,4)==""){break;}
}
jz=j-1;
//表を配列へ読み込み
var j0=parseInt(document.getElementById("from").value);
var j1=parseInt(document.getElementById("to").value);
var z;
var k;
for(z=j0;z<=jz;z++){
hyo[z]=new Array();
for(k=1;k<=11;k++){
hyo[z][k]=ji(z,k);
}
}
}
function cut(){
//問題数
while(j<98){
j++;
if(ji(j,4)==""){break;}
}
jz=j-1;
//表を配列へ読み込み
var j0=parseInt(document.getElementById("from").value);
var j1=parseInt(document.getElementById("to").value);
var z;var zz;
var k;var kk;
var target;
for(z=j0;z<=jz;z++){
hyo[z]=new Array();
for(k=1;k<=11;k++){
hyo[z][k]=ji(z,k);
}
}
//コピーした表を消去
for(z=j0;z<=j1;z++){
for(k=1;k<=11;k++){
if(k<10){kk="0"+k.toString()} else{kk=k.toString()}
if(z<10){zz="0"+z.toString()} else{zz=z.toString()}
var x="cell" + zz + kk.toString();
target=document.getElementsByName(x);
target[0].value="";
}
}
}
function del(){ //行消去
var j0=parseInt(document.getElementById("from").value);
var j1=parseInt(document.getElementById("to").value);
if(j199){jlast=99}
for(z=jto;z<=jlast;z++){
for(k=1;k<=11;k++){
if(k<10){kk="0"+k.toString()} else{kk=k.toString()}
if(z<10){zz="0"+z.toString()} else{zz=z.toString()}
var x="cell" + zz + kk.toString();
target=document.getElementsByName(x);
// alert(x);
target[0].value=hyo[j0+z-jto][k];
}
}
}
function ji(j,i){ //j行i列のセルの値
if(i<10){ii="0"+i.toString()} else{ii=i.toString()}
if(j<10){jj="0"+j.toString()} else{jj=j.toString()}
z=document.myForm["cell" + jj + ii.toString()].value;
return z;
}
function save(){ // コース生成
var data =R;
if (data.length) {
var content = data;
var blob = new Blob([ content ], { "type" : "text/plain" });
if (window.navigator.msSaveBlob) {
window.navigator.msSaveBlob(blob, "caimst-jsh-course.html");
// msSaveOrOpenBlobの場合はファイルを保存せずに開ける
window.navigator.msSaveOrOpenBlob(blob, "caimst-jsh-course.html");
} else {
document.getElementById("gh").href = window.URL.createObjectURL(blob);
}
}
}
function svsrc(){ //ソース保存
//問題数
while(j<98){
j++;
if(ji(j,4)==""){break;} //問題文がなければ終わり
}
jz=j-1;
//表を配列へ読み込み
var j0=parseInt(document.getElementById("from").value);
var j1=parseInt(document.getElementById("to").value);
var z;var zz;
var k;var kk;
var data="";
for(z=j0;z<=jz;z++){
hyo[z]=new Array();
for(k=1;k<=11;k++){
hyo[z][k]=ji(z,k);
data=data+"#"+hyo[z][k];
}
}
var content = data;
var blob = new Blob([ content ], { "type" : "text/plain" });
if (window.navigator.msSaveBlob) {
window.navigator.msSaveBlob(blob, "caimst-jsh-data.jsh");
// msSaveOrOpenBlobの場合はファイルを保存せずに開ける
window.navigator.msSaveOrOpenBlob(blob, "caimst-jsh-data.jsh");
} else {
document.getElementById("dl").href = window.URL.createObjectURL(blob);
}
}
※ 注:コースに 文字「#」は使用できません。You cannot use thecharactor「#」 in
the course ware.