//追従枠の表示処理 function fun_follow_info() { var totarget = 'follow_info'; var tar1 = document.getElementById(totarget + "_hide"); var if1 = tar1.style.display ; /* 対象Nameの最初のdisplay状態を確認する */ if(if1=='block'){ tar1.style.display = "none" ; button_to_show(totarget) ; } else { tar1.style.display = "block" ; button_to_hide(totarget) ; } } /* function invisible */ // //ボタンのnameは「#対象Name#+"_button"」で処理しているため固定 function fun_invisible(x) { var totarget = x; var tar1 = document.getElementsByName(totarget); var if1 = tar1[0].style.display ; /* 対象Nameの最初のdisplay状態を確認する */ if(if1=='none'){ common_invisible_cancel_td(totarget) ;/*テーブルセル用戻し処理*/ button_to_show(totarget) ; } else { common_invisible(totarget) ; button_to_hide(totarget) ; } } /*ダート用:セルの表示方法も併せて変更*/ function fun_inv_dirt(x) { var totarget = x; var tar1 = document.getElementsByName(totarget); var if1 = tar1[0].style.display ; /* 対象Nameの最初のdisplay状態を確認する */ if(if1=='none'){ common_invisible_cancel_inline(totarget) ; /*inline用表示戻し*/ button_to_show_dirt(totarget) ; dirt_cell_open("nd") ; dirt_cell_open("ngd") ; } else { common_invisible(totarget) ; button_to_hide_dirt(totarget) ; dirt_cell_hide("nd") ; dirt_cell_hide("ngd") ; } } /*汎用非表示ループ処理:(x)へName属性を指定*/ function common_invisible(x) { var totarget = x; var target1 = document.getElementsByName(totarget); var loops = 72 ; if(target1) { target1.forEach( (y) => { y.style.display = 'none'; }); } } /*汎用table-sell表示ループ処理:(x)へName属性を指定*/ function common_invisible_cancel_td(x) { var totarget = x; var target1 = document.getElementsByName(totarget); var loops = 72 ; if(target1){ target1.forEach( (y) => { y.style.display = 'table-cell' ; }); } } /*汎用inline表示ループ処理:(x)へName属性を指定*/ function common_invisible_cancel_inline(x) { var totarget = x; var target1 = document.getElementsByName(totarget); var loops = 72 ; if(target1){ target1.forEach( (y) => { y.style.display = 'inline' ; }); } } /*ボタン処理:薄くする:(x)へName属性を指定*/ function button_to_hide(x) { var totarget = x + '_button'; var target1 = document.getElementsByName(totarget); var loops = 12 ; if(target1){ target1.forEach( (y) => { y.style.opacity = 0.4 ; }); } } /*ボタン処理:薄さを戻す:(x)へName属性を指定*/ function button_to_show(x) { var totarget = x + '_button'; var target1 = document.getElementsByName(totarget); var loops = 12 ; if(target1){ target1.forEach( (y) => { y.style.opacity = 1 ; }); } } /*ダートボタン用の特殊処理*/ /*ボタン処理:薄くする:(x)へName属性を指定*/ function button_to_hide_dirt(x) { var totarget = x + '_button'; var target1 = document.getElementsByName(totarget); var loops = 12 ; if(target1){ target1.forEach( (y) => { y.className ="dirt_button_in"; }); } } /*ボタン処理:薄さを戻す:(x)へName属性を指定*/ function button_to_show_dirt(x) { var totarget = x + '_button'; var target1 = document.getElementsByName(totarget); var loops = 12 ; if(target1){ target1.forEach( (y) => { y.className ="dirt_button"; }); } } /*ダート用処理メモ*/ /*ダートのクラスを変更する*/ //メモ:ByClassNmae → 対象[].className = ;. function dirt_cell_hide(x) { var totarget = x; var target1 = document.getElementsByClassName(totarget); var loops = 72 ; if(target1){ for (let i = 0; i < loops; i++) { var iftarget = target1[0]; if (iftarget==null) { break ; } else { target1[0].className = totarget + "_inv"; } } } } /*ダートのクラスを戻す*/ function dirt_cell_open(x) { var totarget = x; var target1 = document.getElementsByClassName(totarget + "_inv"); var loops = 72 ; if(target1){ for (let i = 0; i < loops; i++) { var iftarget = target1[0]; if (iftarget==null) { break ; } else { target1[0].className = totarget; } } } } /* 対応距離範囲で表示 */ function range_all_open(){ /* 全て開く */ var totarget = "sh"; common_invisible_cancel_td(totarget); button_to_show(totarget) ; var totarget = "ml"; common_invisible_cancel_td(totarget); button_to_show(totarget) ; var totarget = "md"; common_invisible_cancel_td(totarget); button_to_show(totarget) ; var totarget = "lo"; common_invisible_cancel_td(totarget); button_to_show(totarget) ; } function range_abcd(a,b,c,d){ /* 引数指定型 */ range_all_open(); if(a === 0) { var totarget = "sh"; common_invisible(totarget) ; button_to_hide(totarget) ; } if(b === 0) { var totarget = "ml"; common_invisible(totarget) ; button_to_hide(totarget) ; } if(c === 0) { var totarget = "md"; common_invisible(totarget) ; button_to_hide(totarget) ; } if(d === 0) { var totarget = "lo"; common_invisible(totarget) ; button_to_hide(totarget) ; } } function range_sprinter(){/*サクラバクシンオー*/ range_all_open(); var totarget = "md"; common_invisible(totarget) ; button_to_hide(totarget) ; var totarget = "lo"; common_invisible(totarget) ; button_to_hide(totarget) ; } function range_miler(){/*ウオッカ*/ range_all_open(); var totarget = "sh"; common_invisible(totarget) ; button_to_hide(totarget) ; var totarget = "lo"; common_invisible(totarget) ; button_to_hide(totarget) ; } function range_noshort(){/*ダイワスカーレット*/ range_all_open(); var totarget = "sh"; common_invisible(totarget) ; button_to_hide(totarget) ; } function range_stayer(){/*ゴールドシップ*/ range_all_open(); var totarget = "sh"; common_invisible(totarget) ; button_to_hide(totarget) ; var totarget = "ml"; common_invisible(totarget) ; button_to_hide(totarget) ; }