今日 明日
2024年12月21日(土)
図書館  9:00-20:00

 
前年2024次年
前月12次月
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
予定なし
 
9:00-20:00
 
9:00-17:00
 
閉館
イベント
アラート
 

図書館からのお知らせ・イベント情報
 
 

"); winprint.document.close(); }catch(e){ winprint.close(); winprint = window.open("", "PrintPreview" , features); if(append_el != undefined) { winprint.print_el = append_el; } winprint.document.open("text/html"); /* ブロック内部のデザインは維持しない */ winprint.document.write("

" + window_name + "

" + linkText + scriptText + ""+"

"+html+scriptTextPrint+"

"); winprint.document.close(); } } function scSiteOpen(id){ document.getElementById("sc_site_open"+id).style.display = 'none'; document.getElementById("sc_site_close"+id).style.display = 'block'; document.getElementById("sc_site_table"+id).style.display = 'block'; } function scSiteClose(id){ document.getElementById("sc_site_open"+id).style.display = 'block'; document.getElementById("sc_site_close"+id).style.display = 'none'; document.getElementById("sc_site_table"+id).style.display = 'none'; } function scSiteCheckAll(id){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = true; }else{ sites[i].checked = false; } } } function scSiteCheck(el,id,gid){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); if(el.checked){ for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = false; break; } } }else{ var all_el = null; var all_flg = true; for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ all_el = sites[i]; }else{ if(sites[i].checked){ all_flg = false; break; } } } if(all_flg){ all_el.checked = true; } } document.getElementById("sc_sitegrp_chk"+gid+id).checked = false; } function scSiteGrpCheck(el,id,gid){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); var grpsites = document.getElementById("sc_sitegrp"+gid+id).getElementsByTagName('input'); if(el.checked){ for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = false; break; } } for(var i = 0; i < grpsites.length; i++){ grpsites[i].checked = true; } }else{ for(var i = 0; i < grpsites.length; i++){ grpsites[i].checked = false; } var all_el = null; var all_flg = true; for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ all_el = sites[i]; }else{ if(sites[i].checked){ all_flg = false; break; } } } if(all_flg){ all_el.checked = true; } } } function scSiteGrpTgl(id,gid){ var grptglArea = document.getElementById("sc_grptgl"+gid+id); var grpsiteArea = document.getElementById("sc_sitegrp"+gid+id); if(grpsiteArea.style.display == "block"){ grpsiteArea.style.display = "none"; grptglArea.innerHTML = grptglArea.innerHTML.replace("minus.png","plus.png"); }else{ grpsiteArea.style.display = "block"; grptglArea.innerHTML = grptglArea.innerHTML.replace("plus.png","minus.png"); } } function sendSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'sc_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; document.getElementById('opt_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_search"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&req_param=" + encodeURIComponent(Form.serialize(form_el)); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendSearch_history(id,tab_num,formkeyno){ document.getElementById('search_page'+id+tab_num).innerHTML = ''; document.getElementById('opt_page'+id+tab_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_search"; param += "&tab_num=" + encodeURIComponent(tab_num); var req_param = "formkeyno="+formkeyno; param += "&req_param=" + encodeURIComponent(req_param); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+tab_num); commonCls.send(params); } function scStatus(id,tab_num,system){ var url = "/iframe.do?block_id=" + encodeURIComponent(id); url += "&tab_num=" + encodeURIComponent(tab_num); url += "&system=" + encodeURIComponent(system); url += "&ufi_flg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $('ajax_area'+id+tab_num); commonCls.send(params); } function scLoading(id,tab_num){ var loading_el = $('loading_area'+id+tab_num); if(loading_el != null){ var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); } } function scResearch(siteid,hitcnt,id,num){ document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var scparam = "&siteid="+encodeURIComponent(siteid); scparam += "&sitehitcnt="+encodeURIComponent(hitcnt); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=rsh&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scSearchStop(id,num){ var scparam = "&siteid=&dispname=&sitehitcnt=&stopflg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=rsh&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scListChange(startno,sort,dispnum,id,num){ document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var scparam = "&startno="+encodeURIComponent(startno); scparam += "&sort="+encodeURIComponent(sort); scparam += "&dispnum="+encodeURIComponent(dispnum); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=lst&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scUsrsrd(siteid,sysno,id,event){ var params = new Object(); params["action"] = "v3search_view_main_usrsrd"; params["siteid"] = siteid; params["sysno"] = sysno; params["prefix_id_name"] = "usrsrd"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scDtlurlCheck(url){ if(url.indexOf("http://") == 0 || url.indexOf("https://") == 0){ window.open(url,"detwin"); }else{ var pattern = new RegExp("^/.*?/"); var url_rep = url.replace(pattern,"/"); var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_sitdtl"+"&url="+encodeURIComponent(url_rep); window.open(baseurl+paramurl,"detwin"); } } function scSubmitLink(sysno,linkurlid,locale) { var url = "/lnkurl.do"; url += "?sysno="+sysno; url += "&linkurlid="+linkurlid; url += "&locale="+locale; url += "&ufi_flg=true"; var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_sitdtl"+"&url="+encodeURIComponent(url); window.open(baseurl+paramurl,"_blank"); } function scLinklistButton(target,area_id){ if(target != "myopac"){ var myopac_el = document.getElementById("myopac"+area_id); if(myopac_el != null){ myopac_el.style.display = "none"; } } if(target != "linkresolver"){ var linkresolver_el = document.getElementById("linkresolver"+area_id); if(linkresolver_el != null){ linkresolver_el.style.display = "none"; } } if(target != "bookstore"){ var bookstore_el = document.getElementById("bookstore"+area_id); if(bookstore_el != null){ bookstore_el.style.display = "none"; } } var list_el = document.getElementById(target+area_id); if(list_el.style.display != "block"){ list_el.style.display = "block"; }else{ list_el.style.display = "none"; } } function scCheckSysno(form_el,func){ var boxs = form_el.sysno_check; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function scDownloadOpen(id,event,form_el){ var sysno = Form.serialize(form_el); if(sysno.indexOf("sysno_check") != -1){ sysno = sysno.replace(/sort.*?dispnum.*?&sysno_check=/,""); sysno = sysno.replace(/&sysno_check=/g,","); var params = new Object(); params["action"] = "v3search_view_main_usrdwl"; params["prefix_id_name"] = "download"; params["downloadSysno"] = sysno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function scDownloadFile(id,downloadSysno,format){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_usrdwlfile"; paramurl += "&downloadSysno=" + encodeURIComponent(downloadSysno); paramurl += "&format=" + encodeURIComponent(format); location.href = baseurl + paramurl; } function scThumbnailAjax(id,tab_num,isbn,target_id){ var url = "/casimg.do?"; url += "block_id="+encodeURIComponent(id); url += "&tab_num="+encodeURIComponent(tab_num); url += "&isbn="+encodeURIComponent(isbn); var loading_el = $(target_id); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target_id); params["callbackfunc"] = function(res){ Element.remove(div); }; commonCls.send(params); } function scMyssts(id,event){ var params = new Object(); params["action"] = "v3search_view_main_myssts"; params["prefix_id_name"] = "myssts"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scMyscmp(id,form_el){ var top_el = $(id); var param = "v3search_action_main_myscmp"; param += "&req_param=" + encodeURIComponent(Form.serialize(form_el)); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["callbackfunc"] = function(res){ commonCls.removeBlock('_myssts'+id); }; commonCls.send(params); } function scMysshh(id){ var top_el = $(id); var params = new Object(); params["param"] = "v3search_view_main_mysshh"; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["target_el"] = $('v3_module'+id); commonCls.send(params); } function scMysexe(id,formno){ var top_el = $(id); var params = new Object(); var param = "v3search_view_main_mysexe"; param += "&formno=" + encodeURIComponent(formno); params["param"] = param; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["target_el"] = $('v3_module'+id); commonCls.send(params); } function scMysexeSrh(id,form_el){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var param = "?action=pages_view_main&active_action=v3search_view_main_init"; param += "&block_id="+encodeURIComponent(id.replace("_","")); param += "&tab_num="+encodeURIComponent(v3searchCls[id].disp_num); var search_mode = ""; if(form_el.keywd == null){ search_mode = "detail"; param += "&search_mode=detail"; } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); location.href = baseurl + param; } function scMysdel(id,form_el,event){ var del_formno = Form.serialize(form_el); if(del_formno.indexOf("del_formno") != -1){ var params = new Object(); params["action"] = "v3search_view_main_mysdel"; params["prefix_id_name"] = "mysdel"; params["del_formno"] = del_formno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("検索条件が選択されていません。"); } } function scCheckDelFormno(form_el,func){ var boxs = form_el.del_formno; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function scBooklistOpen(id,event,form_el){ var sysno = Form.serialize(form_el); if(sysno.indexOf("sysno_check") != -1){ sysno = sysno.replace(/sort.*?dispnum.*?&sysno_check=/,""); sysno = sysno.replace(/&sysno_check=/g,","); var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["prefix_id_name"] = "booklist"; params["sysno"] = sysno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function scBooklistPut(id,list_id,sysno){ var list_name = document.getElementById("booklist_"+list_id+id).innerHTML; if(confirm(list_name + "へ登録します。") == false){ return; } var top_el = $(id); var param = "v3search_action_main_usrbkl"; param += "&list_id=" + encodeURIComponent(list_id); param += "&sysno=" + encodeURIComponent(sysno); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["callbackfunc"] = function(res){ res = res.replace(/\\n/g,"\n"); alert(res); }; commonCls.send(params); } function scBooklistAdd(id,sysno) { var params = new Object(); params["action"] = "v3search_view_main_usrbkl_add"; params["sysno"] = sysno; commonCls.sendView(id, params); } function scBooklistAddCheck(id,form_el) { var top_el = $(id); var param = "booklist_action_main_check"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ if(res == ""){ var top_el = $(id); var param = "v3search_view_main_usrbkl_check"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["top_el"] = top_el; params["target_el"] = top_el; params["loading_el"] = top_el; commonCls.send(params); }else{ alert(res); } }; commonCls.send(params); } function scBooklistAddList(id,form_el){ var top_el = $(id); var param = "v3search_action_main_usrbkl_add"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["callbackfunc"] = function(res){ res = res.replace(/\\n/g,"\n"); alert(res); var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["sysno"] = form_el.sysno.value; commonCls.sendView(id, params); }; commonCls.send(params); } function scBooklistAddListBack(id,form_el){ var top_el = $(id); var param = "v3search_view_main_usrbkl_add"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["top_el"] = top_el; params["target_el"] = top_el; params["loading_el"] = top_el; commonCls.send(params); } function scBooklistChangePage(id, sysno, booklist_start){ var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["sysno"] = sysno; params["booklist_start"] = booklist_start; commonCls.sendView(id, params); } function appendGoogleScript(id, url, callback){ var script = document.createElement("script"); script.src = url + "&callback="+callback; script.type = "text/javascript"; document.getElementById("googlebooks_script"+id).appendChild(script); } function callbackGoogleScript(res){ if(res != null && res.items){ var item = res.items[0]; var link = item.volumeInfo.previewLink; var isbn13 = null; var identifiers = item.volumeInfo.industryIdentifiers; if(identifiers != null){ for(var i = 0 ; identifiers.length > i ; i++){ if(identifiers[i].type == "ISBN_13"){ isbn13 = identifiers[i].identifier; break; } } } var obj = null; while( (obj = document.getElementById("googlebooks_area_"+isbn13) ) != null ){ if(link != null){ obj.href = link; obj.target = "_blank"; } obj.id = isbn13; var desobj = document.getElementById("googlebooks_des_area_"+isbn13); if(desobj != null){ var description = item.volumeInfo.description; if(description != null){ desobj.innerHTML = description; desobj.id = isbn13; } } } } } function isbnsrcButton(id, el_id, isbn, opac_locale){ var top_el = $('opac_isbnsrc' + el_id); var params = new Object(); params["param"] = { "action":"v3search_view_main_holding_isbnsrc", "block_id":id.replace("_",""), "isbn":isbn, "opac_locale":opac_locale }; params["top_el"] = top_el; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ setIsbnResult(res, el_id); }.bind(this); params["callbackfunc_error"] = function(res){ commonCls.alert(res); }.bind(this); commonCls.send(params); } function setIsbnResult(xml, el_id){ // XMLを解析し、リンクを変動 var tagRoot = xml.getElementsByTagName('root'); var tagHeader = tagRoot[0].getElementsByTagName("header"); var tagHitcnt = tagHeader[0].getElementsByTagName('hitcnt'); var hitCnt = tagHitcnt[0].firstChild.nodeValue; var tagMoveEvent = tagRoot[0].getElementsByTagName("moveevent"); var moveevent = tagMoveEvent[0].firstChild.nodeValue; var tagResultMsg = tagRoot[0].getElementsByTagName("resultmsg"); var resultmsg = tagResultMsg[0].firstChild.nodeValue; var el =null; var displayElement = null; var viewHtml = ""; el = $('opac_isbnsrc_result' + el_id); // ヒット数が0の場合 if(hitCnt == 0){ viewHtml = resultmsg; }else{ viewHtml = ""; viewHtml += resultmsg; viewHtml += ""; } el.innerHTML = viewHtml; Element.addClassName($("opac_isbnsrc" + el_id), "display-none"); Element.removeClassName(el, "display-none"); } function casssrcButton(id, el_id, title, autor, opac_locale){ var top_el = $("opac_casssrc" + el_id); var params = new Object(); params["param"] = { "action":"v3search_view_main_holding_casssrc", "block_id":id.replace("_",""), "title":title, "autor":autor, "opac_locale":opac_locale }; params["top_el"] = top_el; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ setCassResult(res, el_id); }.bind(this); params["callbackfunc_error"] = function(res){ commonCls.alert(res); }.bind(this); commonCls.send(params); } function setCassResult(xml, el_id){ // XMLを解析し、リンクを変更 var tagRoot = xml.getElementsByTagName('root'); var tagHeader = tagRoot[0].getElementsByTagName("header"); var tagHitcnt = tagHeader[0].getElementsByTagName('hitcnt'); var hitCnt = tagHitcnt[0].firstChild.nodeValue; var tagMoveEvent = tagRoot[0].getElementsByTagName("moveevent"); var moveevent = tagMoveEvent[0].firstChild.nodeValue; var tagResultMsg = tagRoot[0].getElementsByTagName("resultmsg"); var resultmsg = tagResultMsg[0].firstChild.nodeValue; var el =null; var displayElement = null; var viewHtml = ""; el = $('opac_casssrc_result' + el_id); // ヒット数が0の場合 if(hitCnt == 0){ viewHtml = resultmsg; }else{ viewHtml = ""; viewHtml += resultmsg; viewHtml += ""; } el.innerHTML = viewHtml; Element.addClassName($("opac_casssrc" + el_id), "display-none"); Element.removeClassName(el, "display-none"); } function opacSearchToIsbn(id, isbn){ v3searchCls[id].opac_block_id = id.replace("_",""); var param = "&tab_num=0"; param += "&search_mode=detail"; var isbnEnc = encodeURIComponent(isbn); param += "&op_param="+encodeURIComponent("isbn_issn="+isbnEnc); openWindowOpacPage(id,"v3search_view_main_init",param); } function opacSearchToTitleAndAuth(id, title, autor){ v3searchCls[id].opac_block_id = id.replace("_",""); var param = "&tab_num=0"; param += "&search_mode=detail"; param += "&op_param="+encodeURIComponent("title=" + title + "&auth=" + autor); openWindowOpacPage(id,"v3search_view_main_init",param); } function openWindowOpacPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; var hash = "#" + act; window.open(baseurl + paramurl + param + hash); } function clearCattp(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); cattp[0].checked = true; cattp[1].checked = false; cattp[2].checked = false; cattp[3].checked = false; if(cattp.length == 5 ){ cattp[4].checked = false; } } function cattpCheckEach(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); if(cattp[1].checked == true || cattp[2].checked == true || cattp[3].checked == true || (cattp.length == 5 && cattp[4].checked == true)) { cattp[0].checked = false; }else{ cattp[0].checked = true; } } function clearCattp2(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); cattp[0].checked = false; cattp[1].checked = false; cattp[2].checked = false; cattp[3].checked = true; if(cattp.length == 5 ){ cattp[3].checked = false; cattp[4].checked = true; } } function cattpCheckEach2(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); if(cattp[0].checked == true || cattp[1].checked == true || cattp[2].checked == true || (cattp.length == 5 && cattp[3].checked == true)) { if(cattp.length == 4){ cattp[3].checked = false; }else if(cattp.length == 5){ cattp[4].checked = false; } }else{ if(cattp.length == 4){ cattp[3].checked = true; }else if(cattp.length == 5){ cattp[4].checked = true; } } } function sendEdsSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'eds_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var top_el = $(id); var param = "v3search_action_main_eds"; param += "&" + Form.serialize(form_el); document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function edsChangePage(id,form_id,page){ var form_el = $(form_id); if(form_el != null && form_el["pagenumber"].value != null){ form_el["pagenumber"].value = page; sendEdsSearch(form_el,id); } } function edsFacet(id,form_id,facetact){ var form_el = $(form_id); if(form_el != null && form_el["facetact"].value != null){ form_el["facetact"].value = facetact; sendEdsSearch(form_el,id); } } function scOdrPopup(id, event, siteid, sysno, tab_num, rec_num){ url = "/ufiill.do"; url += "?siteid="+encodeURIComponent(siteid); url += "&sysno="+encodeURIComponent(sysno); url += "&mode=odr"; url += "&tab_num=" + encodeURIComponent(tab_num); var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form != null && Form.serialize(siteid_form) != ""){ url += "&" + Form.serialize(siteid_form); } var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "sc"; params["url"] = url; params["close_btn"] = "false"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scIllPopup(id, event, siteid, sysno, tab_num, rec_num){ url = "/ufiill.do"; url += "?siteid="+encodeURIComponent(siteid); url += "&sysno="+encodeURIComponent(sysno); url += "&mode=ill"; var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form != null && Form.serialize(siteid_form) != ""){ url += "&" + Form.serialize(siteid_form); } var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "sc"; params["url"] = url; params["close_btn"] = "false"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scIllPopupLibsrh(id, event, siteid, sysno, tab_num, rec_num, error_mes){ var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form == null || Form.serialize(siteid_form) == ""){ alert(error_mes); }else{ scIllPopup(id, event, siteid, sysno, tab_num, rec_num); } } //書誌同定処理実行 function scLibsrch(id, tab_num, rec_num, isbn, attgrp_flg) { if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var form_el = document.getElementById("sc_usrlibsrh"+id+tab_num); form_el.event.value = ""; form_el.isbn.value = isbn; var sc_param = Form.serialize(form_el); var libsrh_id = "libsrh"; if(attgrp_flg == true){ libsrh_id = "libattsrh"; sc_param += "&attgrp_flg=true"; } scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; params["callbackfunc"] = function(res){ scLoadingDelete(libsrh_id + '_loading_area' + id + tab_num + rec_num); var json = (new Function("return " + res))(); var status = json["status"]; if(status == "LOAD"){ var message = json["message"]; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = message; var button = json["button"]; //中止ボタンのonclick部分を作成する button = button.replace("onclick=''","onclick=\"scLibsrchStop('" + id + "');return false;\""); $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = button; } setTimeout( function(){scLibsrchReload(id, tab_num, rec_num, attgrp_flg);} ,1000); scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); }.bind(this); //書誌同定処理はロック v3searchCls[id].search_lock = true; commonCls.send(params); } function scLibsrchReload(id, tab_num, rec_num, attgrp_flg) { var form_el = document.getElementById("sc_usrlibsrh"+id+tab_num); form_el.event.value = "getResult"; var sc_param = Form.serialize(form_el); var libsrh_id = "libsrh"; if(attgrp_flg == true){ libsrh_id = "libattsrh"; sc_param += "&attgrp_flg=true"; } var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; params["callbackfunc"] = function(res){ scLoadingDelete(libsrh_id + '_loading_area' + id + tab_num + rec_num); var json = (new Function("return " + res))(); var site_mes = json["site_mes"]; for(var i = 0 ; i < json["site"].length ; i++){ if(json["site"][i]){ site_mes += " " + json["site"][i]; } } $('dsite_area' + id + tab_num + rec_num).innerHTML = site_mes; var status = json["status"]; if(status == "LOAD"){ var message = json["message"]; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = message; var button = json["button"]; //中止ボタンのonclick部分を作成する button = button.replace("onclick=''","onclick=\"scLibsrchStop('" + id + "');return false;\""); $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = button; setTimeout( function(){scLibsrchReload(id, tab_num, rec_num, attgrp_flg);} ,1000); scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); }else{ var message = json["message"]; $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = message; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = ""; var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); siteid_form.innerHTML = ""; for(var i = 0 ; i < json["siteid"].length ; i++){ if(json["siteid"][i]){ var element = document.createElement('input'); element.type = "hidden"; element.name = "owning"; element.value = json["siteid"][i]; siteid_form.appendChild(element); } } //ロック解除 v3searchCls[id].search_lock = false; } }.bind(this); commonCls.send(params); } function scLibsrchStop(id) { var sc_param = "stopflg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; commonCls.send(params); } function scLoadingDisp(loading_id){ var loading_el = $(loading_id); if(loading_el != null){ var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; div_parent.id = "load_div" + loading_id; loading_el.appendChild(div_parent); } } function scLoadingDelete(loading_id){ var loading_el = $(loading_id); var load_div = document.getElementById("load_div" + loading_id); if(loading_el != null && load_div != null){ loading_el.removeChild(load_div); } } function scCreIllPopup(id, event){ var params = new Object(); params["action"] = "v3search_view_main_usrcreill"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function sendSummonSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'summon_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var top_el = $(id); var param = "v3search_action_main_summon"; param += "&" + Form.serialize(form_el); document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function summonChangePage(id,form_id,page){ var form_el = $(form_id); if(form_el != null && form_el["pagenumber"].value != null){ form_el["pagenumber"].value = page; sendSummonSearch(form_el,id); } } function summonChangeList(id,form_id){ var form_el = $(form_id); if(form_el != null){ sendSummonSearch(form_el,id); } } function summonFacet(id,form_id,facetact,rangeflg){ var form_el = $(form_id); if(form_el != null){ if(rangeflg){ form_el["facetactRange"].value = facetact; }else{ form_el["facetact"].value = facetact; } sendSummonSearch(form_el,id); } } function summonFacetRemove(id,form_id,facetremove,rangeflg){ var form_el = $(form_id); if(form_el != null){ if(rangeflg){ form_el["facetremoveRange"].value = facetremove; }else{ form_el["facetremove"].value = facetremove; } sendSummonSearch(form_el,id); } } function summonSuggested(id,suggested){ var tab_num = v3searchCls[id].disp_num; var form_el = document.getElementById('summon_tab_form'+id+tab_num); if(form_el != null){ form_el["keywd"].value = suggested; sendSummonSearch(form_el,id); } } function summonSetExFacet(form_id,target,flg){ var form_el = $(form_id); if(form_el != null && form_el[target] != null){ form_el[target].value = flg; } } function summonConvertKeywd(id,num){ var simple = document.getElementById('summon_tab_form'+id+num); var detail = document.getElementById('summon_tab_detail_form'+id+num); if(simple != null && simple["keywd"] != null && detail != null && detail["keywd"] != null){ detail.reset(); detail["keywd"].value = simple["keywd"].value; } } if(!v3searchCls["_1942"]) { v3searchCls["_1942"] = new clsV3search("_1942"); var opac_block_id = ""; if(opac_block_id != "" && opac_block_id != 0){ v3searchCls["_1942"].opac_block_id = opac_block_id; } setHistoryCheck("_1942"); v3searchCls["_1942"].opac_base_url = ""; } function sendOpacInitPage(id,lang){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?page_id=126"; var param = ""; if(id != null && lang != null){ paramurl = "?action=pages_view_main&active_action=v3search_view_main_init"; param = "&block_id="+id.replace("_","")+"&change_locale="+lang + "&flag_top=top"; } location.href = baseurl + paramurl + param; } function sendOpacSearch(form_el,id,svcaction){ if(v3searchCls[id] == null){ return false; } v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } var op_param = Form.serialize(form_el); for(var i = 0 ; i < form_el.length ; i++){ if(form_el[i].type == "checkbox" && form_el[i].checked == false){ op_param += "&" + form_el[i].name + "="; } } param += "&op_param="+encodeURIComponent(op_param); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } if(v3searchCls[id].disp_num == null){ return false; } var search_page = document.getElementById('search_page'+id+v3searchCls[id].disp_num); if(search_page == null){ return false; } search_page.innerHTML = ''; var opt_page = document.getElementById('opt_page'+id+v3searchCls[id].disp_num); if(opt_page == null){ return false; } opt_page.innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_opac"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&op_param=" + encodeURIComponent(Form.serialize(form_el)); if(svcaction != null && svcaction != ""){ var svcEnc = encodeURIComponent(svcaction); param += encodeURIComponent("&svcaction="+svcEnc); } var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendOpacPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; //トップ画面からの新着案内、貸出ランキング、アクセスランキングの場合 if(act == "v3search_view_main_newlst" || act == "v3search_view_main_beslst" || act == "v3search_view_main_acrlst"){ //「v3search_view_main_」以降を切り出しハッシュとする act = act.replace( "v3search_view_main_", "" ); } var hash = "#" + act; location.href = baseurl + paramurl + param + hash; } function sendOtherSearch(id,act,svcaction,formkeyno){ if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } sendOpacPage(id,"v3search_view_main_"+act,param); }else{ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_"+act; if(svcaction != null){ paramurl += "&svcaction="+encodeURIComponent(svcaction); } if(formkeyno != null){ paramurl += "&formkeyno="+encodeURIComponent(formkeyno); } var hash = "#" + act; location.href = baseurl + paramurl + hash; } } function opacUseFunction(id,loginFlg,form_el,svcaction,locale){ var login_id = "0"; var local_area_code = ""; if(loginFlg == "true" && login_id != "0"){ if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_sso"; params["method"] = "post"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["callbackfunc"] = function(res){ if(res != null){ if(form_el.ufisso_param == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "ufisso_param"; lElement.value = res; form_el.appendChild(lElement); }else{ form_el.ufisso_param.value = res; } } opacPopupConfirm(form_el, null, id); }.bind(this); commonCls.send(params); }else if(loginFlg == "always"){ opacUseFunctionAlways(id,form_el,locale); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction); login_url += "&locale=" + encodeURIComponent(locale); if(local_area_code != ""){ login_url += "&local_area_code=" + encodeURIComponent(local_area_code); } location.href = login_url; } } function opacUseFunctionAlways(id,form_el,locale){ var login_url = v3searchCls[id].opac_base_url + "/opacsnd.do"; var target = form_el.action; opac_target = target.replace(/.*\//,""); if(form_el.opac_target == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "opac_target"; lElement.value = opac_target; form_el.appendChild(lElement); }else{ form_el.opac_target.value = opac_target; } form_el.action = login_url; if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } var local_area_code = ""; if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } form_el.submit(); form_el.action = target; } function opacUseFunctionPopup(id,loginFlg,form_el,svcaction,locale){ var login_id = "0"; var local_area_code = ""; if((loginFlg == "true" && login_id != "0") || loginFlg == "noCheckLogin"){ if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); if(loginFlg == "noCheckLogin"){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = "noCheckLogin"; form_el.appendChild(lElement); } }else{ form_el.locale.value = locale; if(loginFlg == "noCheckLogin"){ form_el.onetime.value = "noCheckLogin"; } } if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var url = form_el.action + "?"; url += Form.serialize(form_el); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(form_el.onetime == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = onetime; form_el.appendChild(lElement); }else{ form_el.onetime.value = onetime; } if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var url = form_el.action + "?"; url += Form.serialize(form_el); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction); login_url += "&locale=" + encodeURIComponent(locale); if(local_area_code != ""){ login_url += "&local_area_code=" + encodeURIComponent(local_area_code); } location.href = login_url; } } function opacUseFunctionPopupAlways(id){ var params = new Object(); params["action"] = "v3search_view_main_login"; params["prefix_id_name"] = "popuplogin"; var pos_x = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; var pos_y = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams["loading_el"] = top_el; popupParams["loading_x"] = pos_x; popupParams["loading_y"] = pos_y; popupParams['modal_flag'] = true; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); } function opacLocaleChange(id,lang){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_init"; var param = "&block_id="+id.replace("_","")+"&change_locale="+lang; location.href = baseurl + paramurl + param; } function sendNiiSearch(form_el,id,svcaction){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendNiiPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; document.getElementById('opt_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_nii"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&op_param=" + encodeURIComponent(Form.serialize(form_el)); if(svcaction != null && svcaction != ""){ var svcEnc = encodeURIComponent(svcaction); param += encodeURIComponent("&svcaction="+svcEnc); } var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendNiiPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; location.href = baseurl + paramurl + param; } function changeHref(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_"+act; var hash = "#" + act; location.href = baseurl + paramurl + param + hash; } function showLnkLstELib(id,lnkfunc,groupno,itemno) { var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_lnkexe&block_id="+id.replace("_",""); var param = ""; param += "&lnkfunc="+lnkfunc; param += "&groupno="+groupno; param += "&itemno="+itemno; location.href = baseurl + paramurl + param; } function sendEndRef(software,form_id,opacurl,target,type,tab_type){ var param = Form.serialize(document.getElementById(form_id)); if(param.indexOf("bibid") != -1){ if(target == "localbiblst"){ param = param.replace(/sortkey.*?listcnt.*?&/,"&"); param = param.replace(/bib/g,""); }else if(target == "niibiblst"){ param = param.replace(/listcnt.*?&/,"&"); param = param.replace(/bib/g,""); }else if (target == "newbest"){ param = param.replace(/cls.*?listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bibid.*?=/g,"&id="); }else if (target == "acrexe"){ param = param.replace(/cls.*?listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bibid.*?=/g,"&id="); }else if (target == "browhis"){ param = param.replace(/listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bib/g,"&"); }else if (target == "linkbiblst"){ param = param.replace(/startpos.*?listcnt.*?&/,"&"); param = param.replace(/bib/g,""); } if(param.indexOf("&") != 0){ param = "&" + param; } var w; w = opacurl; if(software == "refworks"){ w += "/refworks.do?type="; w += type; w += param; window.open(w,"RefWorks"); }else if(software == "endnote"){ w += "/endnote.do?type="; w += type; w += param; if(tab_type != null){ w += "&tab_type="+tab_type; } window.open(w,"EndNote"); } }else{ alert("書誌が選択されていません。"); } } function PopUpOpen(id,event,pop_id,form_el,detailflg){ if(detailflg == "false"){ var param = Form.serialize(form_el); if(param.indexOf("bibid") == -1){ alert("書誌が選択されていません。"); return false; } } var params = new Object(); params["action"] = "v3search_view_main_catexp"; params["prefix_id_name"] = "catexp"; params["popid"] = pop_id; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function opacOpnurl(id,svcaction){ var params = ""; var svcactionstr = ""; var pattern = new RegExp("&","g"); params = params.replace(pattern,"&"); if(svcaction != null){ svcactionstr = "&svcaction=" + svcaction; } var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_opnurl&block_id="+id.replace("_",""); location.href = baseurl + paramurl + params + svcactionstr; } function opacBkmexeDel(id,event,form_id){ var param = Form.serialize(document.getElementById(form_id)); if(param.indexOf("bibid=") != -1){ var pattern = new RegExp("sortkey.*?listcnt.*?&"); var reparam = param.replace(pattern,"&"); reparam = reparam.replace(/bibid/g,"bookmark"); var params = new Object(); params["action"] = "v3search_view_main_bkmexe"; params["op_param"] = "mode=del&"+reparam; params["prefix_id_name"] = "bkmexe"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function tagsrh_sendOpacSearch(form_el, id){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_tagsrh" + "&" + Form.serialize(form_el); location.href = baseurl + paramurl; } function opacSendBibidUse(id,loginFlg,form_id,bibform_id,svcaction,locale,id_name,pkey){ var form_el = document.getElementById(form_id); var param = Form.serialize(form_el); if(pkey == null){ pkey = "bibid"; }else{ pkey = encodeURIComponent(pkey); } if(param.indexOf(pkey+"=") != -1){ if(param.indexOf(pkey+"=") != 0){ var pattern = new RegExp(".*?&"+pkey); var reparam = param.replace(pattern,"&"+pkey); }else{ var reparam = param; } var regexp = new RegExp(pkey+"=","g"); reparam = reparam.replace(regexp,"|"); reparam = reparam.replace(/&/g,""); var bibform = document.getElementById(bibform_id); if(bibform[id_name] != null){ if(bibform[id_name].length){ while(bibform[id_name] != null){ if(bibform[id_name][0]){ bibform.removeChild(bibform[id_name][0]); }else{ bibform.removeChild(bibform[id_name]); } } }else{ bibform.removeChild(bibform[id_name]); } } var bibids = reparam.split("|"); var lElement = null; for(var i = 1 ; i < bibids.length ; i++){ lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = id_name; lElement.value = bibids[i]; bibform.appendChild(lElement); } //ブックマーク限定でポップアップ表示 if(id_name == "bookmark"){ opacUseFunctionPopup(id,loginFlg,bibform,svcaction+reparam,locale); }else{ opacUseFunction(id,loginFlg,bibform,svcaction+reparam,locale); } }else{ alert("書誌が選択されていません。"); } } function opacCatdowPopup(id,form,target,type,formkey,event,output_mode){ var bibid = Form.serialize(form); if(bibid.indexOf("bibid") != -1){ var ajaxflg = v3searchCls[id].hol_disp_flg; if(target == "localbiblst"){ bibid = bibid.replace(/sortkey.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "newbest"){ bibid = bibid.replace(/cls.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); bibid = bibid.replace(/bibid.*?=/g,"bibid="); if(ajaxflg == true){ var tmp = ""; var bibids = form["bibid[]"]; for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != null && bibids[i].checked == true){ var vol = form["VOL_"+i+"_"+bibids[i].value]; if(vol != null){ tmp += "bibid="+bibids[i].value+"\t"+vol.value; }else{ vol = document.getElementById("VOL_"+bibids[i].value); if(vol != null){ tmp += "bibid="+bibids[i].value+"\t"+vol.value; } } } } bibid = tmp; } }else if (target == "acrexe"){ bibid = bibid.replace(/cls.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); bibid = bibid.replace(/bibid.*?=/g,"bibid="); if(ajaxflg == true){ var tmp = ""; var bibids = bibid.split("bibid="); for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != ""){ var vol = document.getElementById("VOL_"+bibids[i]); if(vol != null){ tmp += "bibid="+bibids[i]+"\t"+vol.value; } } } bibid = tmp; } }else if (target == "niibiblst"){ bibid = bibid.replace(/listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "browshis"){ bibid = bibid.replace(/listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "linkbiblst"){ bibid = bibid.replace(/startpos.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); } var url = ""; var tab_num = v3searchCls[id].disp_num; var formkeyno = v3searchCls[id].formList[tab_num]; if(formkey != null){ formkeyno = formkey; } if(formkeyno != null){ url = "formkeyno="+encodeURIComponent(formkeyno); } var params = new Object(); params["action"] = "v3search_view_main_catdow"; params["target"] = "opac"; params["prefix_id_name"] = "catdow"; params["downloadBibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; if(output_mode != null){ var output_param = output_mode; var bescntform = document.getElementById("bescntform"+id); var bibids = form["bibid[]"]; for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != null && bibids[i].checked == true){ var bid = bibids[i].value; if(bescntform[bid+"_"+i] != null){ output_param += "|"+bid+","+bescntform[bid+"_"+i].value; }else if(bescntform[bid] != null){ output_param += "|"+bid+","+bescntform[bid].value; } } } params["output_mode"] = output_param; } var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; if(event == null){ if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } } commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function downloadFile(id,dowtype,downloadbibid,ajaxflg,formkeyno,type,dispflg,output_mode){ if(dowtype == "ref"){ var bibs = downloadbibid.split("bib"); if(bibs.length > 21){ alert("Refer/BibIX形式で出力できるのは20件までです。"); return false; } } commonCls.removeBlock("_catdow"+id); id = id.replace(/_/g,""); var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var url = "?action=v3search_view_main_dowexe"; url += "&block_id=" + id; url += "&downloadbibid=" + encodeURIComponent(downloadbibid); url += "&ajaxflg=" + ajaxflg; url += "&dowtype=" + dowtype; url += "&type=" + type; url += "&dispflg=" + dispflg; url += "&formkeyno=" + formkeyno; if(output_mode != null){ url += "&output_mode=" + encodeURIComponent(output_mode); } location.href = baseurl + url; } function sendMailPopup(id,form_el,opacurl,target,type,loginFlg,locale,formkey,svcaction){ if(svcaction == null){ svcaction = "sendmail"; } var bibid = Form.serialize(form_el); if(bibid.indexOf("bibid") != -1){ if(window.confirm("メールを送信しますか?")){ var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always")){ var ajaxflg = v3searchCls[id].hol_disp_flg; bibid = sendMailBibid(id,target,ajaxflg,bibid); var url = ""; var tab_num = v3searchCls[id].disp_num; var formkeyno = v3searchCls[id].formList[tab_num]; if(formkey != null){ formkeyno = formkey; } if(formkeyno != null){ url = "formkeyno="+encodeURIComponent(formkeyno); } if(loginFlg == "true" && login_id != "0"){ var params = new Object(); params["action"] = "v3search_view_main_malsnd"; params["prefix_id_name"] = "malsnd"; params["bibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(url != ""){ url += "&"; } url += "onetime="+onetime; var params = new Object(); params["action"] = "v3search_view_main_malsnd"; params["prefix_id_name"] = "malsnd"; params["bibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); } }else{ if(target == "localbiblst"){ var reparam = bibid.replace(/sortkey.*?listcnt.*?&/,"&"); reparam = reparam.replace(/bibid=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "newbest"){ var reparam = bibid.replace(/cls.*?listcnt.*?&/,""); reparam = reparam.replace(/bibid.*?=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "niibiblst"){ var reparam = bibid.replace(/listcnt.*?&/,"&"); reparam = reparam.replace(/bibid=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "browshis"){ var reparam = bibid.replace(/&/g,""); reparam = reparam.replace(/bibid=/g,"|"); }else if (target == "linkbiblst"){ var reparam = bibid.replace(/startpos.*?listcnt.*?&/,"&"); reparam = reparam.replace(/&bibid=/g,"|"); } var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction + reparam); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } }else{ alert("書誌が選択されていません。"); } } function opacSendFhts(id, loginFlg, form_id, fhtform_id, locale, id_name){ var histlist = document.getElementById(form_id); var param = Form.serialize(histlist); if(param.indexOf("history=") != -1){ var reparam = param; var regexp = new RegExp("history=","g"); reparam = reparam.replace(regexp,"|"); reparam = reparam.replace(/&/g,""); var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always")){ var fhtform = document.getElementById(fhtform_id); if(fhtform[id_name] != null){ if(fhtform[id_name].length){ while(fhtform[id_name] != null){ fhtform.removeChild(fhtform[id_name][0]); } }else{ fhtform.removeChild(fhtform[id_name]); } } var fhtids = reparam.split("|"); var lElement = null; for(var i = 1 ; i < fhtids.length ; i++){ lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "history"; lElement.value = fhtids[i]; fhtform.appendChild(lElement); } if(loginFlg == "true" && login_id != "0"){ url = fhtform.action + "?"; url += Form.serialize(fhtform); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['center_flag'] = true; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(fhtform.onetime == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = onetime; fhtform.appendChild(lElement); }else{ fhtform.onetime.value = onetime; } url = fhtform.action + "?"; url += Form.serialize(fhtform); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['center_flag'] = true; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); } }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + "hstfht" + reparam); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } else { alert("登録対象となる検索条件が選択されていません。"); return false; } return false; } function opacHstsdi(id,loginFlg,operand1,operand2,operator,mode,locale){ var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always") ){ var url = ""; if(operand1 != null){ url += "&operand1="+encodeURIComponent(operand1); } if(operand2 != null){ url += "&operand2="+encodeURIComponent(operand2); } if(operator != null){ url += "&operator="+encodeURIComponent(operator); } if(mode != null){ url += "&mode="+encodeURIComponent(mode); } var params = "action=v3search_view_main_hstexe&url=" + encodeURIComponent(url); commonCls.sendView(id,params); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; var svcaction = id + "," + "hstsdi"; svcaction += "|" + operand1; svcaction += "|" + operand2; svcaction += "|" + operator; svcaction += "|" + mode; login_url += "&svcaction=" + encodeURIComponent(svcaction); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } function opacV3LoginLink(id,locale){ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } function opacLibuseaskSendComsso(id){ var link = document.getElementById(id); var url = link.href; url = url.replace("http:","https:"); link.href = url; var url = link.href; var opacurl = encodeURIComponent(url); link.href = "?action=v3search_view_main_libusesso&opacurl="+opacurl; link.onclick = ""; } function acrlst_sendOpacSearch(id, form_name){ var top_el = $(id); var params = new Object(); params["method"] = "get"; params["param"] = "action=v3search_view_main_acrlst" + "&" + Form.serialize(form_name); params["top_el"] = top_el; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["target_el"] = top_el; commonCls.send(params); } function acrlst_checkBibid(form_id, func){ var boxs = document.getElementById(form_id).elements['bibid[]']; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function acrlst_opacSetListcnt(listcnt, id, form_name){ var form = document.getElementById(form_name); form.listcnt.value = listcnt; form.stpos.value = "1"; acrlst_sendOpacSearch(id,form_name); } function acrlst_opacSetStartpos(stpos, id, form_name){ var form = document.getElementById(form_name); form.stpos.value = stpos; acrlst_sendOpacSearch(id,form_name); } function opacPopupConfirm(form_el, addFunc, id){ if(id != null && v3searchCls[id].search_lock == true){ setTimeout( function(){opacPopupConfirm(form_el, addFunc, id);} ,1000); }else{ opacPopupConfirmDrawing(form_el, addFunc); } } function opacPopupConfirmDrawing(form_el, addFunc){ var submitFunc = function(){ form_el.submit(); }; var div_el = document.createElement("DIV"); Element.setStyle(div_el, {opacity:0.7}); div_el.id = "_global_full_scale"; div_el.style.backgroundColor = "#666666"; document.body.appendChild(div_el); ufinityShowModal(null, div_el); commonCls.moveVisibleHide(div_el); document.body.style.overflow = "hidden"; var popup = document.getElementById("popup"); if(popup == null){ popup = document.createElement('div'); popup.id = "popup"; popup.style.position = "absolute"; document.body.appendChild(popup); } var tableElement = document.createElement("table"); tableElement.align = "center"; var trElement0 = document.createElement("tr"); var tdElement0 = document.createElement("td"); tdElement0.style.paddingBottom = "30px"; tdElement0.colSpan="2"; tdElement0.appendChild(document.createTextNode("別ウィンドウで画面を開きます。よろしいですか?")); tdElement0.appendChild(document.createElement("BR")); trElement0.appendChild(tdElement0); tableElement.appendChild(trElement0); var trElement1 = document.createElement("tr"); trElement1.align = "center"; var tdElement1 = document.createElement("td"); var tdElement2 = document.createElement("td"); var btnFunc = function(){ commonCls.displayChange(div_el); commonCls.moveVisibleHide(div_el); Element.remove(div_el); commonCls.displayChange(popup); commonCls.moveVisibleHide(popup); Element.remove(popup); document.body.style.overflow = "visible"; }; var btnElement1 = document.createElement('input'); btnElement1.type = "button"; btnElement1.value = "OK"; btnElement1.style.width = "80px"; btnElement1.style.height = "30px"; if(btnElement1.attachEvent){ btnElement1.attachEvent("onclick",btnFunc); btnElement1.attachEvent("onclick",submitFunc); if(addFunc != null){ btnElement1.attachEvent("onclick",addFunc); } }else{ btnElement1.addEventListener("click",btnFunc,true); btnElement1.addEventListener("click",submitFunc,true); if(addFunc != null){ btnElement1.addEventListener("click",addFunc,true); } } tdElement1.appendChild(btnElement1); var btnElement2 = document.createElement('input'); btnElement2.type = "button"; btnElement2.value = "キャンセル"; btnElement2.style.width = "80px"; btnElement2.style.height = "30px"; if(btnElement2.attachEvent){ btnElement2.attachEvent("onclick",btnFunc); if(addFunc != null){ btnElement2.attachEvent("onclick",addFunc); } }else{ btnElement2.addEventListener("click",btnFunc,true); if(addFunc != null){ btnElement2.addEventListener("click",addFunc,true); } } tdElement2.appendChild(btnElement2); trElement1.appendChild(tdElement1); trElement1.appendChild(tdElement2); tableElement.appendChild(trElement1); popup.appendChild(document.createElement("BR")); popup.appendChild(tableElement); popup.className = "opac_round_top opac_round_bottom"; popup.style.zIndex = div_el.style.zIndex + 1; popup.style.width = "350px"; popup.style.height = "120px"; popup.style.backgroundColor = "#FFFFFF"; popup.style.border = "solid 2px black"; popup.style.borderColor = "#cccccc"; var scroll_left = (document.documentElement.scrollLeft || document.body.scrollLeft || 0); var scroll_top = (document.documentElement.scrollTop || document.body.scrollTop || 0); var cx = document.documentElement.clientWidth / 2 + scroll_left; var cy = document.documentElement.clientHeight / 2 + scroll_top; popup.style.left = (cx - 120) + 'px'; popup.style.top = (cy - 100) + 'px'; popup.style.display = 'block'; } function ufinityShowModal(event, el, loading_flag) { el = (event == undefined || event == null) ? el : this; var scroll_left = (document.documentElement.scrollLeft || document.body.scrollLeft || 0); var scroll_top = (document.documentElement.scrollTop || document.body.scrollTop || 0); var offset = 0; var w = Position.getWinOuterWidth(); var h = ufinityGetWinOuterHeight(); el.style.width = (w + scroll_left - offset) +"px"; el.style.height = (h + scroll_top - offset) +"px"; if(loading_flag) { el.style.backgroundColor = "#ff0000"; Element.setStyle(el, {"opacity":0.2}); } el.style.position = "absolute"; el.style.left = "0px"; el.style.top = "0px"; if(event == undefined || (event.type != "scroll" && event.type != "resize")) { commonCls.max_zIndex = commonCls.max_zIndex + 1; el.style.zIndex = commonCls.max_zIndex; commonCls.inModalEvent[el] = ufinityShowModal.bindAsEventListener(el); Event.observe(window,"scroll",commonCls.inModalEvent[el],false); Event.observe(window,"resize",commonCls.inModalEvent[el],false); if(browser.isIE) { var img_blank = document.createElement("img"); img_blank.src = _nc_core_base_url + "/images/common/blank.gif"; el.appendChild(img_blank); } if(browser.isIE) { if(img_blank==undefined) { var img_blank = Element.getChildElement(el); } img_blank.style.width = el.style.width; img_blank.style.height = el.style.height; } } } function ufinityGetWinOuterHeight() { if(document === document.window) { return document.documentElement.clientHeight; } else { var doc; if(document.nodeType == 9) { doc = document.documentElement; return Math.max( document.body.scrollHeight, doc.scrollHeight, document.body.offsetHeight, doc.offsetHeight, doc.clientHeight ); } } return 0; } //カテゴリ絞込み用 function opacCategryOption(action,suffix,id,startpos,sortkey,listcnt,options){ $('v3_module'+id).innerHTML = ""; var url = "&stpos"+suffix+"="+encodeURIComponent(startpos)+"&sortkey"+suffix+"="+encodeURIComponent(sortkey)+"&listcnt"+suffix+"="+encodeURIComponent(listcnt); for(key in options){ url += "&" + key + "Option=" + encodeURIComponent(options[key]); } var params = "action=v3search_view_main_"+action+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } function opacRevcntDtl(id,event,tab_num,bibid,volbr,isbn){ url = "/revsrx.do?key=logoff"; url += "&block_id="+encodeURIComponent(id); url += "&tab_num="+encodeURIComponent(tab_num); url += "&bibid="+encodeURIComponent(bibid); url += "&volbr="+encodeURIComponent(volbr); url += "&isbn="+encodeURIComponent(isbn); url += "&popup_flg=true"; var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["close_btn"] = "true"; params["prefix_id_name"] = "revdtl"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } //投稿者一覧画面表示 function opacRusesra(id, startpos, sortkey, listcnt){ $('v3_module'+id).innerHTML = ""; var url = "&stposRuselsa="+encodeURIComponent(startpos)+"&sortkeyRuselsa="+encodeURIComponent(sortkey)+"&listcntRuselsa="+encodeURIComponent(listcnt); var params = "action=v3search_view_main_rusesra"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } // 特定利用者のレビュー一覧画面表示 function opacRusesrh(id, formkeyno, bibid, volbr, isbn, revid, stpos, sortkey, listcnt, userid, action, needSortkey, needListcnt, needStpos, svcaction){ $('v3_module'+id).innerHTML = ""; var url = ""; if(formkeyno != null){ url += "&formkeyno="+encodeURIComponent(formkeyno); } if(bibid != null){ url += "&pkey="+encodeURIComponent(bibid); } if(volbr != null){ url += "&pkeyVol="+encodeURIComponent(volbr); } if(isbn != null){ url += "&pkeyIsbn="+encodeURIComponent(isbn); } if(revid != null){ url += "&pkeyRevid="+encodeURIComponent(revid); } if(stpos != null){ url += "&stposRuse="+encodeURIComponent(stpos); } if(sortkey != null){ url += "&sortkeyRuse="+encodeURIComponent(sortkey); } if(listcnt != null){ url += "&listcntRuse="+encodeURIComponent(listcnt); } if(userid != null){ url += "&userid="+encodeURIComponent(userid); } if(action != null){ // 遷移元情報を付与(レビュー一覧:Revlsa / レビュー詳細画面:Rev) url += "&targetAction="+encodeURIComponent(action); if(needSortkey != null){ url = url + "&sortkey" + action + "=" + encodeURIComponent(needSortkey); } if(needListcnt != null){ url = url + "&listcnt" + action + "=" + encodeURIComponent(needListcnt); } if(needStpos != null){ url = url + "&stpos" + action + "=" + encodeURIComponent(needStpos); } } if(svcaction != null && svcaction != ""){ url += "&svcaction="+encodeURIComponent(svcaction); } var params = "action=v3search_view_main_rusesrh"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } //レビュー詳細画面表示(投稿者一覧画面、特定利用者のレビュー一覧画面表示経由) function opacRusedbl(id, formkeyno, stposCmt, stposRev, stposRevlsa, action, bibid, volbr, isbn, userid, svcaction,listcnt){ $('v3_module'+id).innerHTML = ""; var url = ""; if(formkeyno != null){ url += "&formkeyno="+encodeURIComponent(formkeyno); } if(stposCmt != null){ url += "&stposCmt="+encodeURIComponent(stposCmt); } if(stposRev != null){ url += "&stposRev="+encodeURIComponent(stposRev); } if(stposRevlsa != null){ url += "&stposRevlsa="+encodeURIComponent(stposRevlsa); } if(listcnt != null){ url += "&listcntRev="+encodeURIComponent(listcnt); } if(action != null){ // 遷移元情報を付与(投稿者一覧画面:rusesra / 特定利用者画面のレビュー一覧画面:rusesrh) url += "&originTransition="+encodeURIComponent(action); } if(bibid != null){ // 書誌ID url += "&pkey="+encodeURIComponent(bibid); } if(volbr != null){ // 巻号 url += "&pkeyVol="+encodeURIComponent(volbr); } if(isbn != null){ // ISBN url += "&pkeyIsbn="+encodeURIComponent(isbn); } if(userid != null){ // 利用者ID url += "&userid="+encodeURIComponent(userid); } if(svcaction != null && svcaction != ""){ url += "&svcaction="+encodeURIComponent(svcaction); } var params = "action=v3search_view_main_revdbl"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } //スタンプ登録画面のポップアップ表示用 function opacStampPopup(id,event,bibid){ var params = new Object(); params["action"] = "v3search_view_main_stppop"; params["prefix_id_name"] = "stamp"; params["bibid"] = bibid; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } //スタンプ登録用 function opacStampExe(id,bibid,stpno){ var top_el = $(id); var param = "v3search_view_main_stpexe"; param += "&bibid=" + encodeURIComponent(bibid); param += "&stpno=" + encodeURIComponent(stpno); var params = new Object(); params["param"] = param; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params['target_el'] = $('opac_stppopup'+id);; commonCls.send(params); } //ボタンの連クリックを抑制 - レビュー一覧と投稿者一覧間の遷移 function DisableButton(obj, ajax_area){ // 非活性化 obj.disabled=true; // ボタンアニメーションを動作させる var loading_el = $(ajax_area); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); // 位置情報を設定 var loading_imege_offset_x = 8; var loading_imege_offset_y = 16; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); } // Local書誌詳細に関連資料(別巻号)を表示する function opacRelbibAjaxLocal(id,bibid,target,refFlg){ var url = null; if(refFlg == "true"){ // 並列書誌 url = "/ajaxrelbiblcl.do?"; }else{ // 別巻号 url = "/ajaxathvollcl.do?"; } url += "bibid="+encodeURIComponent(bibid); url += "&block_id="+id.replace("_",""); var top_el = $(id); var params = new Object(); var loading_el = $(target); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target); commonCls.send(params); } // NII書誌詳細に関連資料(並列書誌・別巻号)を表示する function opacRelbibAjaxNii(id,ncid,target,refFlg){ var url = null; if(refFlg == "true"){ // 並列書誌 url = "/ajaxrelbibnii.do?"; }else{ // 別巻号 url = "/ajaxathvolnii.do?"; } url += "ncid="+encodeURIComponent(ncid); url += "&block_id="+id.replace("_",""); var top_el = $(id); var params = new Object(); var loading_el = $(target); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target); commonCls.send(params); } function dspclvBytogid(form_id, action, bibid, togid, stposTog,chkhol){ var w; document.getElementById(form_id).action=action; document.getElementById(form_id).target='Dspclv'; document.getElementById(form_id).pkey.value=bibid; document.getElementById(form_id).pkeyTog.value=togid; document.getElementById(form_id).stposTog.value=stposTog; document.getElementById(form_id).chkhol.value=chkhol; w = window.open("", document.getElementById(form_id).target, "location=yes, toolbar=no, directories=no, menubar=no, status=no, resizable=yes, scrollbars=yes, width=225,height=520"); document.getElementById(form_id).hitcntTog.value='1000000'; document.getElementById(form_id).initFlg.value=''; document.getElementById(form_id).submit(); document.getElementById(form_id).target=''; w.focus(); } function opacClnBlockPlus(value_cln,delimiter,callno_cnt,clnlabel_pri,event){ //請求記号1 var cln1 = ""; //請求記号2 var cln2 = ""; //請求記号3 var cln3 = ""; //請求記号4 var cln4 = ""; //請求記号5 var cln5 = ""; //delimiterで請求記号値を分ける var clnArray = value_cln.split(delimiter); //請求記号1があれば cln1 = opacClnsChk(clnArray[0]); //請求記号2があれば cln2 = opacClnsChk(clnArray[1]); //請求記号3があれば cln3 = opacClnsChk(clnArray[2]); //請求記号4があれば cln4 = opacClnsChk(clnArray[3]); //請求記号5があれば cln5 = opacClnsChk(clnArray[4]); //請求記号1、2、3、4、5のいずれがあれば、ポップ画面を表示する if(cln1!=" "||cln2!=" "||cln3!=" "||cln4!=" "||cln5!=" "){ //表示内容を編集 var content = ""; var clnArray_new = new Array(5); clnArray_new[0] = cln1; clnArray_new[1] = cln2; clnArray_new[2] = cln3; clnArray_new[3] = cln4; clnArray_new[4] = cln5; //段数の登録データ優先フラグが有効な場合 if(clnlabel_pri == "true"){ var data_cnt = 0; //cln5に値があれば5段表示 if(cln5!=" "){ data_cnt = 5; } //cln4に値があれば4段表示 else if(cln4!=" "){ data_cnt = 4; } //cln3に値があれば3段表示 else if(cln3!=" "){ data_cnt = 3; } //cln2に値があれば2段表示 else if(cln2!=" "){ data_cnt = 2; } //登録データ数がcallno_cntより多ければそちらを優先 if(data_cnt > callno_cnt){ callno_cnt = data_cnt; } } //ラベル内容の構築 content += "

"; for(var i = 0 ; i < callno_cnt ; i++){ //最後の行の場合に、Endのタグを付く if(i + 1 == callno_cnt){ content += ""; content += "
" + clnArray_new[i] + "
"; //最後の行ではない場合に、表示クラスを指定して、下線を表示する }else{ content += "

" + clnArray_new[i] + "

"; } } var cln_popup = document.getElementById("cln_popup"); if(cln_popup == null){ cln_popup = document.createElement('div'); cln_popup.id = "cln_popup"; cln_popup.style.position = "absolute"; document.body.appendChild(cln_popup); } cln_popup.innerHTML = content; var cx = event.clientX + (document.body.scrollLeft || document.documentElement.scrollLeft); var cy = event.clientY + (document.body.scrollTop || document.documentElement.scrollTop); cln_popup.style.left = (cx + 6) + 'px'; cln_popup.style.top = (cy + 6) + 'px'; cln_popup.style.display = 'block'; } } function opacNoteBlock(id,event,note){ var note_popup = document.getElementById("_note_popup"+id); if(note_popup != null){ commonCls.removeBlock("_note_popup"+id); } var params = new Object(); params["action"] = "v3search_view_main_popmes"; params["message"] = note; params["prefix_id_name"] = "note_popup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; commonCls.sendPopupView(event, params, popupParams); } function opacFtfsrhAjax(bibid,stposVol,id,ajax_area){ url = "/ftfsrh.do?"; url += "bibid="+encodeURIComponent(bibid); url += "&stposVol="+encodeURIComponent(stposVol); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["loading_el"] = $(ajax_area); params["top_el"] = top_el; params["target_el"] = $(ajax_area); commonCls.send(params); } function dspclvByholidLocal(form_id, action, bibid, holid, stposHol, local_area_code){ var w; document.getElementById(form_id).action=action; document.getElementById(form_id).target='Dspclv'; document.getElementById(form_id).pkey.value=bibid; document.getElementById(form_id).pkeyHol.value=holid; document.getElementById(form_id).stposHol.value=stposHol; document.getElementById(form_id).local_area_code.value=local_area_code; w = window.open("", document.getElementById(form_id).target, "location=yes, toolbar=no, directories=no, menubar=no, status=no, resizable=yes, scrollbars=yes, width=225,height=520"); document.getElementById(form_id).hitcntHol.value=''; document.getElementById(form_id).initFlg.value=''; document.getElementById(form_id).submit(); document.getElementById(form_id).target=''; w.focus(); } /** * プリント用共通メソッド * * @param el 印刷したいエレメント(el or string)(必須) * @param width プレビュー画面の広さ default:600 * @param height プレビュー画面の高さ default:600 * @param header_flag プレビュー画面の閉じる等のヘッダー表示 default:true * @param window_name プレビュー画面のWindowタイトル * @return none **/ function v3searchPrint(el, width, height, header_flag, window_name) { width = (width == undefined) ? 600 : width; height = (height == undefined) ? 600 : height; header_flag = (header_flag == undefined) ? true : header_flag; window_name = (window_name == undefined) ? commonLang.printTitle : window_name; if(header_flag) { //egdeの場合のみ閉じるボタンの処理を変える if(browser.isEdge) { var html = "

"+commonLang.close+""+ commonLang.separator+""+commonLang.print+"

"; } else { var html = "

"+commonLang.close+""+ commonLang.separator+""+commonLang.print+"

"; } } else { var html = ""; } var print_script = ""; var disabled_script = "window.opener.commonCls.disableLink(document.body, \"print_btn\", true);"; var re_script = new RegExp('((.|\n|\r|\t)*?)<\/script>', 'ig'); if(typeof el == 'string') { html += "

"; html += el.replace(re_script,""); } else { if(!el.id) { var print_id = "_global_print_el"; el.id = print_id; } else { var print_id = el.id; } html += "
"; //egdeは個別判定で分岐しdivタブを構成 if(browser.isEdge) { html += el.innerHTML.replace(re_script,""); } else if(!browser.isGecko) { html += el.innerHTML.replace(re_script,""); } else { var append_el = el.cloneNode(true); print_script = "document.getElementById('"+print_id+"').appendChild(print_el);"+disabled_script; } } html += "
"; var features="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no"; if (width) { if (window.screen.width > width) features+=", left="+(window.screen.width-width)/2; else width=window.screen.width; features += ", width="+width; } if (height) { if (window.screen.height > height) features+=", top="+(window.screen.height-height)/2; else height=window.screen.height; features+=", height="+height; } var head = document.getElementsByTagName("head")[0]; var links = head.getElementsByTagName("link"); var linkText = ""; linkText += ""; for (var i = 0; i < links.length; i++) { var link = links[i]; if (link.getAttribute("type") == "text/css") { linkText += "\n"; } } var scriptText = ''; if(print_script == "") { var scriptTextPrint = "

"); winprint.document.close(); }catch(e){ winprint.close(); winprint = window.open("", "PrintPreview" , features); if(append_el != undefined) { winprint.print_el = append_el; } winprint.document.open("text/html"); /* ブロック内部のデザインは維持しない */ winprint.document.write("

" + window_name + "

" + linkText + scriptText + ""+"

"+html+scriptTextPrint+"

"); winprint.document.close(); } } function scSiteOpen(id){ document.getElementById("sc_site_open"+id).style.display = 'none'; document.getElementById("sc_site_close"+id).style.display = 'block'; document.getElementById("sc_site_table"+id).style.display = 'block'; } function scSiteClose(id){ document.getElementById("sc_site_open"+id).style.display = 'block'; document.getElementById("sc_site_close"+id).style.display = 'none'; document.getElementById("sc_site_table"+id).style.display = 'none'; } function scSiteCheckAll(id){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = true; }else{ sites[i].checked = false; } } } function scSiteCheck(el,id,gid){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); if(el.checked){ for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = false; break; } } }else{ var all_el = null; var all_flg = true; for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ all_el = sites[i]; }else{ if(sites[i].checked){ all_flg = false; break; } } } if(all_flg){ all_el.checked = true; } } document.getElementById("sc_sitegrp_chk"+gid+id).checked = false; } function scSiteGrpCheck(el,id,gid){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); var grpsites = document.getElementById("sc_sitegrp"+gid+id).getElementsByTagName('input'); if(el.checked){ for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = false; break; } } for(var i = 0; i < grpsites.length; i++){ grpsites[i].checked = true; } }else{ for(var i = 0; i < grpsites.length; i++){ grpsites[i].checked = false; } var all_el = null; var all_flg = true; for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ all_el = sites[i]; }else{ if(sites[i].checked){ all_flg = false; break; } } } if(all_flg){ all_el.checked = true; } } } function scSiteGrpTgl(id,gid){ var grptglArea = document.getElementById("sc_grptgl"+gid+id); var grpsiteArea = document.getElementById("sc_sitegrp"+gid+id); if(grpsiteArea.style.display == "block"){ grpsiteArea.style.display = "none"; grptglArea.innerHTML = grptglArea.innerHTML.replace("minus.png","plus.png"); }else{ grpsiteArea.style.display = "block"; grptglArea.innerHTML = grptglArea.innerHTML.replace("plus.png","minus.png"); } } function sendSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'sc_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; document.getElementById('opt_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_search"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&req_param=" + encodeURIComponent(Form.serialize(form_el)); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendSearch_history(id,tab_num,formkeyno){ document.getElementById('search_page'+id+tab_num).innerHTML = ''; document.getElementById('opt_page'+id+tab_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_search"; param += "&tab_num=" + encodeURIComponent(tab_num); var req_param = "formkeyno="+formkeyno; param += "&req_param=" + encodeURIComponent(req_param); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+tab_num); commonCls.send(params); } function scStatus(id,tab_num,system){ var url = "/iframe.do?block_id=" + encodeURIComponent(id); url += "&tab_num=" + encodeURIComponent(tab_num); url += "&system=" + encodeURIComponent(system); url += "&ufi_flg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $('ajax_area'+id+tab_num); commonCls.send(params); } function scLoading(id,tab_num){ var loading_el = $('loading_area'+id+tab_num); if(loading_el != null){ var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); } } function scResearch(siteid,hitcnt,id,num){ document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var scparam = "&siteid="+encodeURIComponent(siteid); scparam += "&sitehitcnt="+encodeURIComponent(hitcnt); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=rsh&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scSearchStop(id,num){ var scparam = "&siteid=&dispname=&sitehitcnt=&stopflg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=rsh&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scListChange(startno,sort,dispnum,id,num){ document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var scparam = "&startno="+encodeURIComponent(startno); scparam += "&sort="+encodeURIComponent(sort); scparam += "&dispnum="+encodeURIComponent(dispnum); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=lst&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scUsrsrd(siteid,sysno,id,event){ var params = new Object(); params["action"] = "v3search_view_main_usrsrd"; params["siteid"] = siteid; params["sysno"] = sysno; params["prefix_id_name"] = "usrsrd"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scDtlurlCheck(url){ if(url.indexOf("http://") == 0 || url.indexOf("https://") == 0){ window.open(url,"detwin"); }else{ var pattern = new RegExp("^/.*?/"); var url_rep = url.replace(pattern,"/"); var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_sitdtl"+"&url="+encodeURIComponent(url_rep); window.open(baseurl+paramurl,"detwin"); } } function scSubmitLink(sysno,linkurlid,locale) { var url = "/lnkurl.do"; url += "?sysno="+sysno; url += "&linkurlid="+linkurlid; url += "&locale="+locale; url += "&ufi_flg=true"; var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_sitdtl"+"&url="+encodeURIComponent(url); window.open(baseurl+paramurl,"_blank"); } function scLinklistButton(target,area_id){ if(target != "myopac"){ var myopac_el = document.getElementById("myopac"+area_id); if(myopac_el != null){ myopac_el.style.display = "none"; } } if(target != "linkresolver"){ var linkresolver_el = document.getElementById("linkresolver"+area_id); if(linkresolver_el != null){ linkresolver_el.style.display = "none"; } } if(target != "bookstore"){ var bookstore_el = document.getElementById("bookstore"+area_id); if(bookstore_el != null){ bookstore_el.style.display = "none"; } } var list_el = document.getElementById(target+area_id); if(list_el.style.display != "block"){ list_el.style.display = "block"; }else{ list_el.style.display = "none"; } } function scCheckSysno(form_el,func){ var boxs = form_el.sysno_check; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function scDownloadOpen(id,event,form_el){ var sysno = Form.serialize(form_el); if(sysno.indexOf("sysno_check") != -1){ sysno = sysno.replace(/sort.*?dispnum.*?&sysno_check=/,""); sysno = sysno.replace(/&sysno_check=/g,","); var params = new Object(); params["action"] = "v3search_view_main_usrdwl"; params["prefix_id_name"] = "download"; params["downloadSysno"] = sysno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function scDownloadFile(id,downloadSysno,format){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_usrdwlfile"; paramurl += "&downloadSysno=" + encodeURIComponent(downloadSysno); paramurl += "&format=" + encodeURIComponent(format); location.href = baseurl + paramurl; } function scThumbnailAjax(id,tab_num,isbn,target_id){ var url = "/casimg.do?"; url += "block_id="+encodeURIComponent(id); url += "&tab_num="+encodeURIComponent(tab_num); url += "&isbn="+encodeURIComponent(isbn); var loading_el = $(target_id); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target_id); params["callbackfunc"] = function(res){ Element.remove(div); }; commonCls.send(params); } function scMyssts(id,event){ var params = new Object(); params["action"] = "v3search_view_main_myssts"; params["prefix_id_name"] = "myssts"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scMyscmp(id,form_el){ var top_el = $(id); var param = "v3search_action_main_myscmp"; param += "&req_param=" + encodeURIComponent(Form.serialize(form_el)); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["callbackfunc"] = function(res){ commonCls.removeBlock('_myssts'+id); }; commonCls.send(params); } function scMysshh(id){ var top_el = $(id); var params = new Object(); params["param"] = "v3search_view_main_mysshh"; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["target_el"] = $('v3_module'+id); commonCls.send(params); } function scMysexe(id,formno){ var top_el = $(id); var params = new Object(); var param = "v3search_view_main_mysexe"; param += "&formno=" + encodeURIComponent(formno); params["param"] = param; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["target_el"] = $('v3_module'+id); commonCls.send(params); } function scMysexeSrh(id,form_el){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var param = "?action=pages_view_main&active_action=v3search_view_main_init"; param += "&block_id="+encodeURIComponent(id.replace("_","")); param += "&tab_num="+encodeURIComponent(v3searchCls[id].disp_num); var search_mode = ""; if(form_el.keywd == null){ search_mode = "detail"; param += "&search_mode=detail"; } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); location.href = baseurl + param; } function scMysdel(id,form_el,event){ var del_formno = Form.serialize(form_el); if(del_formno.indexOf("del_formno") != -1){ var params = new Object(); params["action"] = "v3search_view_main_mysdel"; params["prefix_id_name"] = "mysdel"; params["del_formno"] = del_formno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("検索条件が選択されていません。"); } } function scCheckDelFormno(form_el,func){ var boxs = form_el.del_formno; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function scBooklistOpen(id,event,form_el){ var sysno = Form.serialize(form_el); if(sysno.indexOf("sysno_check") != -1){ sysno = sysno.replace(/sort.*?dispnum.*?&sysno_check=/,""); sysno = sysno.replace(/&sysno_check=/g,","); var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["prefix_id_name"] = "booklist"; params["sysno"] = sysno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function scBooklistPut(id,list_id,sysno){ var list_name = document.getElementById("booklist_"+list_id+id).innerHTML; if(confirm(list_name + "へ登録します。") == false){ return; } var top_el = $(id); var param = "v3search_action_main_usrbkl"; param += "&list_id=" + encodeURIComponent(list_id); param += "&sysno=" + encodeURIComponent(sysno); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["callbackfunc"] = function(res){ res = res.replace(/\\n/g,"\n"); alert(res); }; commonCls.send(params); } function scBooklistAdd(id,sysno) { var params = new Object(); params["action"] = "v3search_view_main_usrbkl_add"; params["sysno"] = sysno; commonCls.sendView(id, params); } function scBooklistAddCheck(id,form_el) { var top_el = $(id); var param = "booklist_action_main_check"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ if(res == ""){ var top_el = $(id); var param = "v3search_view_main_usrbkl_check"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["top_el"] = top_el; params["target_el"] = top_el; params["loading_el"] = top_el; commonCls.send(params); }else{ alert(res); } }; commonCls.send(params); } function scBooklistAddList(id,form_el){ var top_el = $(id); var param = "v3search_action_main_usrbkl_add"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["callbackfunc"] = function(res){ res = res.replace(/\\n/g,"\n"); alert(res); var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["sysno"] = form_el.sysno.value; commonCls.sendView(id, params); }; commonCls.send(params); } function scBooklistAddListBack(id,form_el){ var top_el = $(id); var param = "v3search_view_main_usrbkl_add"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["top_el"] = top_el; params["target_el"] = top_el; params["loading_el"] = top_el; commonCls.send(params); } function scBooklistChangePage(id, sysno, booklist_start){ var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["sysno"] = sysno; params["booklist_start"] = booklist_start; commonCls.sendView(id, params); } function appendGoogleScript(id, url, callback){ var script = document.createElement("script"); script.src = url + "&callback="+callback; script.type = "text/javascript"; document.getElementById("googlebooks_script"+id).appendChild(script); } function callbackGoogleScript(res){ if(res != null && res.items){ var item = res.items[0]; var link = item.volumeInfo.previewLink; var isbn13 = null; var identifiers = item.volumeInfo.industryIdentifiers; if(identifiers != null){ for(var i = 0 ; identifiers.length > i ; i++){ if(identifiers[i].type == "ISBN_13"){ isbn13 = identifiers[i].identifier; break; } } } var obj = null; while( (obj = document.getElementById("googlebooks_area_"+isbn13) ) != null ){ if(link != null){ obj.href = link; obj.target = "_blank"; } obj.id = isbn13; var desobj = document.getElementById("googlebooks_des_area_"+isbn13); if(desobj != null){ var description = item.volumeInfo.description; if(description != null){ desobj.innerHTML = description; desobj.id = isbn13; } } } } } function isbnsrcButton(id, el_id, isbn, opac_locale){ var top_el = $('opac_isbnsrc' + el_id); var params = new Object(); params["param"] = { "action":"v3search_view_main_holding_isbnsrc", "block_id":id.replace("_",""), "isbn":isbn, "opac_locale":opac_locale }; params["top_el"] = top_el; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ setIsbnResult(res, el_id); }.bind(this); params["callbackfunc_error"] = function(res){ commonCls.alert(res); }.bind(this); commonCls.send(params); } function setIsbnResult(xml, el_id){ // XMLを解析し、リンクを変動 var tagRoot = xml.getElementsByTagName('root'); var tagHeader = tagRoot[0].getElementsByTagName("header"); var tagHitcnt = tagHeader[0].getElementsByTagName('hitcnt'); var hitCnt = tagHitcnt[0].firstChild.nodeValue; var tagMoveEvent = tagRoot[0].getElementsByTagName("moveevent"); var moveevent = tagMoveEvent[0].firstChild.nodeValue; var tagResultMsg = tagRoot[0].getElementsByTagName("resultmsg"); var resultmsg = tagResultMsg[0].firstChild.nodeValue; var el =null; var displayElement = null; var viewHtml = ""; el = $('opac_isbnsrc_result' + el_id); // ヒット数が0の場合 if(hitCnt == 0){ viewHtml = resultmsg; }else{ viewHtml = ""; viewHtml += resultmsg; viewHtml += ""; } el.innerHTML = viewHtml; Element.addClassName($("opac_isbnsrc" + el_id), "display-none"); Element.removeClassName(el, "display-none"); } function casssrcButton(id, el_id, title, autor, opac_locale){ var top_el = $("opac_casssrc" + el_id); var params = new Object(); params["param"] = { "action":"v3search_view_main_holding_casssrc", "block_id":id.replace("_",""), "title":title, "autor":autor, "opac_locale":opac_locale }; params["top_el"] = top_el; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ setCassResult(res, el_id); }.bind(this); params["callbackfunc_error"] = function(res){ commonCls.alert(res); }.bind(this); commonCls.send(params); } function setCassResult(xml, el_id){ // XMLを解析し、リンクを変更 var tagRoot = xml.getElementsByTagName('root'); var tagHeader = tagRoot[0].getElementsByTagName("header"); var tagHitcnt = tagHeader[0].getElementsByTagName('hitcnt'); var hitCnt = tagHitcnt[0].firstChild.nodeValue; var tagMoveEvent = tagRoot[0].getElementsByTagName("moveevent"); var moveevent = tagMoveEvent[0].firstChild.nodeValue; var tagResultMsg = tagRoot[0].getElementsByTagName("resultmsg"); var resultmsg = tagResultMsg[0].firstChild.nodeValue; var el =null; var displayElement = null; var viewHtml = ""; el = $('opac_casssrc_result' + el_id); // ヒット数が0の場合 if(hitCnt == 0){ viewHtml = resultmsg; }else{ viewHtml = ""; viewHtml += resultmsg; viewHtml += ""; } el.innerHTML = viewHtml; Element.addClassName($("opac_casssrc" + el_id), "display-none"); Element.removeClassName(el, "display-none"); } function opacSearchToIsbn(id, isbn){ v3searchCls[id].opac_block_id = id.replace("_",""); var param = "&tab_num=0"; param += "&search_mode=detail"; var isbnEnc = encodeURIComponent(isbn); param += "&op_param="+encodeURIComponent("isbn_issn="+isbnEnc); openWindowOpacPage(id,"v3search_view_main_init",param); } function opacSearchToTitleAndAuth(id, title, autor){ v3searchCls[id].opac_block_id = id.replace("_",""); var param = "&tab_num=0"; param += "&search_mode=detail"; param += "&op_param="+encodeURIComponent("title=" + title + "&auth=" + autor); openWindowOpacPage(id,"v3search_view_main_init",param); } function openWindowOpacPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; var hash = "#" + act; window.open(baseurl + paramurl + param + hash); } function clearCattp(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); cattp[0].checked = true; cattp[1].checked = false; cattp[2].checked = false; cattp[3].checked = false; if(cattp.length == 5 ){ cattp[4].checked = false; } } function cattpCheckEach(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); if(cattp[1].checked == true || cattp[2].checked == true || cattp[3].checked == true || (cattp.length == 5 && cattp[4].checked == true)) { cattp[0].checked = false; }else{ cattp[0].checked = true; } } function clearCattp2(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); cattp[0].checked = false; cattp[1].checked = false; cattp[2].checked = false; cattp[3].checked = true; if(cattp.length == 5 ){ cattp[3].checked = false; cattp[4].checked = true; } } function cattpCheckEach2(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); if(cattp[0].checked == true || cattp[1].checked == true || cattp[2].checked == true || (cattp.length == 5 && cattp[3].checked == true)) { if(cattp.length == 4){ cattp[3].checked = false; }else if(cattp.length == 5){ cattp[4].checked = false; } }else{ if(cattp.length == 4){ cattp[3].checked = true; }else if(cattp.length == 5){ cattp[4].checked = true; } } } function sendEdsSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'eds_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var top_el = $(id); var param = "v3search_action_main_eds"; param += "&" + Form.serialize(form_el); document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function edsChangePage(id,form_id,page){ var form_el = $(form_id); if(form_el != null && form_el["pagenumber"].value != null){ form_el["pagenumber"].value = page; sendEdsSearch(form_el,id); } } function edsFacet(id,form_id,facetact){ var form_el = $(form_id); if(form_el != null && form_el["facetact"].value != null){ form_el["facetact"].value = facetact; sendEdsSearch(form_el,id); } } function scOdrPopup(id, event, siteid, sysno, tab_num, rec_num){ url = "/ufiill.do"; url += "?siteid="+encodeURIComponent(siteid); url += "&sysno="+encodeURIComponent(sysno); url += "&mode=odr"; url += "&tab_num=" + encodeURIComponent(tab_num); var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form != null && Form.serialize(siteid_form) != ""){ url += "&" + Form.serialize(siteid_form); } var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "sc"; params["url"] = url; params["close_btn"] = "false"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scIllPopup(id, event, siteid, sysno, tab_num, rec_num){ url = "/ufiill.do"; url += "?siteid="+encodeURIComponent(siteid); url += "&sysno="+encodeURIComponent(sysno); url += "&mode=ill"; var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form != null && Form.serialize(siteid_form) != ""){ url += "&" + Form.serialize(siteid_form); } var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "sc"; params["url"] = url; params["close_btn"] = "false"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scIllPopupLibsrh(id, event, siteid, sysno, tab_num, rec_num, error_mes){ var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form == null || Form.serialize(siteid_form) == ""){ alert(error_mes); }else{ scIllPopup(id, event, siteid, sysno, tab_num, rec_num); } } //書誌同定処理実行 function scLibsrch(id, tab_num, rec_num, isbn, attgrp_flg) { if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var form_el = document.getElementById("sc_usrlibsrh"+id+tab_num); form_el.event.value = ""; form_el.isbn.value = isbn; var sc_param = Form.serialize(form_el); var libsrh_id = "libsrh"; if(attgrp_flg == true){ libsrh_id = "libattsrh"; sc_param += "&attgrp_flg=true"; } scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; params["callbackfunc"] = function(res){ scLoadingDelete(libsrh_id + '_loading_area' + id + tab_num + rec_num); var json = (new Function("return " + res))(); var status = json["status"]; if(status == "LOAD"){ var message = json["message"]; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = message; var button = json["button"]; //中止ボタンのonclick部分を作成する button = button.replace("onclick=''","onclick=\"scLibsrchStop('" + id + "');return false;\""); $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = button; } setTimeout( function(){scLibsrchReload(id, tab_num, rec_num, attgrp_flg);} ,1000); scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); }.bind(this); //書誌同定処理はロック v3searchCls[id].search_lock = true; commonCls.send(params); } function scLibsrchReload(id, tab_num, rec_num, attgrp_flg) { var form_el = document.getElementById("sc_usrlibsrh"+id+tab_num); form_el.event.value = "getResult"; var sc_param = Form.serialize(form_el); var libsrh_id = "libsrh"; if(attgrp_flg == true){ libsrh_id = "libattsrh"; sc_param += "&attgrp_flg=true"; } var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; params["callbackfunc"] = function(res){ scLoadingDelete(libsrh_id + '_loading_area' + id + tab_num + rec_num); var json = (new Function("return " + res))(); var site_mes = json["site_mes"]; for(var i = 0 ; i < json["site"].length ; i++){ if(json["site"][i]){ site_mes += " " + json["site"][i]; } } $('dsite_area' + id + tab_num + rec_num).innerHTML = site_mes; var status = json["status"]; if(status == "LOAD"){ var message = json["message"]; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = message; var button = json["button"]; //中止ボタンのonclick部分を作成する button = button.replace("onclick=''","onclick=\"scLibsrchStop('" + id + "');return false;\""); $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = button; setTimeout( function(){scLibsrchReload(id, tab_num, rec_num, attgrp_flg);} ,1000); scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); }else{ var message = json["message"]; $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = message; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = ""; var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); siteid_form.innerHTML = ""; for(var i = 0 ; i < json["siteid"].length ; i++){ if(json["siteid"][i]){ var element = document.createElement('input'); element.type = "hidden"; element.name = "owning"; element.value = json["siteid"][i]; siteid_form.appendChild(element); } } //ロック解除 v3searchCls[id].search_lock = false; } }.bind(this); commonCls.send(params); } function scLibsrchStop(id) { var sc_param = "stopflg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; commonCls.send(params); } function scLoadingDisp(loading_id){ var loading_el = $(loading_id); if(loading_el != null){ var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; div_parent.id = "load_div" + loading_id; loading_el.appendChild(div_parent); } } function scLoadingDelete(loading_id){ var loading_el = $(loading_id); var load_div = document.getElementById("load_div" + loading_id); if(loading_el != null && load_div != null){ loading_el.removeChild(load_div); } } function scCreIllPopup(id, event){ var params = new Object(); params["action"] = "v3search_view_main_usrcreill"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function sendSummonSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'summon_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var top_el = $(id); var param = "v3search_action_main_summon"; param += "&" + Form.serialize(form_el); document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function summonChangePage(id,form_id,page){ var form_el = $(form_id); if(form_el != null && form_el["pagenumber"].value != null){ form_el["pagenumber"].value = page; sendSummonSearch(form_el,id); } } function summonChangeList(id,form_id){ var form_el = $(form_id); if(form_el != null){ sendSummonSearch(form_el,id); } } function summonFacet(id,form_id,facetact,rangeflg){ var form_el = $(form_id); if(form_el != null){ if(rangeflg){ form_el["facetactRange"].value = facetact; }else{ form_el["facetact"].value = facetact; } sendSummonSearch(form_el,id); } } function summonFacetRemove(id,form_id,facetremove,rangeflg){ var form_el = $(form_id); if(form_el != null){ if(rangeflg){ form_el["facetremoveRange"].value = facetremove; }else{ form_el["facetremove"].value = facetremove; } sendSummonSearch(form_el,id); } } function summonSuggested(id,suggested){ var tab_num = v3searchCls[id].disp_num; var form_el = document.getElementById('summon_tab_form'+id+tab_num); if(form_el != null){ form_el["keywd"].value = suggested; sendSummonSearch(form_el,id); } } function summonSetExFacet(form_id,target,flg){ var form_el = $(form_id); if(form_el != null && form_el[target] != null){ form_el[target].value = flg; } } function summonConvertKeywd(id,num){ var simple = document.getElementById('summon_tab_form'+id+num); var detail = document.getElementById('summon_tab_detail_form'+id+num); if(simple != null && simple["keywd"] != null && detail != null && detail["keywd"] != null){ detail.reset(); detail["keywd"].value = simple["keywd"].value; } } if(!v3searchCls["_1941"]) { v3searchCls["_1941"] = new clsV3search("_1941"); var opac_block_id = ""; if(opac_block_id != "" && opac_block_id != 0){ v3searchCls["_1941"].opac_block_id = opac_block_id; } setHistoryCheck("_1941"); v3searchCls["_1941"].opac_base_url = ""; } function sendOpacInitPage(id,lang){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?page_id=126"; var param = ""; if(id != null && lang != null){ paramurl = "?action=pages_view_main&active_action=v3search_view_main_init"; param = "&block_id="+id.replace("_","")+"&change_locale="+lang + "&flag_top=top"; } location.href = baseurl + paramurl + param; } function sendOpacSearch(form_el,id,svcaction){ if(v3searchCls[id] == null){ return false; } v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } var op_param = Form.serialize(form_el); for(var i = 0 ; i < form_el.length ; i++){ if(form_el[i].type == "checkbox" && form_el[i].checked == false){ op_param += "&" + form_el[i].name + "="; } } param += "&op_param="+encodeURIComponent(op_param); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } if(v3searchCls[id].disp_num == null){ return false; } var search_page = document.getElementById('search_page'+id+v3searchCls[id].disp_num); if(search_page == null){ return false; } search_page.innerHTML = ''; var opt_page = document.getElementById('opt_page'+id+v3searchCls[id].disp_num); if(opt_page == null){ return false; } opt_page.innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_opac"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&op_param=" + encodeURIComponent(Form.serialize(form_el)); if(svcaction != null && svcaction != ""){ var svcEnc = encodeURIComponent(svcaction); param += encodeURIComponent("&svcaction="+svcEnc); } var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendOpacPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; //トップ画面からの新着案内、貸出ランキング、アクセスランキングの場合 if(act == "v3search_view_main_newlst" || act == "v3search_view_main_beslst" || act == "v3search_view_main_acrlst"){ //「v3search_view_main_」以降を切り出しハッシュとする act = act.replace( "v3search_view_main_", "" ); } var hash = "#" + act; location.href = baseurl + paramurl + param + hash; } function sendOtherSearch(id,act,svcaction,formkeyno){ if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } sendOpacPage(id,"v3search_view_main_"+act,param); }else{ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_"+act; if(svcaction != null){ paramurl += "&svcaction="+encodeURIComponent(svcaction); } if(formkeyno != null){ paramurl += "&formkeyno="+encodeURIComponent(formkeyno); } var hash = "#" + act; location.href = baseurl + paramurl + hash; } } function opacUseFunction(id,loginFlg,form_el,svcaction,locale){ var login_id = "0"; var local_area_code = ""; if(loginFlg == "true" && login_id != "0"){ if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_sso"; params["method"] = "post"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["callbackfunc"] = function(res){ if(res != null){ if(form_el.ufisso_param == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "ufisso_param"; lElement.value = res; form_el.appendChild(lElement); }else{ form_el.ufisso_param.value = res; } } opacPopupConfirm(form_el, null, id); }.bind(this); commonCls.send(params); }else if(loginFlg == "always"){ opacUseFunctionAlways(id,form_el,locale); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction); login_url += "&locale=" + encodeURIComponent(locale); if(local_area_code != ""){ login_url += "&local_area_code=" + encodeURIComponent(local_area_code); } location.href = login_url; } } function opacUseFunctionAlways(id,form_el,locale){ var login_url = v3searchCls[id].opac_base_url + "/opacsnd.do"; var target = form_el.action; opac_target = target.replace(/.*\//,""); if(form_el.opac_target == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "opac_target"; lElement.value = opac_target; form_el.appendChild(lElement); }else{ form_el.opac_target.value = opac_target; } form_el.action = login_url; if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } var local_area_code = ""; if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } form_el.submit(); form_el.action = target; } function opacUseFunctionPopup(id,loginFlg,form_el,svcaction,locale){ var login_id = "0"; var local_area_code = ""; if((loginFlg == "true" && login_id != "0") || loginFlg == "noCheckLogin"){ if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); if(loginFlg == "noCheckLogin"){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = "noCheckLogin"; form_el.appendChild(lElement); } }else{ form_el.locale.value = locale; if(loginFlg == "noCheckLogin"){ form_el.onetime.value = "noCheckLogin"; } } if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var url = form_el.action + "?"; url += Form.serialize(form_el); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(form_el.onetime == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = onetime; form_el.appendChild(lElement); }else{ form_el.onetime.value = onetime; } if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var url = form_el.action + "?"; url += Form.serialize(form_el); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction); login_url += "&locale=" + encodeURIComponent(locale); if(local_area_code != ""){ login_url += "&local_area_code=" + encodeURIComponent(local_area_code); } location.href = login_url; } } function opacUseFunctionPopupAlways(id){ var params = new Object(); params["action"] = "v3search_view_main_login"; params["prefix_id_name"] = "popuplogin"; var pos_x = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; var pos_y = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams["loading_el"] = top_el; popupParams["loading_x"] = pos_x; popupParams["loading_y"] = pos_y; popupParams['modal_flag'] = true; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); } function opacLocaleChange(id,lang){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_init"; var param = "&block_id="+id.replace("_","")+"&change_locale="+lang; location.href = baseurl + paramurl + param; } function sendNiiSearch(form_el,id,svcaction){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendNiiPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; document.getElementById('opt_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_nii"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&op_param=" + encodeURIComponent(Form.serialize(form_el)); if(svcaction != null && svcaction != ""){ var svcEnc = encodeURIComponent(svcaction); param += encodeURIComponent("&svcaction="+svcEnc); } var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendNiiPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; location.href = baseurl + paramurl + param; } function changeHref(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_"+act; var hash = "#" + act; location.href = baseurl + paramurl + param + hash; } function showLnkLstELib(id,lnkfunc,groupno,itemno) { var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_lnkexe&block_id="+id.replace("_",""); var param = ""; param += "&lnkfunc="+lnkfunc; param += "&groupno="+groupno; param += "&itemno="+itemno; location.href = baseurl + paramurl + param; } function sendEndRef(software,form_id,opacurl,target,type,tab_type){ var param = Form.serialize(document.getElementById(form_id)); if(param.indexOf("bibid") != -1){ if(target == "localbiblst"){ param = param.replace(/sortkey.*?listcnt.*?&/,"&"); param = param.replace(/bib/g,""); }else if(target == "niibiblst"){ param = param.replace(/listcnt.*?&/,"&"); param = param.replace(/bib/g,""); }else if (target == "newbest"){ param = param.replace(/cls.*?listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bibid.*?=/g,"&id="); }else if (target == "acrexe"){ param = param.replace(/cls.*?listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bibid.*?=/g,"&id="); }else if (target == "browhis"){ param = param.replace(/listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bib/g,"&"); }else if (target == "linkbiblst"){ param = param.replace(/startpos.*?listcnt.*?&/,"&"); param = param.replace(/bib/g,""); } if(param.indexOf("&") != 0){ param = "&" + param; } var w; w = opacurl; if(software == "refworks"){ w += "/refworks.do?type="; w += type; w += param; window.open(w,"RefWorks"); }else if(software == "endnote"){ w += "/endnote.do?type="; w += type; w += param; if(tab_type != null){ w += "&tab_type="+tab_type; } window.open(w,"EndNote"); } }else{ alert("書誌が選択されていません。"); } } function PopUpOpen(id,event,pop_id,form_el,detailflg){ if(detailflg == "false"){ var param = Form.serialize(form_el); if(param.indexOf("bibid") == -1){ alert("書誌が選択されていません。"); return false; } } var params = new Object(); params["action"] = "v3search_view_main_catexp"; params["prefix_id_name"] = "catexp"; params["popid"] = pop_id; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function opacOpnurl(id,svcaction){ var params = ""; var svcactionstr = ""; var pattern = new RegExp("&","g"); params = params.replace(pattern,"&"); if(svcaction != null){ svcactionstr = "&svcaction=" + svcaction; } var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_opnurl&block_id="+id.replace("_",""); location.href = baseurl + paramurl + params + svcactionstr; } function opacBkmexeDel(id,event,form_id){ var param = Form.serialize(document.getElementById(form_id)); if(param.indexOf("bibid=") != -1){ var pattern = new RegExp("sortkey.*?listcnt.*?&"); var reparam = param.replace(pattern,"&"); reparam = reparam.replace(/bibid/g,"bookmark"); var params = new Object(); params["action"] = "v3search_view_main_bkmexe"; params["op_param"] = "mode=del&"+reparam; params["prefix_id_name"] = "bkmexe"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function tagsrh_sendOpacSearch(form_el, id){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_tagsrh" + "&" + Form.serialize(form_el); location.href = baseurl + paramurl; } function opacSendBibidUse(id,loginFlg,form_id,bibform_id,svcaction,locale,id_name,pkey){ var form_el = document.getElementById(form_id); var param = Form.serialize(form_el); if(pkey == null){ pkey = "bibid"; }else{ pkey = encodeURIComponent(pkey); } if(param.indexOf(pkey+"=") != -1){ if(param.indexOf(pkey+"=") != 0){ var pattern = new RegExp(".*?&"+pkey); var reparam = param.replace(pattern,"&"+pkey); }else{ var reparam = param; } var regexp = new RegExp(pkey+"=","g"); reparam = reparam.replace(regexp,"|"); reparam = reparam.replace(/&/g,""); var bibform = document.getElementById(bibform_id); if(bibform[id_name] != null){ if(bibform[id_name].length){ while(bibform[id_name] != null){ if(bibform[id_name][0]){ bibform.removeChild(bibform[id_name][0]); }else{ bibform.removeChild(bibform[id_name]); } } }else{ bibform.removeChild(bibform[id_name]); } } var bibids = reparam.split("|"); var lElement = null; for(var i = 1 ; i < bibids.length ; i++){ lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = id_name; lElement.value = bibids[i]; bibform.appendChild(lElement); } //ブックマーク限定でポップアップ表示 if(id_name == "bookmark"){ opacUseFunctionPopup(id,loginFlg,bibform,svcaction+reparam,locale); }else{ opacUseFunction(id,loginFlg,bibform,svcaction+reparam,locale); } }else{ alert("書誌が選択されていません。"); } } function opacCatdowPopup(id,form,target,type,formkey,event,output_mode){ var bibid = Form.serialize(form); if(bibid.indexOf("bibid") != -1){ var ajaxflg = v3searchCls[id].hol_disp_flg; if(target == "localbiblst"){ bibid = bibid.replace(/sortkey.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "newbest"){ bibid = bibid.replace(/cls.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); bibid = bibid.replace(/bibid.*?=/g,"bibid="); if(ajaxflg == true){ var tmp = ""; var bibids = form["bibid[]"]; for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != null && bibids[i].checked == true){ var vol = form["VOL_"+i+"_"+bibids[i].value]; if(vol != null){ tmp += "bibid="+bibids[i].value+"\t"+vol.value; }else{ vol = document.getElementById("VOL_"+bibids[i].value); if(vol != null){ tmp += "bibid="+bibids[i].value+"\t"+vol.value; } } } } bibid = tmp; } }else if (target == "acrexe"){ bibid = bibid.replace(/cls.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); bibid = bibid.replace(/bibid.*?=/g,"bibid="); if(ajaxflg == true){ var tmp = ""; var bibids = bibid.split("bibid="); for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != ""){ var vol = document.getElementById("VOL_"+bibids[i]); if(vol != null){ tmp += "bibid="+bibids[i]+"\t"+vol.value; } } } bibid = tmp; } }else if (target == "niibiblst"){ bibid = bibid.replace(/listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "browshis"){ bibid = bibid.replace(/listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "linkbiblst"){ bibid = bibid.replace(/startpos.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); } var url = ""; var tab_num = v3searchCls[id].disp_num; var formkeyno = v3searchCls[id].formList[tab_num]; if(formkey != null){ formkeyno = formkey; } if(formkeyno != null){ url = "formkeyno="+encodeURIComponent(formkeyno); } var params = new Object(); params["action"] = "v3search_view_main_catdow"; params["target"] = "opac"; params["prefix_id_name"] = "catdow"; params["downloadBibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; if(output_mode != null){ var output_param = output_mode; var bescntform = document.getElementById("bescntform"+id); var bibids = form["bibid[]"]; for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != null && bibids[i].checked == true){ var bid = bibids[i].value; if(bescntform[bid+"_"+i] != null){ output_param += "|"+bid+","+bescntform[bid+"_"+i].value; }else if(bescntform[bid] != null){ output_param += "|"+bid+","+bescntform[bid].value; } } } params["output_mode"] = output_param; } var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; if(event == null){ if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } } commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function downloadFile(id,dowtype,downloadbibid,ajaxflg,formkeyno,type,dispflg,output_mode){ if(dowtype == "ref"){ var bibs = downloadbibid.split("bib"); if(bibs.length > 21){ alert("Refer/BibIX形式で出力できるのは20件までです。"); return false; } } commonCls.removeBlock("_catdow"+id); id = id.replace(/_/g,""); var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var url = "?action=v3search_view_main_dowexe"; url += "&block_id=" + id; url += "&downloadbibid=" + encodeURIComponent(downloadbibid); url += "&ajaxflg=" + ajaxflg; url += "&dowtype=" + dowtype; url += "&type=" + type; url += "&dispflg=" + dispflg; url += "&formkeyno=" + formkeyno; if(output_mode != null){ url += "&output_mode=" + encodeURIComponent(output_mode); } location.href = baseurl + url; } function sendMailPopup(id,form_el,opacurl,target,type,loginFlg,locale,formkey,svcaction){ if(svcaction == null){ svcaction = "sendmail"; } var bibid = Form.serialize(form_el); if(bibid.indexOf("bibid") != -1){ if(window.confirm("メールを送信しますか?")){ var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always")){ var ajaxflg = v3searchCls[id].hol_disp_flg; bibid = sendMailBibid(id,target,ajaxflg,bibid); var url = ""; var tab_num = v3searchCls[id].disp_num; var formkeyno = v3searchCls[id].formList[tab_num]; if(formkey != null){ formkeyno = formkey; } if(formkeyno != null){ url = "formkeyno="+encodeURIComponent(formkeyno); } if(loginFlg == "true" && login_id != "0"){ var params = new Object(); params["action"] = "v3search_view_main_malsnd"; params["prefix_id_name"] = "malsnd"; params["bibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(url != ""){ url += "&"; } url += "onetime="+onetime; var params = new Object(); params["action"] = "v3search_view_main_malsnd"; params["prefix_id_name"] = "malsnd"; params["bibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); } }else{ if(target == "localbiblst"){ var reparam = bibid.replace(/sortkey.*?listcnt.*?&/,"&"); reparam = reparam.replace(/bibid=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "newbest"){ var reparam = bibid.replace(/cls.*?listcnt.*?&/,""); reparam = reparam.replace(/bibid.*?=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "niibiblst"){ var reparam = bibid.replace(/listcnt.*?&/,"&"); reparam = reparam.replace(/bibid=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "browshis"){ var reparam = bibid.replace(/&/g,""); reparam = reparam.replace(/bibid=/g,"|"); }else if (target == "linkbiblst"){ var reparam = bibid.replace(/startpos.*?listcnt.*?&/,"&"); reparam = reparam.replace(/&bibid=/g,"|"); } var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction + reparam); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } }else{ alert("書誌が選択されていません。"); } } function opacSendFhts(id, loginFlg, form_id, fhtform_id, locale, id_name){ var histlist = document.getElementById(form_id); var param = Form.serialize(histlist); if(param.indexOf("history=") != -1){ var reparam = param; var regexp = new RegExp("history=","g"); reparam = reparam.replace(regexp,"|"); reparam = reparam.replace(/&/g,""); var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always")){ var fhtform = document.getElementById(fhtform_id); if(fhtform[id_name] != null){ if(fhtform[id_name].length){ while(fhtform[id_name] != null){ fhtform.removeChild(fhtform[id_name][0]); } }else{ fhtform.removeChild(fhtform[id_name]); } } var fhtids = reparam.split("|"); var lElement = null; for(var i = 1 ; i < fhtids.length ; i++){ lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "history"; lElement.value = fhtids[i]; fhtform.appendChild(lElement); } if(loginFlg == "true" && login_id != "0"){ url = fhtform.action + "?"; url += Form.serialize(fhtform); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['center_flag'] = true; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(fhtform.onetime == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = onetime; fhtform.appendChild(lElement); }else{ fhtform.onetime.value = onetime; } url = fhtform.action + "?"; url += Form.serialize(fhtform); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['center_flag'] = true; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); } }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + "hstfht" + reparam); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } else { alert("登録対象となる検索条件が選択されていません。"); return false; } return false; } function opacHstsdi(id,loginFlg,operand1,operand2,operator,mode,locale){ var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always") ){ var url = ""; if(operand1 != null){ url += "&operand1="+encodeURIComponent(operand1); } if(operand2 != null){ url += "&operand2="+encodeURIComponent(operand2); } if(operator != null){ url += "&operator="+encodeURIComponent(operator); } if(mode != null){ url += "&mode="+encodeURIComponent(mode); } var params = "action=v3search_view_main_hstexe&url=" + encodeURIComponent(url); commonCls.sendView(id,params); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; var svcaction = id + "," + "hstsdi"; svcaction += "|" + operand1; svcaction += "|" + operand2; svcaction += "|" + operator; svcaction += "|" + mode; login_url += "&svcaction=" + encodeURIComponent(svcaction); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } function opacV3LoginLink(id,locale){ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } function opacLibuseaskSendComsso(id){ var link = document.getElementById(id); var url = link.href; url = url.replace("http:","https:"); link.href = url; var url = link.href; var opacurl = encodeURIComponent(url); link.href = "?action=v3search_view_main_libusesso&opacurl="+opacurl; link.onclick = ""; } function acrlst_sendOpacSearch(id, form_name){ var top_el = $(id); var params = new Object(); params["method"] = "get"; params["param"] = "action=v3search_view_main_acrlst" + "&" + Form.serialize(form_name); params["top_el"] = top_el; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["target_el"] = top_el; commonCls.send(params); } function acrlst_checkBibid(form_id, func){ var boxs = document.getElementById(form_id).elements['bibid[]']; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function acrlst_opacSetListcnt(listcnt, id, form_name){ var form = document.getElementById(form_name); form.listcnt.value = listcnt; form.stpos.value = "1"; acrlst_sendOpacSearch(id,form_name); } function acrlst_opacSetStartpos(stpos, id, form_name){ var form = document.getElementById(form_name); form.stpos.value = stpos; acrlst_sendOpacSearch(id,form_name); } function opacPopupConfirm(form_el, addFunc, id){ if(id != null && v3searchCls[id].search_lock == true){ setTimeout( function(){opacPopupConfirm(form_el, addFunc, id);} ,1000); }else{ opacPopupConfirmDrawing(form_el, addFunc); } } function opacPopupConfirmDrawing(form_el, addFunc){ var submitFunc = function(){ form_el.submit(); }; var div_el = document.createElement("DIV"); Element.setStyle(div_el, {opacity:0.7}); div_el.id = "_global_full_scale"; div_el.style.backgroundColor = "#666666"; document.body.appendChild(div_el); ufinityShowModal(null, div_el); commonCls.moveVisibleHide(div_el); document.body.style.overflow = "hidden"; var popup = document.getElementById("popup"); if(popup == null){ popup = document.createElement('div'); popup.id = "popup"; popup.style.position = "absolute"; document.body.appendChild(popup); } var tableElement = document.createElement("table"); tableElement.align = "center"; var trElement0 = document.createElement("tr"); var tdElement0 = document.createElement("td"); tdElement0.style.paddingBottom = "30px"; tdElement0.colSpan="2"; tdElement0.appendChild(document.createTextNode("別ウィンドウで画面を開きます。よろしいですか?")); tdElement0.appendChild(document.createElement("BR")); trElement0.appendChild(tdElement0); tableElement.appendChild(trElement0); var trElement1 = document.createElement("tr"); trElement1.align = "center"; var tdElement1 = document.createElement("td"); var tdElement2 = document.createElement("td"); var btnFunc = function(){ commonCls.displayChange(div_el); commonCls.moveVisibleHide(div_el); Element.remove(div_el); commonCls.displayChange(popup); commonCls.moveVisibleHide(popup); Element.remove(popup); document.body.style.overflow = "visible"; }; var btnElement1 = document.createElement('input'); btnElement1.type = "button"; btnElement1.value = "OK"; btnElement1.style.width = "80px"; btnElement1.style.height = "30px"; if(btnElement1.attachEvent){ btnElement1.attachEvent("onclick",btnFunc); btnElement1.attachEvent("onclick",submitFunc); if(addFunc != null){ btnElement1.attachEvent("onclick",addFunc); } }else{ btnElement1.addEventListener("click",btnFunc,true); btnElement1.addEventListener("click",submitFunc,true); if(addFunc != null){ btnElement1.addEventListener("click",addFunc,true); } } tdElement1.appendChild(btnElement1); var btnElement2 = document.createElement('input'); btnElement2.type = "button"; btnElement2.value = "キャンセル"; btnElement2.style.width = "80px"; btnElement2.style.height = "30px"; if(btnElement2.attachEvent){ btnElement2.attachEvent("onclick",btnFunc); if(addFunc != null){ btnElement2.attachEvent("onclick",addFunc); } }else{ btnElement2.addEventListener("click",btnFunc,true); if(addFunc != null){ btnElement2.addEventListener("click",addFunc,true); } } tdElement2.appendChild(btnElement2); trElement1.appendChild(tdElement1); trElement1.appendChild(tdElement2); tableElement.appendChild(trElement1); popup.appendChild(document.createElement("BR")); popup.appendChild(tableElement); popup.className = "opac_round_top opac_round_bottom"; popup.style.zIndex = div_el.style.zIndex + 1; popup.style.width = "350px"; popup.style.height = "120px"; popup.style.backgroundColor = "#FFFFFF"; popup.style.border = "solid 2px black"; popup.style.borderColor = "#cccccc"; var scroll_left = (document.documentElement.scrollLeft || document.body.scrollLeft || 0); var scroll_top = (document.documentElement.scrollTop || document.body.scrollTop || 0); var cx = document.documentElement.clientWidth / 2 + scroll_left; var cy = document.documentElement.clientHeight / 2 + scroll_top; popup.style.left = (cx - 120) + 'px'; popup.style.top = (cy - 100) + 'px'; popup.style.display = 'block'; } function ufinityShowModal(event, el, loading_flag) { el = (event == undefined || event == null) ? el : this; var scroll_left = (document.documentElement.scrollLeft || document.body.scrollLeft || 0); var scroll_top = (document.documentElement.scrollTop || document.body.scrollTop || 0); var offset = 0; var w = Position.getWinOuterWidth(); var h = ufinityGetWinOuterHeight(); el.style.width = (w + scroll_left - offset) +"px"; el.style.height = (h + scroll_top - offset) +"px"; if(loading_flag) { el.style.backgroundColor = "#ff0000"; Element.setStyle(el, {"opacity":0.2}); } el.style.position = "absolute"; el.style.left = "0px"; el.style.top = "0px"; if(event == undefined || (event.type != "scroll" && event.type != "resize")) { commonCls.max_zIndex = commonCls.max_zIndex + 1; el.style.zIndex = commonCls.max_zIndex; commonCls.inModalEvent[el] = ufinityShowModal.bindAsEventListener(el); Event.observe(window,"scroll",commonCls.inModalEvent[el],false); Event.observe(window,"resize",commonCls.inModalEvent[el],false); if(browser.isIE) { var img_blank = document.createElement("img"); img_blank.src = _nc_core_base_url + "/images/common/blank.gif"; el.appendChild(img_blank); } if(browser.isIE) { if(img_blank==undefined) { var img_blank = Element.getChildElement(el); } img_blank.style.width = el.style.width; img_blank.style.height = el.style.height; } } } function ufinityGetWinOuterHeight() { if(document === document.window) { return document.documentElement.clientHeight; } else { var doc; if(document.nodeType == 9) { doc = document.documentElement; return Math.max( document.body.scrollHeight, doc.scrollHeight, document.body.offsetHeight, doc.offsetHeight, doc.clientHeight ); } } return 0; } //カテゴリ絞込み用 function opacCategryOption(action,suffix,id,startpos,sortkey,listcnt,options){ $('v3_module'+id).innerHTML = ""; var url = "&stpos"+suffix+"="+encodeURIComponent(startpos)+"&sortkey"+suffix+"="+encodeURIComponent(sortkey)+"&listcnt"+suffix+"="+encodeURIComponent(listcnt); for(key in options){ url += "&" + key + "Option=" + encodeURIComponent(options[key]); } var params = "action=v3search_view_main_"+action+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } function opacRevcntDtl(id,event,tab_num,bibid,volbr,isbn){ url = "/revsrx.do?key=logoff"; url += "&block_id="+encodeURIComponent(id); url += "&tab_num="+encodeURIComponent(tab_num); url += "&bibid="+encodeURIComponent(bibid); url += "&volbr="+encodeURIComponent(volbr); url += "&isbn="+encodeURIComponent(isbn); url += "&popup_flg=true"; var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["close_btn"] = "true"; params["prefix_id_name"] = "revdtl"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } //投稿者一覧画面表示 function opacRusesra(id, startpos, sortkey, listcnt){ $('v3_module'+id).innerHTML = ""; var url = "&stposRuselsa="+encodeURIComponent(startpos)+"&sortkeyRuselsa="+encodeURIComponent(sortkey)+"&listcntRuselsa="+encodeURIComponent(listcnt); var params = "action=v3search_view_main_rusesra"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } // 特定利用者のレビュー一覧画面表示 function opacRusesrh(id, formkeyno, bibid, volbr, isbn, revid, stpos, sortkey, listcnt, userid, action, needSortkey, needListcnt, needStpos, svcaction){ $('v3_module'+id).innerHTML = ""; var url = ""; if(formkeyno != null){ url += "&formkeyno="+encodeURIComponent(formkeyno); } if(bibid != null){ url += "&pkey="+encodeURIComponent(bibid); } if(volbr != null){ url += "&pkeyVol="+encodeURIComponent(volbr); } if(isbn != null){ url += "&pkeyIsbn="+encodeURIComponent(isbn); } if(revid != null){ url += "&pkeyRevid="+encodeURIComponent(revid); } if(stpos != null){ url += "&stposRuse="+encodeURIComponent(stpos); } if(sortkey != null){ url += "&sortkeyRuse="+encodeURIComponent(sortkey); } if(listcnt != null){ url += "&listcntRuse="+encodeURIComponent(listcnt); } if(userid != null){ url += "&userid="+encodeURIComponent(userid); } if(action != null){ // 遷移元情報を付与(レビュー一覧:Revlsa / レビュー詳細画面:Rev) url += "&targetAction="+encodeURIComponent(action); if(needSortkey != null){ url = url + "&sortkey" + action + "=" + encodeURIComponent(needSortkey); } if(needListcnt != null){ url = url + "&listcnt" + action + "=" + encodeURIComponent(needListcnt); } if(needStpos != null){ url = url + "&stpos" + action + "=" + encodeURIComponent(needStpos); } } if(svcaction != null && svcaction != ""){ url += "&svcaction="+encodeURIComponent(svcaction); } var params = "action=v3search_view_main_rusesrh"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } //レビュー詳細画面表示(投稿者一覧画面、特定利用者のレビュー一覧画面表示経由) function opacRusedbl(id, formkeyno, stposCmt, stposRev, stposRevlsa, action, bibid, volbr, isbn, userid, svcaction,listcnt){ $('v3_module'+id).innerHTML = ""; var url = ""; if(formkeyno != null){ url += "&formkeyno="+encodeURIComponent(formkeyno); } if(stposCmt != null){ url += "&stposCmt="+encodeURIComponent(stposCmt); } if(stposRev != null){ url += "&stposRev="+encodeURIComponent(stposRev); } if(stposRevlsa != null){ url += "&stposRevlsa="+encodeURIComponent(stposRevlsa); } if(listcnt != null){ url += "&listcntRev="+encodeURIComponent(listcnt); } if(action != null){ // 遷移元情報を付与(投稿者一覧画面:rusesra / 特定利用者画面のレビュー一覧画面:rusesrh) url += "&originTransition="+encodeURIComponent(action); } if(bibid != null){ // 書誌ID url += "&pkey="+encodeURIComponent(bibid); } if(volbr != null){ // 巻号 url += "&pkeyVol="+encodeURIComponent(volbr); } if(isbn != null){ // ISBN url += "&pkeyIsbn="+encodeURIComponent(isbn); } if(userid != null){ // 利用者ID url += "&userid="+encodeURIComponent(userid); } if(svcaction != null && svcaction != ""){ url += "&svcaction="+encodeURIComponent(svcaction); } var params = "action=v3search_view_main_revdbl"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } //スタンプ登録画面のポップアップ表示用 function opacStampPopup(id,event,bibid){ var params = new Object(); params["action"] = "v3search_view_main_stppop"; params["prefix_id_name"] = "stamp"; params["bibid"] = bibid; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } //スタンプ登録用 function opacStampExe(id,bibid,stpno){ var top_el = $(id); var param = "v3search_view_main_stpexe"; param += "&bibid=" + encodeURIComponent(bibid); param += "&stpno=" + encodeURIComponent(stpno); var params = new Object(); params["param"] = param; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params['target_el'] = $('opac_stppopup'+id);; commonCls.send(params); } //ボタンの連クリックを抑制 - レビュー一覧と投稿者一覧間の遷移 function DisableButton(obj, ajax_area){ // 非活性化 obj.disabled=true; // ボタンアニメーションを動作させる var loading_el = $(ajax_area); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); // 位置情報を設定 var loading_imege_offset_x = 8; var loading_imege_offset_y = 16; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); } // Local書誌詳細に関連資料(別巻号)を表示する function opacRelbibAjaxLocal(id,bibid,target,refFlg){ var url = null; if(refFlg == "true"){ // 並列書誌 url = "/ajaxrelbiblcl.do?"; }else{ // 別巻号 url = "/ajaxathvollcl.do?"; } url += "bibid="+encodeURIComponent(bibid); url += "&block_id="+id.replace("_",""); var top_el = $(id); var params = new Object(); var loading_el = $(target); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target); commonCls.send(params); } // NII書誌詳細に関連資料(並列書誌・別巻号)を表示する function opacRelbibAjaxNii(id,ncid,target,refFlg){ var url = null; if(refFlg == "true"){ // 並列書誌 url = "/ajaxrelbibnii.do?"; }else{ // 別巻号 url = "/ajaxathvolnii.do?"; } url += "ncid="+encodeURIComponent(ncid); url += "&block_id="+id.replace("_",""); var top_el = $(id); var params = new Object(); var loading_el = $(target); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target); commonCls.send(params); } function dspclvBytogid(form_id, action, bibid, togid, stposTog,chkhol){ var w; document.getElementById(form_id).action=action; document.getElementById(form_id).target='Dspclv'; document.getElementById(form_id).pkey.value=bibid; document.getElementById(form_id).pkeyTog.value=togid; document.getElementById(form_id).stposTog.value=stposTog; document.getElementById(form_id).chkhol.value=chkhol; w = window.open("", document.getElementById(form_id).target, "location=yes, toolbar=no, directories=no, menubar=no, status=no, resizable=yes, scrollbars=yes, width=225,height=520"); document.getElementById(form_id).hitcntTog.value='1000000'; document.getElementById(form_id).initFlg.value=''; document.getElementById(form_id).submit(); document.getElementById(form_id).target=''; w.focus(); } function opacClnBlockPlus(value_cln,delimiter,callno_cnt,clnlabel_pri,event){ //請求記号1 var cln1 = ""; //請求記号2 var cln2 = ""; //請求記号3 var cln3 = ""; //請求記号4 var cln4 = ""; //請求記号5 var cln5 = ""; //delimiterで請求記号値を分ける var clnArray = value_cln.split(delimiter); //請求記号1があれば cln1 = opacClnsChk(clnArray[0]); //請求記号2があれば cln2 = opacClnsChk(clnArray[1]); //請求記号3があれば cln3 = opacClnsChk(clnArray[2]); //請求記号4があれば cln4 = opacClnsChk(clnArray[3]); //請求記号5があれば cln5 = opacClnsChk(clnArray[4]); //請求記号1、2、3、4、5のいずれがあれば、ポップ画面を表示する if(cln1!=" "||cln2!=" "||cln3!=" "||cln4!=" "||cln5!=" "){ //表示内容を編集 var content = ""; var clnArray_new = new Array(5); clnArray_new[0] = cln1; clnArray_new[1] = cln2; clnArray_new[2] = cln3; clnArray_new[3] = cln4; clnArray_new[4] = cln5; //段数の登録データ優先フラグが有効な場合 if(clnlabel_pri == "true"){ var data_cnt = 0; //cln5に値があれば5段表示 if(cln5!=" "){ data_cnt = 5; } //cln4に値があれば4段表示 else if(cln4!=" "){ data_cnt = 4; } //cln3に値があれば3段表示 else if(cln3!=" "){ data_cnt = 3; } //cln2に値があれば2段表示 else if(cln2!=" "){ data_cnt = 2; } //登録データ数がcallno_cntより多ければそちらを優先 if(data_cnt > callno_cnt){ callno_cnt = data_cnt; } } //ラベル内容の構築 content += "

"; for(var i = 0 ; i < callno_cnt ; i++){ //最後の行の場合に、Endのタグを付く if(i + 1 == callno_cnt){ content += ""; content += "
" + clnArray_new[i] + "
"; //最後の行ではない場合に、表示クラスを指定して、下線を表示する }else{ content += "

" + clnArray_new[i] + "

"; } } var cln_popup = document.getElementById("cln_popup"); if(cln_popup == null){ cln_popup = document.createElement('div'); cln_popup.id = "cln_popup"; cln_popup.style.position = "absolute"; document.body.appendChild(cln_popup); } cln_popup.innerHTML = content; var cx = event.clientX + (document.body.scrollLeft || document.documentElement.scrollLeft); var cy = event.clientY + (document.body.scrollTop || document.documentElement.scrollTop); cln_popup.style.left = (cx + 6) + 'px'; cln_popup.style.top = (cy + 6) + 'px'; cln_popup.style.display = 'block'; } } function opacNoteBlock(id,event,note){ var note_popup = document.getElementById("_note_popup"+id); if(note_popup != null){ commonCls.removeBlock("_note_popup"+id); } var params = new Object(); params["action"] = "v3search_view_main_popmes"; params["message"] = note; params["prefix_id_name"] = "note_popup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; commonCls.sendPopupView(event, params, popupParams); } function opacFtfsrhAjax(bibid,stposVol,id,ajax_area){ url = "/ftfsrh.do?"; url += "bibid="+encodeURIComponent(bibid); url += "&stposVol="+encodeURIComponent(stposVol); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["loading_el"] = $(ajax_area); params["top_el"] = top_el; params["target_el"] = $(ajax_area); commonCls.send(params); } function dspclvByholidLocal(form_id, action, bibid, holid, stposHol, local_area_code){ var w; document.getElementById(form_id).action=action; document.getElementById(form_id).target='Dspclv'; document.getElementById(form_id).pkey.value=bibid; document.getElementById(form_id).pkeyHol.value=holid; document.getElementById(form_id).stposHol.value=stposHol; document.getElementById(form_id).local_area_code.value=local_area_code; w = window.open("", document.getElementById(form_id).target, "location=yes, toolbar=no, directories=no, menubar=no, status=no, resizable=yes, scrollbars=yes, width=225,height=520"); document.getElementById(form_id).hitcntHol.value=''; document.getElementById(form_id).initFlg.value=''; document.getElementById(form_id).submit(); document.getElementById(form_id).target=''; w.focus(); } /** * プリント用共通メソッド * * @param el 印刷したいエレメント(el or string)(必須) * @param width プレビュー画面の広さ default:600 * @param height プレビュー画面の高さ default:600 * @param header_flag プレビュー画面の閉じる等のヘッダー表示 default:true * @param window_name プレビュー画面のWindowタイトル * @return none **/ function v3searchPrint(el, width, height, header_flag, window_name) { width = (width == undefined) ? 600 : width; height = (height == undefined) ? 600 : height; header_flag = (header_flag == undefined) ? true : header_flag; window_name = (window_name == undefined) ? commonLang.printTitle : window_name; if(header_flag) { //egdeの場合のみ閉じるボタンの処理を変える if(browser.isEdge) { var html = "

"+commonLang.close+""+ commonLang.separator+""+commonLang.print+"

"; } else { var html = "

"+commonLang.close+""+ commonLang.separator+""+commonLang.print+"

"; } } else { var html = ""; } var print_script = ""; var disabled_script = "window.opener.commonCls.disableLink(document.body, \"print_btn\", true);"; var re_script = new RegExp('((.|\n|\r|\t)*?)<\/script>', 'ig'); if(typeof el == 'string') { html += "

"; html += el.replace(re_script,""); } else { if(!el.id) { var print_id = "_global_print_el"; el.id = print_id; } else { var print_id = el.id; } html += "
"; //egdeは個別判定で分岐しdivタブを構成 if(browser.isEdge) { html += el.innerHTML.replace(re_script,""); } else if(!browser.isGecko) { html += el.innerHTML.replace(re_script,""); } else { var append_el = el.cloneNode(true); print_script = "document.getElementById('"+print_id+"').appendChild(print_el);"+disabled_script; } } html += "
"; var features="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no"; if (width) { if (window.screen.width > width) features+=", left="+(window.screen.width-width)/2; else width=window.screen.width; features += ", width="+width; } if (height) { if (window.screen.height > height) features+=", top="+(window.screen.height-height)/2; else height=window.screen.height; features+=", height="+height; } var head = document.getElementsByTagName("head")[0]; var links = head.getElementsByTagName("link"); var linkText = ""; linkText += ""; for (var i = 0; i < links.length; i++) { var link = links[i]; if (link.getAttribute("type") == "text/css") { linkText += "\n"; } } var scriptText = ''; if(print_script == "") { var scriptTextPrint = "

"); winprint.document.close(); }catch(e){ winprint.close(); winprint = window.open("", "PrintPreview" , features); if(append_el != undefined) { winprint.print_el = append_el; } winprint.document.open("text/html"); /* ブロック内部のデザインは維持しない */ winprint.document.write("

" + window_name + "

" + linkText + scriptText + ""+"

"+html+scriptTextPrint+"

"); winprint.document.close(); } } function scSiteOpen(id){ document.getElementById("sc_site_open"+id).style.display = 'none'; document.getElementById("sc_site_close"+id).style.display = 'block'; document.getElementById("sc_site_table"+id).style.display = 'block'; } function scSiteClose(id){ document.getElementById("sc_site_open"+id).style.display = 'block'; document.getElementById("sc_site_close"+id).style.display = 'none'; document.getElementById("sc_site_table"+id).style.display = 'none'; } function scSiteCheckAll(id){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = true; }else{ sites[i].checked = false; } } } function scSiteCheck(el,id,gid){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); if(el.checked){ for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = false; break; } } }else{ var all_el = null; var all_flg = true; for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ all_el = sites[i]; }else{ if(sites[i].checked){ all_flg = false; break; } } } if(all_flg){ all_el.checked = true; } } document.getElementById("sc_sitegrp_chk"+gid+id).checked = false; } function scSiteGrpCheck(el,id,gid){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); var grpsites = document.getElementById("sc_sitegrp"+gid+id).getElementsByTagName('input'); if(el.checked){ for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = false; break; } } for(var i = 0; i < grpsites.length; i++){ grpsites[i].checked = true; } }else{ for(var i = 0; i < grpsites.length; i++){ grpsites[i].checked = false; } var all_el = null; var all_flg = true; for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ all_el = sites[i]; }else{ if(sites[i].checked){ all_flg = false; break; } } } if(all_flg){ all_el.checked = true; } } } function scSiteGrpTgl(id,gid){ var grptglArea = document.getElementById("sc_grptgl"+gid+id); var grpsiteArea = document.getElementById("sc_sitegrp"+gid+id); if(grpsiteArea.style.display == "block"){ grpsiteArea.style.display = "none"; grptglArea.innerHTML = grptglArea.innerHTML.replace("minus.png","plus.png"); }else{ grpsiteArea.style.display = "block"; grptglArea.innerHTML = grptglArea.innerHTML.replace("plus.png","minus.png"); } } function sendSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'sc_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; document.getElementById('opt_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_search"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&req_param=" + encodeURIComponent(Form.serialize(form_el)); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendSearch_history(id,tab_num,formkeyno){ document.getElementById('search_page'+id+tab_num).innerHTML = ''; document.getElementById('opt_page'+id+tab_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_search"; param += "&tab_num=" + encodeURIComponent(tab_num); var req_param = "formkeyno="+formkeyno; param += "&req_param=" + encodeURIComponent(req_param); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+tab_num); commonCls.send(params); } function scStatus(id,tab_num,system){ var url = "/iframe.do?block_id=" + encodeURIComponent(id); url += "&tab_num=" + encodeURIComponent(tab_num); url += "&system=" + encodeURIComponent(system); url += "&ufi_flg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $('ajax_area'+id+tab_num); commonCls.send(params); } function scLoading(id,tab_num){ var loading_el = $('loading_area'+id+tab_num); if(loading_el != null){ var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); } } function scResearch(siteid,hitcnt,id,num){ document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var scparam = "&siteid="+encodeURIComponent(siteid); scparam += "&sitehitcnt="+encodeURIComponent(hitcnt); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=rsh&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scSearchStop(id,num){ var scparam = "&siteid=&dispname=&sitehitcnt=&stopflg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=rsh&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scListChange(startno,sort,dispnum,id,num){ document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var scparam = "&startno="+encodeURIComponent(startno); scparam += "&sort="+encodeURIComponent(sort); scparam += "&dispnum="+encodeURIComponent(dispnum); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=lst&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scUsrsrd(siteid,sysno,id,event){ var params = new Object(); params["action"] = "v3search_view_main_usrsrd"; params["siteid"] = siteid; params["sysno"] = sysno; params["prefix_id_name"] = "usrsrd"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scDtlurlCheck(url){ if(url.indexOf("http://") == 0 || url.indexOf("https://") == 0){ window.open(url,"detwin"); }else{ var pattern = new RegExp("^/.*?/"); var url_rep = url.replace(pattern,"/"); var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_sitdtl"+"&url="+encodeURIComponent(url_rep); window.open(baseurl+paramurl,"detwin"); } } function scSubmitLink(sysno,linkurlid,locale) { var url = "/lnkurl.do"; url += "?sysno="+sysno; url += "&linkurlid="+linkurlid; url += "&locale="+locale; url += "&ufi_flg=true"; var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_sitdtl"+"&url="+encodeURIComponent(url); window.open(baseurl+paramurl,"_blank"); } function scLinklistButton(target,area_id){ if(target != "myopac"){ var myopac_el = document.getElementById("myopac"+area_id); if(myopac_el != null){ myopac_el.style.display = "none"; } } if(target != "linkresolver"){ var linkresolver_el = document.getElementById("linkresolver"+area_id); if(linkresolver_el != null){ linkresolver_el.style.display = "none"; } } if(target != "bookstore"){ var bookstore_el = document.getElementById("bookstore"+area_id); if(bookstore_el != null){ bookstore_el.style.display = "none"; } } var list_el = document.getElementById(target+area_id); if(list_el.style.display != "block"){ list_el.style.display = "block"; }else{ list_el.style.display = "none"; } } function scCheckSysno(form_el,func){ var boxs = form_el.sysno_check; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function scDownloadOpen(id,event,form_el){ var sysno = Form.serialize(form_el); if(sysno.indexOf("sysno_check") != -1){ sysno = sysno.replace(/sort.*?dispnum.*?&sysno_check=/,""); sysno = sysno.replace(/&sysno_check=/g,","); var params = new Object(); params["action"] = "v3search_view_main_usrdwl"; params["prefix_id_name"] = "download"; params["downloadSysno"] = sysno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function scDownloadFile(id,downloadSysno,format){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_usrdwlfile"; paramurl += "&downloadSysno=" + encodeURIComponent(downloadSysno); paramurl += "&format=" + encodeURIComponent(format); location.href = baseurl + paramurl; } function scThumbnailAjax(id,tab_num,isbn,target_id){ var url = "/casimg.do?"; url += "block_id="+encodeURIComponent(id); url += "&tab_num="+encodeURIComponent(tab_num); url += "&isbn="+encodeURIComponent(isbn); var loading_el = $(target_id); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target_id); params["callbackfunc"] = function(res){ Element.remove(div); }; commonCls.send(params); } function scMyssts(id,event){ var params = new Object(); params["action"] = "v3search_view_main_myssts"; params["prefix_id_name"] = "myssts"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scMyscmp(id,form_el){ var top_el = $(id); var param = "v3search_action_main_myscmp"; param += "&req_param=" + encodeURIComponent(Form.serialize(form_el)); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["callbackfunc"] = function(res){ commonCls.removeBlock('_myssts'+id); }; commonCls.send(params); } function scMysshh(id){ var top_el = $(id); var params = new Object(); params["param"] = "v3search_view_main_mysshh"; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["target_el"] = $('v3_module'+id); commonCls.send(params); } function scMysexe(id,formno){ var top_el = $(id); var params = new Object(); var param = "v3search_view_main_mysexe"; param += "&formno=" + encodeURIComponent(formno); params["param"] = param; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["target_el"] = $('v3_module'+id); commonCls.send(params); } function scMysexeSrh(id,form_el){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var param = "?action=pages_view_main&active_action=v3search_view_main_init"; param += "&block_id="+encodeURIComponent(id.replace("_","")); param += "&tab_num="+encodeURIComponent(v3searchCls[id].disp_num); var search_mode = ""; if(form_el.keywd == null){ search_mode = "detail"; param += "&search_mode=detail"; } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); location.href = baseurl + param; } function scMysdel(id,form_el,event){ var del_formno = Form.serialize(form_el); if(del_formno.indexOf("del_formno") != -1){ var params = new Object(); params["action"] = "v3search_view_main_mysdel"; params["prefix_id_name"] = "mysdel"; params["del_formno"] = del_formno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("検索条件が選択されていません。"); } } function scCheckDelFormno(form_el,func){ var boxs = form_el.del_formno; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function scBooklistOpen(id,event,form_el){ var sysno = Form.serialize(form_el); if(sysno.indexOf("sysno_check") != -1){ sysno = sysno.replace(/sort.*?dispnum.*?&sysno_check=/,""); sysno = sysno.replace(/&sysno_check=/g,","); var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["prefix_id_name"] = "booklist"; params["sysno"] = sysno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function scBooklistPut(id,list_id,sysno){ var list_name = document.getElementById("booklist_"+list_id+id).innerHTML; if(confirm(list_name + "へ登録します。") == false){ return; } var top_el = $(id); var param = "v3search_action_main_usrbkl"; param += "&list_id=" + encodeURIComponent(list_id); param += "&sysno=" + encodeURIComponent(sysno); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["callbackfunc"] = function(res){ res = res.replace(/\\n/g,"\n"); alert(res); }; commonCls.send(params); } function scBooklistAdd(id,sysno) { var params = new Object(); params["action"] = "v3search_view_main_usrbkl_add"; params["sysno"] = sysno; commonCls.sendView(id, params); } function scBooklistAddCheck(id,form_el) { var top_el = $(id); var param = "booklist_action_main_check"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ if(res == ""){ var top_el = $(id); var param = "v3search_view_main_usrbkl_check"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["top_el"] = top_el; params["target_el"] = top_el; params["loading_el"] = top_el; commonCls.send(params); }else{ alert(res); } }; commonCls.send(params); } function scBooklistAddList(id,form_el){ var top_el = $(id); var param = "v3search_action_main_usrbkl_add"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["callbackfunc"] = function(res){ res = res.replace(/\\n/g,"\n"); alert(res); var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["sysno"] = form_el.sysno.value; commonCls.sendView(id, params); }; commonCls.send(params); } function scBooklistAddListBack(id,form_el){ var top_el = $(id); var param = "v3search_view_main_usrbkl_add"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["top_el"] = top_el; params["target_el"] = top_el; params["loading_el"] = top_el; commonCls.send(params); } function scBooklistChangePage(id, sysno, booklist_start){ var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["sysno"] = sysno; params["booklist_start"] = booklist_start; commonCls.sendView(id, params); } function appendGoogleScript(id, url, callback){ var script = document.createElement("script"); script.src = url + "&callback="+callback; script.type = "text/javascript"; document.getElementById("googlebooks_script"+id).appendChild(script); } function callbackGoogleScript(res){ if(res != null && res.items){ var item = res.items[0]; var link = item.volumeInfo.previewLink; var isbn13 = null; var identifiers = item.volumeInfo.industryIdentifiers; if(identifiers != null){ for(var i = 0 ; identifiers.length > i ; i++){ if(identifiers[i].type == "ISBN_13"){ isbn13 = identifiers[i].identifier; break; } } } var obj = null; while( (obj = document.getElementById("googlebooks_area_"+isbn13) ) != null ){ if(link != null){ obj.href = link; obj.target = "_blank"; } obj.id = isbn13; var desobj = document.getElementById("googlebooks_des_area_"+isbn13); if(desobj != null){ var description = item.volumeInfo.description; if(description != null){ desobj.innerHTML = description; desobj.id = isbn13; } } } } } function isbnsrcButton(id, el_id, isbn, opac_locale){ var top_el = $('opac_isbnsrc' + el_id); var params = new Object(); params["param"] = { "action":"v3search_view_main_holding_isbnsrc", "block_id":id.replace("_",""), "isbn":isbn, "opac_locale":opac_locale }; params["top_el"] = top_el; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ setIsbnResult(res, el_id); }.bind(this); params["callbackfunc_error"] = function(res){ commonCls.alert(res); }.bind(this); commonCls.send(params); } function setIsbnResult(xml, el_id){ // XMLを解析し、リンクを変動 var tagRoot = xml.getElementsByTagName('root'); var tagHeader = tagRoot[0].getElementsByTagName("header"); var tagHitcnt = tagHeader[0].getElementsByTagName('hitcnt'); var hitCnt = tagHitcnt[0].firstChild.nodeValue; var tagMoveEvent = tagRoot[0].getElementsByTagName("moveevent"); var moveevent = tagMoveEvent[0].firstChild.nodeValue; var tagResultMsg = tagRoot[0].getElementsByTagName("resultmsg"); var resultmsg = tagResultMsg[0].firstChild.nodeValue; var el =null; var displayElement = null; var viewHtml = ""; el = $('opac_isbnsrc_result' + el_id); // ヒット数が0の場合 if(hitCnt == 0){ viewHtml = resultmsg; }else{ viewHtml = ""; viewHtml += resultmsg; viewHtml += ""; } el.innerHTML = viewHtml; Element.addClassName($("opac_isbnsrc" + el_id), "display-none"); Element.removeClassName(el, "display-none"); } function casssrcButton(id, el_id, title, autor, opac_locale){ var top_el = $("opac_casssrc" + el_id); var params = new Object(); params["param"] = { "action":"v3search_view_main_holding_casssrc", "block_id":id.replace("_",""), "title":title, "autor":autor, "opac_locale":opac_locale }; params["top_el"] = top_el; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ setCassResult(res, el_id); }.bind(this); params["callbackfunc_error"] = function(res){ commonCls.alert(res); }.bind(this); commonCls.send(params); } function setCassResult(xml, el_id){ // XMLを解析し、リンクを変更 var tagRoot = xml.getElementsByTagName('root'); var tagHeader = tagRoot[0].getElementsByTagName("header"); var tagHitcnt = tagHeader[0].getElementsByTagName('hitcnt'); var hitCnt = tagHitcnt[0].firstChild.nodeValue; var tagMoveEvent = tagRoot[0].getElementsByTagName("moveevent"); var moveevent = tagMoveEvent[0].firstChild.nodeValue; var tagResultMsg = tagRoot[0].getElementsByTagName("resultmsg"); var resultmsg = tagResultMsg[0].firstChild.nodeValue; var el =null; var displayElement = null; var viewHtml = ""; el = $('opac_casssrc_result' + el_id); // ヒット数が0の場合 if(hitCnt == 0){ viewHtml = resultmsg; }else{ viewHtml = ""; viewHtml += resultmsg; viewHtml += ""; } el.innerHTML = viewHtml; Element.addClassName($("opac_casssrc" + el_id), "display-none"); Element.removeClassName(el, "display-none"); } function opacSearchToIsbn(id, isbn){ v3searchCls[id].opac_block_id = id.replace("_",""); var param = "&tab_num=0"; param += "&search_mode=detail"; var isbnEnc = encodeURIComponent(isbn); param += "&op_param="+encodeURIComponent("isbn_issn="+isbnEnc); openWindowOpacPage(id,"v3search_view_main_init",param); } function opacSearchToTitleAndAuth(id, title, autor){ v3searchCls[id].opac_block_id = id.replace("_",""); var param = "&tab_num=0"; param += "&search_mode=detail"; param += "&op_param="+encodeURIComponent("title=" + title + "&auth=" + autor); openWindowOpacPage(id,"v3search_view_main_init",param); } function openWindowOpacPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; var hash = "#" + act; window.open(baseurl + paramurl + param + hash); } function clearCattp(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); cattp[0].checked = true; cattp[1].checked = false; cattp[2].checked = false; cattp[3].checked = false; if(cattp.length == 5 ){ cattp[4].checked = false; } } function cattpCheckEach(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); if(cattp[1].checked == true || cattp[2].checked == true || cattp[3].checked == true || (cattp.length == 5 && cattp[4].checked == true)) { cattp[0].checked = false; }else{ cattp[0].checked = true; } } function clearCattp2(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); cattp[0].checked = false; cattp[1].checked = false; cattp[2].checked = false; cattp[3].checked = true; if(cattp.length == 5 ){ cattp[3].checked = false; cattp[4].checked = true; } } function cattpCheckEach2(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); if(cattp[0].checked == true || cattp[1].checked == true || cattp[2].checked == true || (cattp.length == 5 && cattp[3].checked == true)) { if(cattp.length == 4){ cattp[3].checked = false; }else if(cattp.length == 5){ cattp[4].checked = false; } }else{ if(cattp.length == 4){ cattp[3].checked = true; }else if(cattp.length == 5){ cattp[4].checked = true; } } } function sendEdsSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'eds_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var top_el = $(id); var param = "v3search_action_main_eds"; param += "&" + Form.serialize(form_el); document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function edsChangePage(id,form_id,page){ var form_el = $(form_id); if(form_el != null && form_el["pagenumber"].value != null){ form_el["pagenumber"].value = page; sendEdsSearch(form_el,id); } } function edsFacet(id,form_id,facetact){ var form_el = $(form_id); if(form_el != null && form_el["facetact"].value != null){ form_el["facetact"].value = facetact; sendEdsSearch(form_el,id); } } function scOdrPopup(id, event, siteid, sysno, tab_num, rec_num){ url = "/ufiill.do"; url += "?siteid="+encodeURIComponent(siteid); url += "&sysno="+encodeURIComponent(sysno); url += "&mode=odr"; url += "&tab_num=" + encodeURIComponent(tab_num); var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form != null && Form.serialize(siteid_form) != ""){ url += "&" + Form.serialize(siteid_form); } var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "sc"; params["url"] = url; params["close_btn"] = "false"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scIllPopup(id, event, siteid, sysno, tab_num, rec_num){ url = "/ufiill.do"; url += "?siteid="+encodeURIComponent(siteid); url += "&sysno="+encodeURIComponent(sysno); url += "&mode=ill"; var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form != null && Form.serialize(siteid_form) != ""){ url += "&" + Form.serialize(siteid_form); } var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "sc"; params["url"] = url; params["close_btn"] = "false"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scIllPopupLibsrh(id, event, siteid, sysno, tab_num, rec_num, error_mes){ var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form == null || Form.serialize(siteid_form) == ""){ alert(error_mes); }else{ scIllPopup(id, event, siteid, sysno, tab_num, rec_num); } } //書誌同定処理実行 function scLibsrch(id, tab_num, rec_num, isbn, attgrp_flg) { if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var form_el = document.getElementById("sc_usrlibsrh"+id+tab_num); form_el.event.value = ""; form_el.isbn.value = isbn; var sc_param = Form.serialize(form_el); var libsrh_id = "libsrh"; if(attgrp_flg == true){ libsrh_id = "libattsrh"; sc_param += "&attgrp_flg=true"; } scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; params["callbackfunc"] = function(res){ scLoadingDelete(libsrh_id + '_loading_area' + id + tab_num + rec_num); var json = (new Function("return " + res))(); var status = json["status"]; if(status == "LOAD"){ var message = json["message"]; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = message; var button = json["button"]; //中止ボタンのonclick部分を作成する button = button.replace("onclick=''","onclick=\"scLibsrchStop('" + id + "');return false;\""); $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = button; } setTimeout( function(){scLibsrchReload(id, tab_num, rec_num, attgrp_flg);} ,1000); scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); }.bind(this); //書誌同定処理はロック v3searchCls[id].search_lock = true; commonCls.send(params); } function scLibsrchReload(id, tab_num, rec_num, attgrp_flg) { var form_el = document.getElementById("sc_usrlibsrh"+id+tab_num); form_el.event.value = "getResult"; var sc_param = Form.serialize(form_el); var libsrh_id = "libsrh"; if(attgrp_flg == true){ libsrh_id = "libattsrh"; sc_param += "&attgrp_flg=true"; } var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; params["callbackfunc"] = function(res){ scLoadingDelete(libsrh_id + '_loading_area' + id + tab_num + rec_num); var json = (new Function("return " + res))(); var site_mes = json["site_mes"]; for(var i = 0 ; i < json["site"].length ; i++){ if(json["site"][i]){ site_mes += " " + json["site"][i]; } } $('dsite_area' + id + tab_num + rec_num).innerHTML = site_mes; var status = json["status"]; if(status == "LOAD"){ var message = json["message"]; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = message; var button = json["button"]; //中止ボタンのonclick部分を作成する button = button.replace("onclick=''","onclick=\"scLibsrchStop('" + id + "');return false;\""); $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = button; setTimeout( function(){scLibsrchReload(id, tab_num, rec_num, attgrp_flg);} ,1000); scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); }else{ var message = json["message"]; $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = message; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = ""; var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); siteid_form.innerHTML = ""; for(var i = 0 ; i < json["siteid"].length ; i++){ if(json["siteid"][i]){ var element = document.createElement('input'); element.type = "hidden"; element.name = "owning"; element.value = json["siteid"][i]; siteid_form.appendChild(element); } } //ロック解除 v3searchCls[id].search_lock = false; } }.bind(this); commonCls.send(params); } function scLibsrchStop(id) { var sc_param = "stopflg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; commonCls.send(params); } function scLoadingDisp(loading_id){ var loading_el = $(loading_id); if(loading_el != null){ var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; div_parent.id = "load_div" + loading_id; loading_el.appendChild(div_parent); } } function scLoadingDelete(loading_id){ var loading_el = $(loading_id); var load_div = document.getElementById("load_div" + loading_id); if(loading_el != null && load_div != null){ loading_el.removeChild(load_div); } } function scCreIllPopup(id, event){ var params = new Object(); params["action"] = "v3search_view_main_usrcreill"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function sendSummonSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'summon_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var top_el = $(id); var param = "v3search_action_main_summon"; param += "&" + Form.serialize(form_el); document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function summonChangePage(id,form_id,page){ var form_el = $(form_id); if(form_el != null && form_el["pagenumber"].value != null){ form_el["pagenumber"].value = page; sendSummonSearch(form_el,id); } } function summonChangeList(id,form_id){ var form_el = $(form_id); if(form_el != null){ sendSummonSearch(form_el,id); } } function summonFacet(id,form_id,facetact,rangeflg){ var form_el = $(form_id); if(form_el != null){ if(rangeflg){ form_el["facetactRange"].value = facetact; }else{ form_el["facetact"].value = facetact; } sendSummonSearch(form_el,id); } } function summonFacetRemove(id,form_id,facetremove,rangeflg){ var form_el = $(form_id); if(form_el != null){ if(rangeflg){ form_el["facetremoveRange"].value = facetremove; }else{ form_el["facetremove"].value = facetremove; } sendSummonSearch(form_el,id); } } function summonSuggested(id,suggested){ var tab_num = v3searchCls[id].disp_num; var form_el = document.getElementById('summon_tab_form'+id+tab_num); if(form_el != null){ form_el["keywd"].value = suggested; sendSummonSearch(form_el,id); } } function summonSetExFacet(form_id,target,flg){ var form_el = $(form_id); if(form_el != null && form_el[target] != null){ form_el[target].value = flg; } } function summonConvertKeywd(id,num){ var simple = document.getElementById('summon_tab_form'+id+num); var detail = document.getElementById('summon_tab_detail_form'+id+num); if(simple != null && simple["keywd"] != null && detail != null && detail["keywd"] != null){ detail.reset(); detail["keywd"].value = simple["keywd"].value; } } var highlightTarget = "menu_headerflat_page_id_" + _nc_main_page_id; var menuHeaderflatElement = document.getElementById(highlightTarget); if(menuHeaderflatElement != null){ var addClass = menuHeaderflatElement.className + " menu_headerflat_highlight _menu_active hover_highlight"; menuHeaderflatElement.setAttribute('class', addClass); } var body = document.getElementById("opac_headermenu_2_body"); var lang = document.getElementsByTagName("html")[0].getAttribute("lang"); if(lang == "ja"){ body.innerHTML = document.getElementById("opac_headermenu_2_ja").innerHTML; }else{ body.innerHTML = document.getElementById("opac_headermenu_2_en").innerHTML; } if(!announcementCls["_375"]) { announcementCls["_375"] = new clsAnnouncement("_375"); } if(!announcementCls["_528"]) { announcementCls["_528"] = new clsAnnouncement("_528"); } if(!announcementCls["_218"]) { announcementCls["_218"] = new clsAnnouncement("_218"); } if(!announcementCls["_453"]) { announcementCls["_453"] = new clsAnnouncement("_453"); } if(!announcementCls["_1496"]) { announcementCls["_1496"] = new clsAnnouncement("_1496"); } if(!announcementCls["_1471"]) { announcementCls["_1471"] = new clsAnnouncement("_1471"); } if(!announcementCls["_617"]) { announcementCls["_617"] = new clsAnnouncement("_617"); } if(!calendarCls["_362"]) { calendarCls["_362"] = new clsCalendar("_362", "_362"); } function changeDay(day){ //今日が選択された時の処理 if(day == "today"){ document.getElementById('today').style.display = 'block'; document.getElementById('tomorrow').style.display = 'none'; } //明日が選択された時の処理 if(day == "tomorrow"){ document.getElementById('today').style.display = 'none'; document.getElementById('tomorrow').style.display = 'block'; } } function changeKan(){ mySelect = document.myForm.myGo.selectedIndex; document.write(mySelect); } if(!announcementCls["_607"]) { announcementCls["_607"] = new clsAnnouncement("_607"); } if(!announcementCls["_1783"]) { announcementCls["_1783"] = new clsAnnouncement("_1783"); } if(!calendarCls["_452"]) { calendarCls["_452"] = new clsCalendar("_452", "_452"); } function changeDay(day){ //今日が選択された時の処理 if(day == "today"){ document.getElementById('today').style.display = 'block'; document.getElementById('tomorrow').style.display = 'none'; } //明日が選択された時の処理 if(day == "tomorrow"){ document.getElementById('today').style.display = 'none'; document.getElementById('tomorrow').style.display = 'block'; } } function changeKan(){ mySelect = document.myForm.myGo.selectedIndex; document.write(mySelect); } calendarCls["_452"].initMain("20241221","2",null); document.getElementById("opacSideAsk_1785").onclick = function(){AskMenu_1785();return false;}; function AskMenu_1785(){ var askform = document.getElementById("menu_askform_1785"); var url = 'https://lib1.osaka-gu.ac.jp/webopac/asklst.do'; url = url.replace("http:","https:"); askform.action = url; askform.target = 'Service' + '1718285948650'; askform.systime.value = "1718285948650"; askform.method = "post"; opacUseFunction('_1785','always',askform,'AskMenu_1785','ja'); } document.getElementById("opacSideFbm_1785").onclick = function(){FolMenu('fbmref');return false;}; document.getElementById("opacSideFht_1785").onclick = function(){FolMenu('fhtref');return false;}; function FolMenu(display) { var follstform = document.getElementById("menu_folform_1785"); var url = 'https://lib1.osaka-gu.ac.jp/webopac/follst.do'; url = url.replace("http:","https:"); follstform.action = url; follstform.target = 'Service' + '1718285948650'; follstform.system.value = "1718285948650"; follstform.display.value = display; follstform.method = "post"; opacUseFunction('_1785','always',follstform,'FolMenu_'+display+'_1785','ja'); } document.getElementById("opacSideSdi_1785").onclick = function(){SdiMenu_1785();return false;}; function SdiMenu_1785(){ var sdiform = document.getElementById("menu_sdiform_1785"); var url = 'https://lib1.osaka-gu.ac.jp/webopac/sdialt.do'; url = url.replace("http:","https:"); sdiform.action = url; sdiform.target = 'Service' + '1718285948650'; sdiform.systime.value = "1718285948650"; sdiform.method = "post"; opacUseFunction('_1785','always',sdiform,'SdiMenu_1785','ja'); } if(!v3searchCls["_1785"]) { v3searchCls["_1785"] = new clsV3search("_1785"); var opac_block_id = ""; if(opac_block_id != "" && opac_block_id != 0){ v3searchCls["_1785"].opac_block_id = opac_block_id; } setHistoryCheck("_1785"); v3searchCls["_1785"].opac_base_url = "https://lib1.osaka-gu.ac.jp/webopac"; } function sendOpacInitPage(id,lang){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?page_id=126"; var param = ""; if(id != null && lang != null){ paramurl = "?action=pages_view_main&active_action=v3search_view_main_init"; param = "&block_id="+id.replace("_","")+"&change_locale="+lang + "&flag_top=top"; } location.href = baseurl + paramurl + param; } function sendOpacSearch(form_el,id,svcaction){ if(v3searchCls[id] == null){ return false; } v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } var op_param = Form.serialize(form_el); for(var i = 0 ; i < form_el.length ; i++){ if(form_el[i].type == "checkbox" && form_el[i].checked == false){ op_param += "&" + form_el[i].name + "="; } } param += "&op_param="+encodeURIComponent(op_param); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } if(v3searchCls[id].disp_num == null){ return false; } var search_page = document.getElementById('search_page'+id+v3searchCls[id].disp_num); if(search_page == null){ return false; } search_page.innerHTML = ''; var opt_page = document.getElementById('opt_page'+id+v3searchCls[id].disp_num); if(opt_page == null){ return false; } opt_page.innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_opac"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&op_param=" + encodeURIComponent(Form.serialize(form_el)); if(svcaction != null && svcaction != ""){ var svcEnc = encodeURIComponent(svcaction); param += encodeURIComponent("&svcaction="+svcEnc); } var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendOpacPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; //トップ画面からの新着案内、貸出ランキング、アクセスランキングの場合 if(act == "v3search_view_main_newlst" || act == "v3search_view_main_beslst" || act == "v3search_view_main_acrlst"){ //「v3search_view_main_」以降を切り出しハッシュとする act = act.replace( "v3search_view_main_", "" ); } var hash = "#" + act; location.href = baseurl + paramurl + param + hash; } function sendOtherSearch(id,act,svcaction,formkeyno){ if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } sendOpacPage(id,"v3search_view_main_"+act,param); }else{ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_"+act; if(svcaction != null){ paramurl += "&svcaction="+encodeURIComponent(svcaction); } if(formkeyno != null){ paramurl += "&formkeyno="+encodeURIComponent(formkeyno); } var hash = "#" + act; location.href = baseurl + paramurl + hash; } } function opacUseFunction(id,loginFlg,form_el,svcaction,locale){ var login_id = "0"; var local_area_code = ""; if(loginFlg == "true" && login_id != "0"){ if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_sso"; params["method"] = "post"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["callbackfunc"] = function(res){ if(res != null){ if(form_el.ufisso_param == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "ufisso_param"; lElement.value = res; form_el.appendChild(lElement); }else{ form_el.ufisso_param.value = res; } } opacPopupConfirm(form_el, null, id); }.bind(this); commonCls.send(params); }else if(loginFlg == "always"){ opacUseFunctionAlways(id,form_el,locale); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction); login_url += "&locale=" + encodeURIComponent(locale); if(local_area_code != ""){ login_url += "&local_area_code=" + encodeURIComponent(local_area_code); } location.href = login_url; } } function opacUseFunctionAlways(id,form_el,locale){ var login_url = v3searchCls[id].opac_base_url + "/opacsnd.do"; var target = form_el.action; opac_target = target.replace(/.*\//,""); if(form_el.opac_target == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "opac_target"; lElement.value = opac_target; form_el.appendChild(lElement); }else{ form_el.opac_target.value = opac_target; } form_el.action = login_url; if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } var local_area_code = ""; if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } form_el.submit(); form_el.action = target; } function opacUseFunctionPopup(id,loginFlg,form_el,svcaction,locale){ var login_id = "0"; var local_area_code = ""; if((loginFlg == "true" && login_id != "0") || loginFlg == "noCheckLogin"){ if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); if(loginFlg == "noCheckLogin"){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = "noCheckLogin"; form_el.appendChild(lElement); } }else{ form_el.locale.value = locale; if(loginFlg == "noCheckLogin"){ form_el.onetime.value = "noCheckLogin"; } } if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var url = form_el.action + "?"; url += Form.serialize(form_el); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(form_el.onetime == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = onetime; form_el.appendChild(lElement); }else{ form_el.onetime.value = onetime; } if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var url = form_el.action + "?"; url += Form.serialize(form_el); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction); login_url += "&locale=" + encodeURIComponent(locale); if(local_area_code != ""){ login_url += "&local_area_code=" + encodeURIComponent(local_area_code); } location.href = login_url; } } function opacUseFunctionPopupAlways(id){ var params = new Object(); params["action"] = "v3search_view_main_login"; params["prefix_id_name"] = "popuplogin"; var pos_x = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; var pos_y = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams["loading_el"] = top_el; popupParams["loading_x"] = pos_x; popupParams["loading_y"] = pos_y; popupParams['modal_flag'] = true; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); } function opacLocaleChange(id,lang){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_init"; var param = "&block_id="+id.replace("_","")+"&change_locale="+lang; location.href = baseurl + paramurl + param; } function sendNiiSearch(form_el,id,svcaction){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendNiiPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; document.getElementById('opt_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_nii"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&op_param=" + encodeURIComponent(Form.serialize(form_el)); if(svcaction != null && svcaction != ""){ var svcEnc = encodeURIComponent(svcaction); param += encodeURIComponent("&svcaction="+svcEnc); } var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendNiiPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; location.href = baseurl + paramurl + param; } function changeHref(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_"+act; var hash = "#" + act; location.href = baseurl + paramurl + param + hash; } function showLnkLstELib(id,lnkfunc,groupno,itemno) { var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_lnkexe&block_id="+id.replace("_",""); var param = ""; param += "&lnkfunc="+lnkfunc; param += "&groupno="+groupno; param += "&itemno="+itemno; location.href = baseurl + paramurl + param; } function sendEndRef(software,form_id,opacurl,target,type,tab_type){ var param = Form.serialize(document.getElementById(form_id)); if(param.indexOf("bibid") != -1){ if(target == "localbiblst"){ param = param.replace(/sortkey.*?listcnt.*?&/,"&"); param = param.replace(/bib/g,""); }else if(target == "niibiblst"){ param = param.replace(/listcnt.*?&/,"&"); param = param.replace(/bib/g,""); }else if (target == "newbest"){ param = param.replace(/cls.*?listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bibid.*?=/g,"&id="); }else if (target == "acrexe"){ param = param.replace(/cls.*?listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bibid.*?=/g,"&id="); }else if (target == "browhis"){ param = param.replace(/listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bib/g,"&"); }else if (target == "linkbiblst"){ param = param.replace(/startpos.*?listcnt.*?&/,"&"); param = param.replace(/bib/g,""); } if(param.indexOf("&") != 0){ param = "&" + param; } var w; w = opacurl; if(software == "refworks"){ w += "/refworks.do?type="; w += type; w += param; window.open(w,"RefWorks"); }else if(software == "endnote"){ w += "/endnote.do?type="; w += type; w += param; if(tab_type != null){ w += "&tab_type="+tab_type; } window.open(w,"EndNote"); } }else{ alert("書誌が選択されていません。"); } } function PopUpOpen(id,event,pop_id,form_el,detailflg){ if(detailflg == "false"){ var param = Form.serialize(form_el); if(param.indexOf("bibid") == -1){ alert("書誌が選択されていません。"); return false; } } var params = new Object(); params["action"] = "v3search_view_main_catexp"; params["prefix_id_name"] = "catexp"; params["popid"] = pop_id; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function opacOpnurl(id,svcaction){ var params = ""; var svcactionstr = ""; var pattern = new RegExp("&","g"); params = params.replace(pattern,"&"); if(svcaction != null){ svcactionstr = "&svcaction=" + svcaction; } var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_opnurl&block_id="+id.replace("_",""); location.href = baseurl + paramurl + params + svcactionstr; } function opacBkmexeDel(id,event,form_id){ var param = Form.serialize(document.getElementById(form_id)); if(param.indexOf("bibid=") != -1){ var pattern = new RegExp("sortkey.*?listcnt.*?&"); var reparam = param.replace(pattern,"&"); reparam = reparam.replace(/bibid/g,"bookmark"); var params = new Object(); params["action"] = "v3search_view_main_bkmexe"; params["op_param"] = "mode=del&"+reparam; params["prefix_id_name"] = "bkmexe"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function tagsrh_sendOpacSearch(form_el, id){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_tagsrh" + "&" + Form.serialize(form_el); location.href = baseurl + paramurl; } function opacSendBibidUse(id,loginFlg,form_id,bibform_id,svcaction,locale,id_name,pkey){ var form_el = document.getElementById(form_id); var param = Form.serialize(form_el); if(pkey == null){ pkey = "bibid"; }else{ pkey = encodeURIComponent(pkey); } if(param.indexOf(pkey+"=") != -1){ if(param.indexOf(pkey+"=") != 0){ var pattern = new RegExp(".*?&"+pkey); var reparam = param.replace(pattern,"&"+pkey); }else{ var reparam = param; } var regexp = new RegExp(pkey+"=","g"); reparam = reparam.replace(regexp,"|"); reparam = reparam.replace(/&/g,""); var bibform = document.getElementById(bibform_id); if(bibform[id_name] != null){ if(bibform[id_name].length){ while(bibform[id_name] != null){ if(bibform[id_name][0]){ bibform.removeChild(bibform[id_name][0]); }else{ bibform.removeChild(bibform[id_name]); } } }else{ bibform.removeChild(bibform[id_name]); } } var bibids = reparam.split("|"); var lElement = null; for(var i = 1 ; i < bibids.length ; i++){ lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = id_name; lElement.value = bibids[i]; bibform.appendChild(lElement); } //ブックマーク限定でポップアップ表示 if(id_name == "bookmark"){ opacUseFunctionPopup(id,loginFlg,bibform,svcaction+reparam,locale); }else{ opacUseFunction(id,loginFlg,bibform,svcaction+reparam,locale); } }else{ alert("書誌が選択されていません。"); } } function opacCatdowPopup(id,form,target,type,formkey,event,output_mode){ var bibid = Form.serialize(form); if(bibid.indexOf("bibid") != -1){ var ajaxflg = v3searchCls[id].hol_disp_flg; if(target == "localbiblst"){ bibid = bibid.replace(/sortkey.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "newbest"){ bibid = bibid.replace(/cls.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); bibid = bibid.replace(/bibid.*?=/g,"bibid="); if(ajaxflg == true){ var tmp = ""; var bibids = form["bibid[]"]; for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != null && bibids[i].checked == true){ var vol = form["VOL_"+i+"_"+bibids[i].value]; if(vol != null){ tmp += "bibid="+bibids[i].value+"\t"+vol.value; }else{ vol = document.getElementById("VOL_"+bibids[i].value); if(vol != null){ tmp += "bibid="+bibids[i].value+"\t"+vol.value; } } } } bibid = tmp; } }else if (target == "acrexe"){ bibid = bibid.replace(/cls.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); bibid = bibid.replace(/bibid.*?=/g,"bibid="); if(ajaxflg == true){ var tmp = ""; var bibids = bibid.split("bibid="); for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != ""){ var vol = document.getElementById("VOL_"+bibids[i]); if(vol != null){ tmp += "bibid="+bibids[i]+"\t"+vol.value; } } } bibid = tmp; } }else if (target == "niibiblst"){ bibid = bibid.replace(/listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "browshis"){ bibid = bibid.replace(/listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "linkbiblst"){ bibid = bibid.replace(/startpos.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); } var url = ""; var tab_num = v3searchCls[id].disp_num; var formkeyno = v3searchCls[id].formList[tab_num]; if(formkey != null){ formkeyno = formkey; } if(formkeyno != null){ url = "formkeyno="+encodeURIComponent(formkeyno); } var params = new Object(); params["action"] = "v3search_view_main_catdow"; params["target"] = "opac"; params["prefix_id_name"] = "catdow"; params["downloadBibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; if(output_mode != null){ var output_param = output_mode; var bescntform = document.getElementById("bescntform"+id); var bibids = form["bibid[]"]; for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != null && bibids[i].checked == true){ var bid = bibids[i].value; if(bescntform[bid+"_"+i] != null){ output_param += "|"+bid+","+bescntform[bid+"_"+i].value; }else if(bescntform[bid] != null){ output_param += "|"+bid+","+bescntform[bid].value; } } } params["output_mode"] = output_param; } var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; if(event == null){ if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } } commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function downloadFile(id,dowtype,downloadbibid,ajaxflg,formkeyno,type,dispflg,output_mode){ if(dowtype == "ref"){ var bibs = downloadbibid.split("bib"); if(bibs.length > 21){ alert("Refer/BibIX形式で出力できるのは20件までです。"); return false; } } commonCls.removeBlock("_catdow"+id); id = id.replace(/_/g,""); var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var url = "?action=v3search_view_main_dowexe"; url += "&block_id=" + id; url += "&downloadbibid=" + encodeURIComponent(downloadbibid); url += "&ajaxflg=" + ajaxflg; url += "&dowtype=" + dowtype; url += "&type=" + type; url += "&dispflg=" + dispflg; url += "&formkeyno=" + formkeyno; if(output_mode != null){ url += "&output_mode=" + encodeURIComponent(output_mode); } location.href = baseurl + url; } function sendMailPopup(id,form_el,opacurl,target,type,loginFlg,locale,formkey,svcaction){ if(svcaction == null){ svcaction = "sendmail"; } var bibid = Form.serialize(form_el); if(bibid.indexOf("bibid") != -1){ if(window.confirm("メールを送信しますか?")){ var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always")){ var ajaxflg = v3searchCls[id].hol_disp_flg; bibid = sendMailBibid(id,target,ajaxflg,bibid); var url = ""; var tab_num = v3searchCls[id].disp_num; var formkeyno = v3searchCls[id].formList[tab_num]; if(formkey != null){ formkeyno = formkey; } if(formkeyno != null){ url = "formkeyno="+encodeURIComponent(formkeyno); } if(loginFlg == "true" && login_id != "0"){ var params = new Object(); params["action"] = "v3search_view_main_malsnd"; params["prefix_id_name"] = "malsnd"; params["bibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(url != ""){ url += "&"; } url += "onetime="+onetime; var params = new Object(); params["action"] = "v3search_view_main_malsnd"; params["prefix_id_name"] = "malsnd"; params["bibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); } }else{ if(target == "localbiblst"){ var reparam = bibid.replace(/sortkey.*?listcnt.*?&/,"&"); reparam = reparam.replace(/bibid=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "newbest"){ var reparam = bibid.replace(/cls.*?listcnt.*?&/,""); reparam = reparam.replace(/bibid.*?=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "niibiblst"){ var reparam = bibid.replace(/listcnt.*?&/,"&"); reparam = reparam.replace(/bibid=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "browshis"){ var reparam = bibid.replace(/&/g,""); reparam = reparam.replace(/bibid=/g,"|"); }else if (target == "linkbiblst"){ var reparam = bibid.replace(/startpos.*?listcnt.*?&/,"&"); reparam = reparam.replace(/&bibid=/g,"|"); } var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction + reparam); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } }else{ alert("書誌が選択されていません。"); } } function opacSendFhts(id, loginFlg, form_id, fhtform_id, locale, id_name){ var histlist = document.getElementById(form_id); var param = Form.serialize(histlist); if(param.indexOf("history=") != -1){ var reparam = param; var regexp = new RegExp("history=","g"); reparam = reparam.replace(regexp,"|"); reparam = reparam.replace(/&/g,""); var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always")){ var fhtform = document.getElementById(fhtform_id); if(fhtform[id_name] != null){ if(fhtform[id_name].length){ while(fhtform[id_name] != null){ fhtform.removeChild(fhtform[id_name][0]); } }else{ fhtform.removeChild(fhtform[id_name]); } } var fhtids = reparam.split("|"); var lElement = null; for(var i = 1 ; i < fhtids.length ; i++){ lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "history"; lElement.value = fhtids[i]; fhtform.appendChild(lElement); } if(loginFlg == "true" && login_id != "0"){ url = fhtform.action + "?"; url += Form.serialize(fhtform); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['center_flag'] = true; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(fhtform.onetime == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = onetime; fhtform.appendChild(lElement); }else{ fhtform.onetime.value = onetime; } url = fhtform.action + "?"; url += Form.serialize(fhtform); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['center_flag'] = true; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); } }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + "hstfht" + reparam); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } else { alert("登録対象となる検索条件が選択されていません。"); return false; } return false; } function opacHstsdi(id,loginFlg,operand1,operand2,operator,mode,locale){ var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always") ){ var url = ""; if(operand1 != null){ url += "&operand1="+encodeURIComponent(operand1); } if(operand2 != null){ url += "&operand2="+encodeURIComponent(operand2); } if(operator != null){ url += "&operator="+encodeURIComponent(operator); } if(mode != null){ url += "&mode="+encodeURIComponent(mode); } var params = "action=v3search_view_main_hstexe&url=" + encodeURIComponent(url); commonCls.sendView(id,params); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; var svcaction = id + "," + "hstsdi"; svcaction += "|" + operand1; svcaction += "|" + operand2; svcaction += "|" + operator; svcaction += "|" + mode; login_url += "&svcaction=" + encodeURIComponent(svcaction); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } function opacV3LoginLink(id,locale){ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } function opacLibuseaskSendComsso(id){ var link = document.getElementById(id); var url = link.href; url = url.replace("http:","https:"); link.href = url; var url = link.href; var opacurl = encodeURIComponent(url); link.href = "?action=v3search_view_main_libusesso&opacurl="+opacurl; link.onclick = ""; } function acrlst_sendOpacSearch(id, form_name){ var top_el = $(id); var params = new Object(); params["method"] = "get"; params["param"] = "action=v3search_view_main_acrlst" + "&" + Form.serialize(form_name); params["top_el"] = top_el; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["target_el"] = top_el; commonCls.send(params); } function acrlst_checkBibid(form_id, func){ var boxs = document.getElementById(form_id).elements['bibid[]']; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function acrlst_opacSetListcnt(listcnt, id, form_name){ var form = document.getElementById(form_name); form.listcnt.value = listcnt; form.stpos.value = "1"; acrlst_sendOpacSearch(id,form_name); } function acrlst_opacSetStartpos(stpos, id, form_name){ var form = document.getElementById(form_name); form.stpos.value = stpos; acrlst_sendOpacSearch(id,form_name); } function opacPopupConfirm(form_el, addFunc, id){ if(id != null && v3searchCls[id].search_lock == true){ setTimeout( function(){opacPopupConfirm(form_el, addFunc, id);} ,1000); }else{ opacPopupConfirmDrawing(form_el, addFunc); } } function opacPopupConfirmDrawing(form_el, addFunc){ var submitFunc = function(){ form_el.submit(); }; var div_el = document.createElement("DIV"); Element.setStyle(div_el, {opacity:0.7}); div_el.id = "_global_full_scale"; div_el.style.backgroundColor = "#666666"; document.body.appendChild(div_el); ufinityShowModal(null, div_el); commonCls.moveVisibleHide(div_el); document.body.style.overflow = "hidden"; var popup = document.getElementById("popup"); if(popup == null){ popup = document.createElement('div'); popup.id = "popup"; popup.style.position = "absolute"; document.body.appendChild(popup); } var tableElement = document.createElement("table"); tableElement.align = "center"; var trElement0 = document.createElement("tr"); var tdElement0 = document.createElement("td"); tdElement0.style.paddingBottom = "30px"; tdElement0.colSpan="2"; tdElement0.appendChild(document.createTextNode("別ウィンドウで画面を開きます。よろしいですか?")); tdElement0.appendChild(document.createElement("BR")); trElement0.appendChild(tdElement0); tableElement.appendChild(trElement0); var trElement1 = document.createElement("tr"); trElement1.align = "center"; var tdElement1 = document.createElement("td"); var tdElement2 = document.createElement("td"); var btnFunc = function(){ commonCls.displayChange(div_el); commonCls.moveVisibleHide(div_el); Element.remove(div_el); commonCls.displayChange(popup); commonCls.moveVisibleHide(popup); Element.remove(popup); document.body.style.overflow = "visible"; }; var btnElement1 = document.createElement('input'); btnElement1.type = "button"; btnElement1.value = "OK"; btnElement1.style.width = "80px"; btnElement1.style.height = "30px"; if(btnElement1.attachEvent){ btnElement1.attachEvent("onclick",btnFunc); btnElement1.attachEvent("onclick",submitFunc); if(addFunc != null){ btnElement1.attachEvent("onclick",addFunc); } }else{ btnElement1.addEventListener("click",btnFunc,true); btnElement1.addEventListener("click",submitFunc,true); if(addFunc != null){ btnElement1.addEventListener("click",addFunc,true); } } tdElement1.appendChild(btnElement1); var btnElement2 = document.createElement('input'); btnElement2.type = "button"; btnElement2.value = "キャンセル"; btnElement2.style.width = "80px"; btnElement2.style.height = "30px"; if(btnElement2.attachEvent){ btnElement2.attachEvent("onclick",btnFunc); if(addFunc != null){ btnElement2.attachEvent("onclick",addFunc); } }else{ btnElement2.addEventListener("click",btnFunc,true); if(addFunc != null){ btnElement2.addEventListener("click",addFunc,true); } } tdElement2.appendChild(btnElement2); trElement1.appendChild(tdElement1); trElement1.appendChild(tdElement2); tableElement.appendChild(trElement1); popup.appendChild(document.createElement("BR")); popup.appendChild(tableElement); popup.className = "opac_round_top opac_round_bottom"; popup.style.zIndex = div_el.style.zIndex + 1; popup.style.width = "350px"; popup.style.height = "120px"; popup.style.backgroundColor = "#FFFFFF"; popup.style.border = "solid 2px black"; popup.style.borderColor = "#cccccc"; var scroll_left = (document.documentElement.scrollLeft || document.body.scrollLeft || 0); var scroll_top = (document.documentElement.scrollTop || document.body.scrollTop || 0); var cx = document.documentElement.clientWidth / 2 + scroll_left; var cy = document.documentElement.clientHeight / 2 + scroll_top; popup.style.left = (cx - 120) + 'px'; popup.style.top = (cy - 100) + 'px'; popup.style.display = 'block'; } function ufinityShowModal(event, el, loading_flag) { el = (event == undefined || event == null) ? el : this; var scroll_left = (document.documentElement.scrollLeft || document.body.scrollLeft || 0); var scroll_top = (document.documentElement.scrollTop || document.body.scrollTop || 0); var offset = 0; var w = Position.getWinOuterWidth(); var h = ufinityGetWinOuterHeight(); el.style.width = (w + scroll_left - offset) +"px"; el.style.height = (h + scroll_top - offset) +"px"; if(loading_flag) { el.style.backgroundColor = "#ff0000"; Element.setStyle(el, {"opacity":0.2}); } el.style.position = "absolute"; el.style.left = "0px"; el.style.top = "0px"; if(event == undefined || (event.type != "scroll" && event.type != "resize")) { commonCls.max_zIndex = commonCls.max_zIndex + 1; el.style.zIndex = commonCls.max_zIndex; commonCls.inModalEvent[el] = ufinityShowModal.bindAsEventListener(el); Event.observe(window,"scroll",commonCls.inModalEvent[el],false); Event.observe(window,"resize",commonCls.inModalEvent[el],false); if(browser.isIE) { var img_blank = document.createElement("img"); img_blank.src = _nc_core_base_url + "/images/common/blank.gif"; el.appendChild(img_blank); } if(browser.isIE) { if(img_blank==undefined) { var img_blank = Element.getChildElement(el); } img_blank.style.width = el.style.width; img_blank.style.height = el.style.height; } } } function ufinityGetWinOuterHeight() { if(document === document.window) { return document.documentElement.clientHeight; } else { var doc; if(document.nodeType == 9) { doc = document.documentElement; return Math.max( document.body.scrollHeight, doc.scrollHeight, document.body.offsetHeight, doc.offsetHeight, doc.clientHeight ); } } return 0; } //カテゴリ絞込み用 function opacCategryOption(action,suffix,id,startpos,sortkey,listcnt,options){ $('v3_module'+id).innerHTML = ""; var url = "&stpos"+suffix+"="+encodeURIComponent(startpos)+"&sortkey"+suffix+"="+encodeURIComponent(sortkey)+"&listcnt"+suffix+"="+encodeURIComponent(listcnt); for(key in options){ url += "&" + key + "Option=" + encodeURIComponent(options[key]); } var params = "action=v3search_view_main_"+action+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } function opacRevcntDtl(id,event,tab_num,bibid,volbr,isbn){ url = "/revsrx.do?key=logoff"; url += "&block_id="+encodeURIComponent(id); url += "&tab_num="+encodeURIComponent(tab_num); url += "&bibid="+encodeURIComponent(bibid); url += "&volbr="+encodeURIComponent(volbr); url += "&isbn="+encodeURIComponent(isbn); url += "&popup_flg=true"; var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["close_btn"] = "true"; params["prefix_id_name"] = "revdtl"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } //投稿者一覧画面表示 function opacRusesra(id, startpos, sortkey, listcnt){ $('v3_module'+id).innerHTML = ""; var url = "&stposRuselsa="+encodeURIComponent(startpos)+"&sortkeyRuselsa="+encodeURIComponent(sortkey)+"&listcntRuselsa="+encodeURIComponent(listcnt); var params = "action=v3search_view_main_rusesra"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } // 特定利用者のレビュー一覧画面表示 function opacRusesrh(id, formkeyno, bibid, volbr, isbn, revid, stpos, sortkey, listcnt, userid, action, needSortkey, needListcnt, needStpos, svcaction){ $('v3_module'+id).innerHTML = ""; var url = ""; if(formkeyno != null){ url += "&formkeyno="+encodeURIComponent(formkeyno); } if(bibid != null){ url += "&pkey="+encodeURIComponent(bibid); } if(volbr != null){ url += "&pkeyVol="+encodeURIComponent(volbr); } if(isbn != null){ url += "&pkeyIsbn="+encodeURIComponent(isbn); } if(revid != null){ url += "&pkeyRevid="+encodeURIComponent(revid); } if(stpos != null){ url += "&stposRuse="+encodeURIComponent(stpos); } if(sortkey != null){ url += "&sortkeyRuse="+encodeURIComponent(sortkey); } if(listcnt != null){ url += "&listcntRuse="+encodeURIComponent(listcnt); } if(userid != null){ url += "&userid="+encodeURIComponent(userid); } if(action != null){ // 遷移元情報を付与(レビュー一覧:Revlsa / レビュー詳細画面:Rev) url += "&targetAction="+encodeURIComponent(action); if(needSortkey != null){ url = url + "&sortkey" + action + "=" + encodeURIComponent(needSortkey); } if(needListcnt != null){ url = url + "&listcnt" + action + "=" + encodeURIComponent(needListcnt); } if(needStpos != null){ url = url + "&stpos" + action + "=" + encodeURIComponent(needStpos); } } if(svcaction != null && svcaction != ""){ url += "&svcaction="+encodeURIComponent(svcaction); } var params = "action=v3search_view_main_rusesrh"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } //レビュー詳細画面表示(投稿者一覧画面、特定利用者のレビュー一覧画面表示経由) function opacRusedbl(id, formkeyno, stposCmt, stposRev, stposRevlsa, action, bibid, volbr, isbn, userid, svcaction,listcnt){ $('v3_module'+id).innerHTML = ""; var url = ""; if(formkeyno != null){ url += "&formkeyno="+encodeURIComponent(formkeyno); } if(stposCmt != null){ url += "&stposCmt="+encodeURIComponent(stposCmt); } if(stposRev != null){ url += "&stposRev="+encodeURIComponent(stposRev); } if(stposRevlsa != null){ url += "&stposRevlsa="+encodeURIComponent(stposRevlsa); } if(listcnt != null){ url += "&listcntRev="+encodeURIComponent(listcnt); } if(action != null){ // 遷移元情報を付与(投稿者一覧画面:rusesra / 特定利用者画面のレビュー一覧画面:rusesrh) url += "&originTransition="+encodeURIComponent(action); } if(bibid != null){ // 書誌ID url += "&pkey="+encodeURIComponent(bibid); } if(volbr != null){ // 巻号 url += "&pkeyVol="+encodeURIComponent(volbr); } if(isbn != null){ // ISBN url += "&pkeyIsbn="+encodeURIComponent(isbn); } if(userid != null){ // 利用者ID url += "&userid="+encodeURIComponent(userid); } if(svcaction != null && svcaction != ""){ url += "&svcaction="+encodeURIComponent(svcaction); } var params = "action=v3search_view_main_revdbl"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } //スタンプ登録画面のポップアップ表示用 function opacStampPopup(id,event,bibid){ var params = new Object(); params["action"] = "v3search_view_main_stppop"; params["prefix_id_name"] = "stamp"; params["bibid"] = bibid; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } //スタンプ登録用 function opacStampExe(id,bibid,stpno){ var top_el = $(id); var param = "v3search_view_main_stpexe"; param += "&bibid=" + encodeURIComponent(bibid); param += "&stpno=" + encodeURIComponent(stpno); var params = new Object(); params["param"] = param; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params['target_el'] = $('opac_stppopup'+id);; commonCls.send(params); } //ボタンの連クリックを抑制 - レビュー一覧と投稿者一覧間の遷移 function DisableButton(obj, ajax_area){ // 非活性化 obj.disabled=true; // ボタンアニメーションを動作させる var loading_el = $(ajax_area); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); // 位置情報を設定 var loading_imege_offset_x = 8; var loading_imege_offset_y = 16; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); } // Local書誌詳細に関連資料(別巻号)を表示する function opacRelbibAjaxLocal(id,bibid,target,refFlg){ var url = null; if(refFlg == "true"){ // 並列書誌 url = "/ajaxrelbiblcl.do?"; }else{ // 別巻号 url = "/ajaxathvollcl.do?"; } url += "bibid="+encodeURIComponent(bibid); url += "&block_id="+id.replace("_",""); var top_el = $(id); var params = new Object(); var loading_el = $(target); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target); commonCls.send(params); } // NII書誌詳細に関連資料(並列書誌・別巻号)を表示する function opacRelbibAjaxNii(id,ncid,target,refFlg){ var url = null; if(refFlg == "true"){ // 並列書誌 url = "/ajaxrelbibnii.do?"; }else{ // 別巻号 url = "/ajaxathvolnii.do?"; } url += "ncid="+encodeURIComponent(ncid); url += "&block_id="+id.replace("_",""); var top_el = $(id); var params = new Object(); var loading_el = $(target); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target); commonCls.send(params); } function dspclvBytogid(form_id, action, bibid, togid, stposTog,chkhol){ var w; document.getElementById(form_id).action=action; document.getElementById(form_id).target='Dspclv'; document.getElementById(form_id).pkey.value=bibid; document.getElementById(form_id).pkeyTog.value=togid; document.getElementById(form_id).stposTog.value=stposTog; document.getElementById(form_id).chkhol.value=chkhol; w = window.open("", document.getElementById(form_id).target, "location=yes, toolbar=no, directories=no, menubar=no, status=no, resizable=yes, scrollbars=yes, width=225,height=520"); document.getElementById(form_id).hitcntTog.value='1000000'; document.getElementById(form_id).initFlg.value=''; document.getElementById(form_id).submit(); document.getElementById(form_id).target=''; w.focus(); } function opacClnBlockPlus(value_cln,delimiter,callno_cnt,clnlabel_pri,event){ //請求記号1 var cln1 = ""; //請求記号2 var cln2 = ""; //請求記号3 var cln3 = ""; //請求記号4 var cln4 = ""; //請求記号5 var cln5 = ""; //delimiterで請求記号値を分ける var clnArray = value_cln.split(delimiter); //請求記号1があれば cln1 = opacClnsChk(clnArray[0]); //請求記号2があれば cln2 = opacClnsChk(clnArray[1]); //請求記号3があれば cln3 = opacClnsChk(clnArray[2]); //請求記号4があれば cln4 = opacClnsChk(clnArray[3]); //請求記号5があれば cln5 = opacClnsChk(clnArray[4]); //請求記号1、2、3、4、5のいずれがあれば、ポップ画面を表示する if(cln1!=" "||cln2!=" "||cln3!=" "||cln4!=" "||cln5!=" "){ //表示内容を編集 var content = ""; var clnArray_new = new Array(5); clnArray_new[0] = cln1; clnArray_new[1] = cln2; clnArray_new[2] = cln3; clnArray_new[3] = cln4; clnArray_new[4] = cln5; //段数の登録データ優先フラグが有効な場合 if(clnlabel_pri == "true"){ var data_cnt = 0; //cln5に値があれば5段表示 if(cln5!=" "){ data_cnt = 5; } //cln4に値があれば4段表示 else if(cln4!=" "){ data_cnt = 4; } //cln3に値があれば3段表示 else if(cln3!=" "){ data_cnt = 3; } //cln2に値があれば2段表示 else if(cln2!=" "){ data_cnt = 2; } //登録データ数がcallno_cntより多ければそちらを優先 if(data_cnt > callno_cnt){ callno_cnt = data_cnt; } } //ラベル内容の構築 content += "

"; for(var i = 0 ; i < callno_cnt ; i++){ //最後の行の場合に、Endのタグを付く if(i + 1 == callno_cnt){ content += ""; content += "
" + clnArray_new[i] + "
"; //最後の行ではない場合に、表示クラスを指定して、下線を表示する }else{ content += "

" + clnArray_new[i] + "

"; } } var cln_popup = document.getElementById("cln_popup"); if(cln_popup == null){ cln_popup = document.createElement('div'); cln_popup.id = "cln_popup"; cln_popup.style.position = "absolute"; document.body.appendChild(cln_popup); } cln_popup.innerHTML = content; var cx = event.clientX + (document.body.scrollLeft || document.documentElement.scrollLeft); var cy = event.clientY + (document.body.scrollTop || document.documentElement.scrollTop); cln_popup.style.left = (cx + 6) + 'px'; cln_popup.style.top = (cy + 6) + 'px'; cln_popup.style.display = 'block'; } } function opacNoteBlock(id,event,note){ var note_popup = document.getElementById("_note_popup"+id); if(note_popup != null){ commonCls.removeBlock("_note_popup"+id); } var params = new Object(); params["action"] = "v3search_view_main_popmes"; params["message"] = note; params["prefix_id_name"] = "note_popup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; commonCls.sendPopupView(event, params, popupParams); } function opacFtfsrhAjax(bibid,stposVol,id,ajax_area){ url = "/ftfsrh.do?"; url += "bibid="+encodeURIComponent(bibid); url += "&stposVol="+encodeURIComponent(stposVol); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["loading_el"] = $(ajax_area); params["top_el"] = top_el; params["target_el"] = $(ajax_area); commonCls.send(params); } function dspclvByholidLocal(form_id, action, bibid, holid, stposHol, local_area_code){ var w; document.getElementById(form_id).action=action; document.getElementById(form_id).target='Dspclv'; document.getElementById(form_id).pkey.value=bibid; document.getElementById(form_id).pkeyHol.value=holid; document.getElementById(form_id).stposHol.value=stposHol; document.getElementById(form_id).local_area_code.value=local_area_code; w = window.open("", document.getElementById(form_id).target, "location=yes, toolbar=no, directories=no, menubar=no, status=no, resizable=yes, scrollbars=yes, width=225,height=520"); document.getElementById(form_id).hitcntHol.value=''; document.getElementById(form_id).initFlg.value=''; document.getElementById(form_id).submit(); document.getElementById(form_id).target=''; w.focus(); } /** * プリント用共通メソッド * * @param el 印刷したいエレメント(el or string)(必須) * @param width プレビュー画面の広さ default:600 * @param height プレビュー画面の高さ default:600 * @param header_flag プレビュー画面の閉じる等のヘッダー表示 default:true * @param window_name プレビュー画面のWindowタイトル * @return none **/ function v3searchPrint(el, width, height, header_flag, window_name) { width = (width == undefined) ? 600 : width; height = (height == undefined) ? 600 : height; header_flag = (header_flag == undefined) ? true : header_flag; window_name = (window_name == undefined) ? commonLang.printTitle : window_name; if(header_flag) { //egdeの場合のみ閉じるボタンの処理を変える if(browser.isEdge) { var html = "

"+commonLang.close+""+ commonLang.separator+""+commonLang.print+"

"; } else { var html = "

"+commonLang.close+""+ commonLang.separator+""+commonLang.print+"

"; } } else { var html = ""; } var print_script = ""; var disabled_script = "window.opener.commonCls.disableLink(document.body, \"print_btn\", true);"; var re_script = new RegExp('((.|\n|\r|\t)*?)<\/script>', 'ig'); if(typeof el == 'string') { html += "

"; html += el.replace(re_script,""); } else { if(!el.id) { var print_id = "_global_print_el"; el.id = print_id; } else { var print_id = el.id; } html += "
"; //egdeは個別判定で分岐しdivタブを構成 if(browser.isEdge) { html += el.innerHTML.replace(re_script,""); } else if(!browser.isGecko) { html += el.innerHTML.replace(re_script,""); } else { var append_el = el.cloneNode(true); print_script = "document.getElementById('"+print_id+"').appendChild(print_el);"+disabled_script; } } html += "
"; var features="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no"; if (width) { if (window.screen.width > width) features+=", left="+(window.screen.width-width)/2; else width=window.screen.width; features += ", width="+width; } if (height) { if (window.screen.height > height) features+=", top="+(window.screen.height-height)/2; else height=window.screen.height; features+=", height="+height; } var head = document.getElementsByTagName("head")[0]; var links = head.getElementsByTagName("link"); var linkText = ""; linkText += ""; for (var i = 0; i < links.length; i++) { var link = links[i]; if (link.getAttribute("type") == "text/css") { linkText += "\n"; } } var scriptText = ''; if(print_script == "") { var scriptTextPrint = "

"); winprint.document.close(); }catch(e){ winprint.close(); winprint = window.open("", "PrintPreview" , features); if(append_el != undefined) { winprint.print_el = append_el; } winprint.document.open("text/html"); /* ブロック内部のデザインは維持しない */ winprint.document.write("

" + window_name + "

" + linkText + scriptText + ""+"

"+html+scriptTextPrint+"

"); winprint.document.close(); } } var initFunc = function initV3Search(){ window.name = "BIBLST"; var tab_num = 0; v3searchCls['_509'].disp_num = tab_num; var tabs = document.getElementById('tab_area_509').getElementsByTagName('li'); var tab_name = tabs[tab_num].id; var forms = document.getElementById('div_area_509').getElementsByTagName('form'); var search_form = null; var mode = ""; if(mode != null && mode == "detail"){ search_form = forms.item(tab_num * 2 + 1); if(tab_name == "sc"){ var pattern = new RegExp(".*?_509","g"); var sc_num = search_form.id.replace(pattern,""); changeSearchMode(tab_name,'_509',sc_num,mode); }else{ changeSearchMode(tab_name,'_509',tab_num,mode); } }else{ mode = "simple"; search_form = forms.item(tab_num * 2); } } if(v3searchCls['_509'] != null){ initFunc(); }else{ if(window.attachEvent){ window.attachEvent("onload",initFunc); }else{ window.addEventListener("load",initFunc,true); } } function opacCheckAll(form_id,name){ var form = document.getElementById(form_id); // 自動絞込み機能が有効/無効で処理分岐 // 自動絞込みが有効の場合 // 通常動作 form[name+"_flag"].checked = true; if(form[name].length){ for(var i = 0; i < form[name].length; i++){ form[name][i].checked = false; } }else{ form[name].checked = false; } } function opacCheckEach(form_id,name){ var form = document.getElementById(form_id); var cnt = 0; if(form[name].length){ for(var i = 0; i < form[name].length; i++){ if(form[name][i].checked){ cnt++; } } }else{ if(form[name].checked){ cnt++; } } if(cnt > 0){ form[name+"_flag"].checked = false; }else{ // 自動絞込み機能が有効/無効で処理分岐 // 自動絞込みが有効の場合 // 通常動作 form[name+"_flag"].checked = true; } } function opacCampusOpen(id){ document.getElementById("opac_campus_open_button"+id).style.display = 'none'; document.getElementById("opac_campus_close_button"+id).style.display = 'block'; document.getElementById("opac_campus_table"+id).style.display = 'block'; } function opacCampusClose(id){ document.getElementById("opac_campus_open_button"+id).style.display = 'block'; document.getElementById("opac_campus_close_button"+id).style.display = 'none'; document.getElementById("opac_campus_table"+id).style.display = 'none'; } function opacCampusCheckAll(form_id){ var form = document.getElementById(form_id); form["holar_flag"].checked = true; var name = "holar"; if(form[name].length){ for(var i = 0; i < form[name].length; i++){ form[name][i].checked = false; } }else{ form[name].checked = false; } var name = "campus"; if(form[name].length){ for(var i = 0; i < form[name].length; i++){ form[name][i].checked = false; } }else{ form[name].checked = false; } } function opacCampusCheck(this_campus,id,form_id){ if(this_campus.checked == true){ var boxs = document.getElementById(id).getElementsByTagName('input'); for(var i = 0; i < boxs.length; i++) { boxs[i].checked = false; } } var form = document.getElementById(form_id); var cnt = 0; var cntMax = 1; var name = "campus"; if(form[name].length){ cntMax = form[name].length; for(var i = 0; i < form[name].length; i++){ if(form[name][i].checked){ cnt++; } } }else{ if(form[name].checked){ cnt++; } } if(cnt == 0){ opacCheckEach(form_id,'holar'); }else{ form["holar_flag"].checked = false; } } function opacCampusCheckEach(target_campus,id,form_id){ var cnt = 0; var boxs = document.getElementById(id).getElementsByTagName('input'); for(var i = 0; i < boxs.length; i++) { if(boxs[i].checked){ cnt++; } } if(cnt == 0){ opacCampusCheck(document.getElementById(target_campus),id,form_id) }else{ var form = document.getElementById(form_id); form["holar_flag"].checked = false; document.getElementById(target_campus).checked = false; } } function opacSreReset(form_el,dsp_name){ } function opacSrdReset(form_el,dsp_name){ // 「全て」フラグ var allflg = false; // キャンパスフラグ var camflg = false; // 所蔵館フラグ var holflg = false; // ファセットフラグ var facetflg = false; // holar_flag情報を取得 var chkHolflg = document.getElementsByName("holar_flag"); // チェックが付与されているかチェック // holar_flag情報をループしてチェック for(var i = 0; i < chkHolflg.length; i++){ if(chkHolflg[i].checked == false){ allflg = false; }else{ // 1つでもチェックがあるとその時点でブレイク allflg = true; break; } } // ファセットの「全て」にチェックが入っていない場合 // holar, campus情報をチェックする if(!allflg){ // キャンパス利用していない場合 var chkHol = document.getElementsByName("holar"); for(var i = 0; i < chkHol.length; i++){ if(chkHol[i].checked == false){ holflg = false; }else{ // 1つでもチェックがあるとその時点でブレイク holflg = true; break; } } // キャンパス利用している場合 } // allflg,camflg,holflgのいずれかがtrueの場合、 // 所蔵館にチェックが入っているとみなし、通常処理ロジックへ入る判定を行う。 if(allflg){ facetflg = true; }else{ if(camflg || holflg){ facetflg = true; } } // 検索ページTOP画面より検索する場合 // 所蔵館にチェックが入っているか判定 if(facetflg){ form_el.fct_holar.value = ""; form_el.fct_campus.value = ""; }else{ // 自動絞込み機能が有効の場合、初回検索フラグを設定 form_el.fct_holar.value = ""; form_el.fct_campus.value = ""; } // 検索ページTOP画面より検索しない場合 } function niiSreReset(form_el){ } function niiSrdReset(form_el){ } function opacSelectHollc(form_id,hollc_id){ var form = document.getElementById(form_id); var form_select = form.hollc; form_select.innerHTML = ''; // 分岐フラグ var vFlg = true; // holar情報を取得 var getHolar = form.holar; if(form["holar_flag"].checked){ form_select.options[0] = new Option("所蔵館を選択してください", ""); } else if(!form["holar_flag"].checked){ // holar情報をループしてチェック for(var i = 0; i < getHolar.length; i++){ if(getHolar[i].checked == false){ vFlg = false; }else{ // 1つでもチェックがあるとその時点でブレイク vFlg = true; break; } } // チェックフラグを判断 if(!vFlg){ // 館にチェックが入っていない場合 form_select.options[0] = new Option("所蔵館を選択してください", ""); }else{ // 館チェックが実施されている場合 form_select.options[0] = new Option("", ""); var select = document.getElementById(hollc_id); var options = select.getElementsByTagName('option'); var target_holar = new Array(); var holar = form["holar"]; if(holar.length){ for(var i = 0; i < holar.length; i++) { if(holar[i].checked){ target_holar.push(holar[i].value); } } }else{ target_holar.push(holar.value); } var pattern = new RegExp("/.*"); for(var i = 0; i < options.length; i++) { var opt_value = options[i].value; if(opt_value != ""){ var opt_holar = opt_value.replace(pattern,""); if(target_holar.indexOf(opt_holar) != -1){ form_select.appendChild(options[i].cloneNode(true)); } } } } } } function opacSelectHollcCampus(form_id,hollc_id,tab_num){ var form = document.getElementById(form_id); var form_select = form.hollc; form_select.innerHTML = ''; if(form["holar_flag"].checked){ form_select.appendChild(new Option("所蔵館を選択してください", "")); }else if(!form["holar_flag"].checked){ // 分岐フラグ var vFlg = true; // holar情報を取得 var getHolar = form.holar; // campus情報を取得 var getcampus = form.campus; // 情報をループしてチェック for(var i = 0; i < getHolar.length; i++){ if(getHolar[i].checked == false){ for(var j = 0; j < getcampus.length; j++){ if(getcampus[j].checked == false){ //全てチェックなしと判断 vFlg = false; }else{ // 1つでもチェックがあるとその時点でブレイク vFlg = true; break; } } }else{ // 1つでもチェックがあるとその時点でブレイク vFlg = true; break; } } // チェックフラグを判断 if(!vFlg){ // 館にチェックが入っていない場合 form_select.appendChild(new Option("所蔵館を選択してください", "")); }else{ form_select.appendChild(new Option("", "")); var select = document.getElementById(hollc_id); var options = select.getElementsByTagName('option'); var target_holar = new Array(); var campus = form["campus"]; if(campus.length){ for(var i = 0; i < campus.length; i++) { var target_campus = "campus"+campus[i].value+tab_num; var boxs = document.getElementById(target_campus).getElementsByTagName('input'); if(campus[i].checked){ for(var j = 0; j < boxs.length; j++) { target_holar.push(boxs[j].value); } }else{ for(var j = 0; j < boxs.length; j++) { if(boxs[j].checked){ target_holar.push(boxs[j].value); } } } } }else{ if(campus.checked){ var target_campus = "campus"+campus.value+tab_num; var boxs = document.getElementById(target_campus).getElementsByTagName('input'); if(campus.checked){ for(var i = 0; i < boxs.length; i++) { target_holar.push(boxs[i].value); } }else{ for(var j = 0; j < boxs.length; j++) { if(boxs[j].checked){ target_holar.push(boxs[j].value); } } } } } var pattern = new RegExp("/.*"); for(var i = 0; i < options.length; i++) { var opt_value = options[i].value; if(opt_value != ""){ var opt_holar = opt_value.replace(pattern,""); if(target_holar.indexOf(opt_holar) != -1){ form_select.appendChild(options[i].cloneNode(true)); } } } } } } function ssCatidTgl(tgl_el,catid,event){ var ddArea = document.getElementById("ss_ddArea_"+catid); if(ddArea.style.display == "block"){ tgl_el.innerHTML = tgl_el.innerHTML.replace("minus.png","plus.png"); ddArea.style.display = "none"; }else{ tgl_el.innerHTML = tgl_el.innerHTML.replace("plus.png","minus.png"); var cx = event.clientX + (document.body.scrollLeft || document.documentElement.scrollLeft); var cy = event.clientY + (document.body.scrollTop || document.documentElement.scrollTop); ddArea.style.left = (cx + 6) + 'px'; ddArea.style.top = (cy + 6) + 'px'; ddArea.style.display = "block"; } return false; } function ssOpenLink(select_el){ if(select_el.value != ""){ window.open(select_el.value); } } if(!v3searchCls["_509"]) { v3searchCls["_509"] = new clsV3search("_509"); var opac_block_id = "296"; if(opac_block_id != "" && opac_block_id != 0){ v3searchCls["_509"].opac_block_id = opac_block_id; } setHistoryCheck("_509"); v3searchCls["_509"].opac_base_url = "https://lib1.osaka-gu.ac.jp/webopac"; } function sendOpacInitPage(id,lang){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?page_id=126"; var param = ""; if(id != null && lang != null){ paramurl = "?action=pages_view_main&active_action=v3search_view_main_init"; param = "&block_id="+id.replace("_","")+"&change_locale="+lang + "&flag_top=top"; } location.href = baseurl + paramurl + param; } function sendOpacSearch(form_el,id,svcaction){ if(v3searchCls[id] == null){ return false; } v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } var op_param = Form.serialize(form_el); for(var i = 0 ; i < form_el.length ; i++){ if(form_el[i].type == "checkbox" && form_el[i].checked == false){ op_param += "&" + form_el[i].name + "="; } } param += "&op_param="+encodeURIComponent(op_param); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } if(v3searchCls[id].disp_num == null){ return false; } var search_page = document.getElementById('search_page'+id+v3searchCls[id].disp_num); if(search_page == null){ return false; } search_page.innerHTML = ''; var opt_page = document.getElementById('opt_page'+id+v3searchCls[id].disp_num); if(opt_page == null){ return false; } opt_page.innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_opac"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&op_param=" + encodeURIComponent(Form.serialize(form_el)); if(svcaction != null && svcaction != ""){ var svcEnc = encodeURIComponent(svcaction); param += encodeURIComponent("&svcaction="+svcEnc); } var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendOpacPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; //トップ画面からの新着案内、貸出ランキング、アクセスランキングの場合 if(act == "v3search_view_main_newlst" || act == "v3search_view_main_beslst" || act == "v3search_view_main_acrlst"){ //「v3search_view_main_」以降を切り出しハッシュとする act = act.replace( "v3search_view_main_", "" ); } var hash = "#" + act; location.href = baseurl + paramurl + param + hash; } function sendOtherSearch(id,act,svcaction,formkeyno){ if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } sendOpacPage(id,"v3search_view_main_"+act,param); }else{ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_"+act; if(svcaction != null){ paramurl += "&svcaction="+encodeURIComponent(svcaction); } if(formkeyno != null){ paramurl += "&formkeyno="+encodeURIComponent(formkeyno); } var hash = "#" + act; location.href = baseurl + paramurl + hash; } } function opacUseFunction(id,loginFlg,form_el,svcaction,locale){ var login_id = "0"; var local_area_code = ""; if(loginFlg == "true" && login_id != "0"){ if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_sso"; params["method"] = "post"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["callbackfunc"] = function(res){ if(res != null){ if(form_el.ufisso_param == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "ufisso_param"; lElement.value = res; form_el.appendChild(lElement); }else{ form_el.ufisso_param.value = res; } } opacPopupConfirm(form_el, null, id); }.bind(this); commonCls.send(params); }else if(loginFlg == "always"){ opacUseFunctionAlways(id,form_el,locale); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction); login_url += "&locale=" + encodeURIComponent(locale); if(local_area_code != ""){ login_url += "&local_area_code=" + encodeURIComponent(local_area_code); } location.href = login_url; } } function opacUseFunctionAlways(id,form_el,locale){ var login_url = v3searchCls[id].opac_base_url + "/opacsnd.do"; var target = form_el.action; opac_target = target.replace(/.*\//,""); if(form_el.opac_target == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "opac_target"; lElement.value = opac_target; form_el.appendChild(lElement); }else{ form_el.opac_target.value = opac_target; } form_el.action = login_url; if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } var local_area_code = ""; if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } form_el.submit(); form_el.action = target; } function opacUseFunctionPopup(id,loginFlg,form_el,svcaction,locale){ var login_id = "0"; var local_area_code = ""; if((loginFlg == "true" && login_id != "0") || loginFlg == "noCheckLogin"){ if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); if(loginFlg == "noCheckLogin"){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = "noCheckLogin"; form_el.appendChild(lElement); } }else{ form_el.locale.value = locale; if(loginFlg == "noCheckLogin"){ form_el.onetime.value = "noCheckLogin"; } } if(local_area_code != ""){ if(form_el.local_area_code == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "local_area_code"; lElement.value = local_area_code; form_el.appendChild(lElement); }else{ form_el.local_area_code.value = local_area_code; } } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var url = form_el.action + "?"; url += Form.serialize(form_el); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(form_el.onetime == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = onetime; form_el.appendChild(lElement); }else{ form_el.onetime.value = onetime; } if(form_el.locale == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "locale"; lElement.value = locale; form_el.appendChild(lElement); }else{ form_el.locale.value = locale; } if(form_el.action != null){ var url = form_el.action; url = url.replace("http:","https:"); form_el.action = url; } var url = form_el.action + "?"; url += Form.serialize(form_el); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction); login_url += "&locale=" + encodeURIComponent(locale); if(local_area_code != ""){ login_url += "&local_area_code=" + encodeURIComponent(local_area_code); } location.href = login_url; } } function opacUseFunctionPopupAlways(id){ var params = new Object(); params["action"] = "v3search_view_main_login"; params["prefix_id_name"] = "popuplogin"; var pos_x = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; var pos_y = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams["loading_el"] = top_el; popupParams["loading_x"] = pos_x; popupParams["loading_y"] = pos_y; popupParams['modal_flag'] = true; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); } function opacLocaleChange(id,lang){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_init"; var param = "&block_id="+id.replace("_","")+"&change_locale="+lang; location.href = baseurl + paramurl + param; } function sendNiiSearch(form_el,id,svcaction){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'opac_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendNiiPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; document.getElementById('opt_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_nii"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&op_param=" + encodeURIComponent(Form.serialize(form_el)); if(svcaction != null && svcaction != ""){ var svcEnc = encodeURIComponent(svcaction); param += encodeURIComponent("&svcaction="+svcEnc); } var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendNiiPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; location.href = baseurl + paramurl + param; } function changeHref(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_"+act; var hash = "#" + act; location.href = baseurl + paramurl + param + hash; } function showLnkLstELib(id,lnkfunc,groupno,itemno) { var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_lnkexe&block_id="+id.replace("_",""); var param = ""; param += "&lnkfunc="+lnkfunc; param += "&groupno="+groupno; param += "&itemno="+itemno; location.href = baseurl + paramurl + param; } function sendEndRef(software,form_id,opacurl,target,type,tab_type){ var param = Form.serialize(document.getElementById(form_id)); if(param.indexOf("bibid") != -1){ if(target == "localbiblst"){ param = param.replace(/sortkey.*?listcnt.*?&/,"&"); param = param.replace(/bib/g,""); }else if(target == "niibiblst"){ param = param.replace(/listcnt.*?&/,"&"); param = param.replace(/bib/g,""); }else if (target == "newbest"){ param = param.replace(/cls.*?listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bibid.*?=/g,"&id="); }else if (target == "acrexe"){ param = param.replace(/cls.*?listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bibid.*?=/g,"&id="); }else if (target == "browhis"){ param = param.replace(/listcnt.*?&/,""); param = param.replace(/&/g,""); param = param.replace(/bib/g,"&"); }else if (target == "linkbiblst"){ param = param.replace(/startpos.*?listcnt.*?&/,"&"); param = param.replace(/bib/g,""); } if(param.indexOf("&") != 0){ param = "&" + param; } var w; w = opacurl; if(software == "refworks"){ w += "/refworks.do?type="; w += type; w += param; window.open(w,"RefWorks"); }else if(software == "endnote"){ w += "/endnote.do?type="; w += type; w += param; if(tab_type != null){ w += "&tab_type="+tab_type; } window.open(w,"EndNote"); } }else{ alert("書誌が選択されていません。"); } } function PopUpOpen(id,event,pop_id,form_el,detailflg){ if(detailflg == "false"){ var param = Form.serialize(form_el); if(param.indexOf("bibid") == -1){ alert("書誌が選択されていません。"); return false; } } var params = new Object(); params["action"] = "v3search_view_main_catexp"; params["prefix_id_name"] = "catexp"; params["popid"] = pop_id; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function opacOpnurl(id,svcaction){ var params = ""; var svcactionstr = ""; var pattern = new RegExp("&","g"); params = params.replace(pattern,"&"); if(svcaction != null){ svcactionstr = "&svcaction=" + svcaction; } var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action=v3search_view_main_opnurl&block_id="+id.replace("_",""); location.href = baseurl + paramurl + params + svcactionstr; } function opacBkmexeDel(id,event,form_id){ var param = Form.serialize(document.getElementById(form_id)); if(param.indexOf("bibid=") != -1){ var pattern = new RegExp("sortkey.*?listcnt.*?&"); var reparam = param.replace(pattern,"&"); reparam = reparam.replace(/bibid/g,"bookmark"); var params = new Object(); params["action"] = "v3search_view_main_bkmexe"; params["op_param"] = "mode=del&"+reparam; params["prefix_id_name"] = "bkmexe"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function tagsrh_sendOpacSearch(form_el, id){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?block_id="+id.replace("_",""); paramurl += "&action=pages_view_main&active_action=v3search_view_main_tagsrh" + "&" + Form.serialize(form_el); location.href = baseurl + paramurl; } function opacSendBibidUse(id,loginFlg,form_id,bibform_id,svcaction,locale,id_name,pkey){ var form_el = document.getElementById(form_id); var param = Form.serialize(form_el); if(pkey == null){ pkey = "bibid"; }else{ pkey = encodeURIComponent(pkey); } if(param.indexOf(pkey+"=") != -1){ if(param.indexOf(pkey+"=") != 0){ var pattern = new RegExp(".*?&"+pkey); var reparam = param.replace(pattern,"&"+pkey); }else{ var reparam = param; } var regexp = new RegExp(pkey+"=","g"); reparam = reparam.replace(regexp,"|"); reparam = reparam.replace(/&/g,""); var bibform = document.getElementById(bibform_id); if(bibform[id_name] != null){ if(bibform[id_name].length){ while(bibform[id_name] != null){ if(bibform[id_name][0]){ bibform.removeChild(bibform[id_name][0]); }else{ bibform.removeChild(bibform[id_name]); } } }else{ bibform.removeChild(bibform[id_name]); } } var bibids = reparam.split("|"); var lElement = null; for(var i = 1 ; i < bibids.length ; i++){ lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = id_name; lElement.value = bibids[i]; bibform.appendChild(lElement); } //ブックマーク限定でポップアップ表示 if(id_name == "bookmark"){ opacUseFunctionPopup(id,loginFlg,bibform,svcaction+reparam,locale); }else{ opacUseFunction(id,loginFlg,bibform,svcaction+reparam,locale); } }else{ alert("書誌が選択されていません。"); } } function opacCatdowPopup(id,form,target,type,formkey,event,output_mode){ var bibid = Form.serialize(form); if(bibid.indexOf("bibid") != -1){ var ajaxflg = v3searchCls[id].hol_disp_flg; if(target == "localbiblst"){ bibid = bibid.replace(/sortkey.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "newbest"){ bibid = bibid.replace(/cls.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); bibid = bibid.replace(/bibid.*?=/g,"bibid="); if(ajaxflg == true){ var tmp = ""; var bibids = form["bibid[]"]; for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != null && bibids[i].checked == true){ var vol = form["VOL_"+i+"_"+bibids[i].value]; if(vol != null){ tmp += "bibid="+bibids[i].value+"\t"+vol.value; }else{ vol = document.getElementById("VOL_"+bibids[i].value); if(vol != null){ tmp += "bibid="+bibids[i].value+"\t"+vol.value; } } } } bibid = tmp; } }else if (target == "acrexe"){ bibid = bibid.replace(/cls.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); bibid = bibid.replace(/bibid.*?=/g,"bibid="); if(ajaxflg == true){ var tmp = ""; var bibids = bibid.split("bibid="); for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != ""){ var vol = document.getElementById("VOL_"+bibids[i]); if(vol != null){ tmp += "bibid="+bibids[i]+"\t"+vol.value; } } } bibid = tmp; } }else if (target == "niibiblst"){ bibid = bibid.replace(/listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "browshis"){ bibid = bibid.replace(/listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); }else if (target == "linkbiblst"){ bibid = bibid.replace(/startpos.*?listcnt.*?&/,""); bibid = bibid.replace(/&/g,""); } var url = ""; var tab_num = v3searchCls[id].disp_num; var formkeyno = v3searchCls[id].formList[tab_num]; if(formkey != null){ formkeyno = formkey; } if(formkeyno != null){ url = "formkeyno="+encodeURIComponent(formkeyno); } var params = new Object(); params["action"] = "v3search_view_main_catdow"; params["target"] = "opac"; params["prefix_id_name"] = "catdow"; params["downloadBibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; if(output_mode != null){ var output_param = output_mode; var bescntform = document.getElementById("bescntform"+id); var bibids = form["bibid[]"]; for(var i = 0 ; i < bibids.length ; i++){ if(bibids[i] != null && bibids[i].checked == true){ var bid = bibids[i].value; if(bescntform[bid+"_"+i] != null){ output_param += "|"+bid+","+bescntform[bid+"_"+i].value; }else if(bescntform[bid] != null){ output_param += "|"+bid+","+bescntform[bid].value; } } } params["output_mode"] = output_param; } var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; if(event == null){ if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } } commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function downloadFile(id,dowtype,downloadbibid,ajaxflg,formkeyno,type,dispflg,output_mode){ if(dowtype == "ref"){ var bibs = downloadbibid.split("bib"); if(bibs.length > 21){ alert("Refer/BibIX形式で出力できるのは20件までです。"); return false; } } commonCls.removeBlock("_catdow"+id); id = id.replace(/_/g,""); var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var url = "?action=v3search_view_main_dowexe"; url += "&block_id=" + id; url += "&downloadbibid=" + encodeURIComponent(downloadbibid); url += "&ajaxflg=" + ajaxflg; url += "&dowtype=" + dowtype; url += "&type=" + type; url += "&dispflg=" + dispflg; url += "&formkeyno=" + formkeyno; if(output_mode != null){ url += "&output_mode=" + encodeURIComponent(output_mode); } location.href = baseurl + url; } function sendMailPopup(id,form_el,opacurl,target,type,loginFlg,locale,formkey,svcaction){ if(svcaction == null){ svcaction = "sendmail"; } var bibid = Form.serialize(form_el); if(bibid.indexOf("bibid") != -1){ if(window.confirm("メールを送信しますか?")){ var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always")){ var ajaxflg = v3searchCls[id].hol_disp_flg; bibid = sendMailBibid(id,target,ajaxflg,bibid); var url = ""; var tab_num = v3searchCls[id].disp_num; var formkeyno = v3searchCls[id].formList[tab_num]; if(formkey != null){ formkeyno = formkey; } if(formkeyno != null){ url = "formkeyno="+encodeURIComponent(formkeyno); } if(loginFlg == "true" && login_id != "0"){ var params = new Object(); params["action"] = "v3search_view_main_malsnd"; params["prefix_id_name"] = "malsnd"; params["bibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(url != ""){ url += "&"; } url += "onetime="+onetime; var params = new Object(); params["action"] = "v3search_view_main_malsnd"; params["prefix_id_name"] = "malsnd"; params["bibid"] = bibid; params["ajaxflg"] = ajaxflg; params["type"] = type; params["dispflg"] = target; params["url"] = url; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); } }else{ if(target == "localbiblst"){ var reparam = bibid.replace(/sortkey.*?listcnt.*?&/,"&"); reparam = reparam.replace(/bibid=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "newbest"){ var reparam = bibid.replace(/cls.*?listcnt.*?&/,""); reparam = reparam.replace(/bibid.*?=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "niibiblst"){ var reparam = bibid.replace(/listcnt.*?&/,"&"); reparam = reparam.replace(/bibid=/g,"|"); reparam = reparam.replace(/&/g,""); }else if (target == "browshis"){ var reparam = bibid.replace(/&/g,""); reparam = reparam.replace(/bibid=/g,"|"); }else if (target == "linkbiblst"){ var reparam = bibid.replace(/startpos.*?listcnt.*?&/,"&"); reparam = reparam.replace(/&bibid=/g,"|"); } var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + svcaction + reparam); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } }else{ alert("書誌が選択されていません。"); } } function opacSendFhts(id, loginFlg, form_id, fhtform_id, locale, id_name){ var histlist = document.getElementById(form_id); var param = Form.serialize(histlist); if(param.indexOf("history=") != -1){ var reparam = param; var regexp = new RegExp("history=","g"); reparam = reparam.replace(regexp,"|"); reparam = reparam.replace(/&/g,""); var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always")){ var fhtform = document.getElementById(fhtform_id); if(fhtform[id_name] != null){ if(fhtform[id_name].length){ while(fhtform[id_name] != null){ fhtform.removeChild(fhtform[id_name][0]); } }else{ fhtform.removeChild(fhtform[id_name]); } } var fhtids = reparam.split("|"); var lElement = null; for(var i = 1 ; i < fhtids.length ; i++){ lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "history"; lElement.value = fhtids[i]; fhtform.appendChild(lElement); } if(loginFlg == "true" && login_id != "0"){ url = fhtform.action + "?"; url += Form.serialize(fhtform); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['center_flag'] = true; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }else if(loginFlg == "always"){ var func = function (onetime){ if(fhtform.onetime == null){ var lElement = document.createElement('input'); lElement.type = "hidden"; lElement.name = "onetime"; lElement.value = onetime; fhtform.appendChild(lElement); }else{ fhtform.onetime.value = onetime; } url = fhtform.action + "?"; url += Form.serialize(fhtform); var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["prefix_id_name"] = "usepopup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['center_flag'] = true; popupParams['modal_flag'] = true; popupParams["loading_el"] = top_el; popupParams["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; popupParams["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; if(document.createEvent){ var event = document.createEvent("MouseEvent"); }else{ var event = document.createEventObject(); } commonCls.sendPopupView(event, params, popupParams); }; v3searchCls[id].func_always = func; opacUseFunctionPopupAlways(id); } }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&svcaction=" + encodeURIComponent(id + "," + "hstfht" + reparam); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } else { alert("登録対象となる検索条件が選択されていません。"); return false; } return false; } function opacHstsdi(id,loginFlg,operand1,operand2,operator,mode,locale){ var login_id = "0"; if( (loginFlg == "true" && login_id != "0") || (loginFlg == "always") ){ var url = ""; if(operand1 != null){ url += "&operand1="+encodeURIComponent(operand1); } if(operand2 != null){ url += "&operand2="+encodeURIComponent(operand2); } if(operator != null){ url += "&operator="+encodeURIComponent(operator); } if(mode != null){ url += "&mode="+encodeURIComponent(mode); } var params = "action=v3search_view_main_hstexe&url=" + encodeURIComponent(url); commonCls.sendView(id,params); }else{ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; var svcaction = id + "," + "hstsdi"; svcaction += "|" + operand1; svcaction += "|" + operand2; svcaction += "|" + operator; svcaction += "|" + mode; login_url += "&svcaction=" + encodeURIComponent(svcaction); login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } } function opacV3LoginLink(id,locale){ var login_url = v3searchCls[id].opac_base_url + "/ufisnd.do?system=1734753825&redirect_page_id=126"; login_url += "&locale=" + encodeURIComponent(locale); location.href = login_url; } function opacLibuseaskSendComsso(id){ var link = document.getElementById(id); var url = link.href; url = url.replace("http:","https:"); link.href = url; var url = link.href; var opacurl = encodeURIComponent(url); link.href = "?action=v3search_view_main_libusesso&opacurl="+opacurl; link.onclick = ""; } function acrlst_sendOpacSearch(id, form_name){ var top_el = $(id); var params = new Object(); params["method"] = "get"; params["param"] = "action=v3search_view_main_acrlst" + "&" + Form.serialize(form_name); params["top_el"] = top_el; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["target_el"] = top_el; commonCls.send(params); } function acrlst_checkBibid(form_id, func){ var boxs = document.getElementById(form_id).elements['bibid[]']; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function acrlst_opacSetListcnt(listcnt, id, form_name){ var form = document.getElementById(form_name); form.listcnt.value = listcnt; form.stpos.value = "1"; acrlst_sendOpacSearch(id,form_name); } function acrlst_opacSetStartpos(stpos, id, form_name){ var form = document.getElementById(form_name); form.stpos.value = stpos; acrlst_sendOpacSearch(id,form_name); } function opacPopupConfirm(form_el, addFunc, id){ if(id != null && v3searchCls[id].search_lock == true){ setTimeout( function(){opacPopupConfirm(form_el, addFunc, id);} ,1000); }else{ opacPopupConfirmDrawing(form_el, addFunc); } } function opacPopupConfirmDrawing(form_el, addFunc){ var submitFunc = function(){ form_el.submit(); }; var div_el = document.createElement("DIV"); Element.setStyle(div_el, {opacity:0.7}); div_el.id = "_global_full_scale"; div_el.style.backgroundColor = "#666666"; document.body.appendChild(div_el); ufinityShowModal(null, div_el); commonCls.moveVisibleHide(div_el); document.body.style.overflow = "hidden"; var popup = document.getElementById("popup"); if(popup == null){ popup = document.createElement('div'); popup.id = "popup"; popup.style.position = "absolute"; document.body.appendChild(popup); } var tableElement = document.createElement("table"); tableElement.align = "center"; var trElement0 = document.createElement("tr"); var tdElement0 = document.createElement("td"); tdElement0.style.paddingBottom = "30px"; tdElement0.colSpan="2"; tdElement0.appendChild(document.createTextNode("別ウィンドウで画面を開きます。よろしいですか?")); tdElement0.appendChild(document.createElement("BR")); trElement0.appendChild(tdElement0); tableElement.appendChild(trElement0); var trElement1 = document.createElement("tr"); trElement1.align = "center"; var tdElement1 = document.createElement("td"); var tdElement2 = document.createElement("td"); var btnFunc = function(){ commonCls.displayChange(div_el); commonCls.moveVisibleHide(div_el); Element.remove(div_el); commonCls.displayChange(popup); commonCls.moveVisibleHide(popup); Element.remove(popup); document.body.style.overflow = "visible"; }; var btnElement1 = document.createElement('input'); btnElement1.type = "button"; btnElement1.value = "OK"; btnElement1.style.width = "80px"; btnElement1.style.height = "30px"; if(btnElement1.attachEvent){ btnElement1.attachEvent("onclick",btnFunc); btnElement1.attachEvent("onclick",submitFunc); if(addFunc != null){ btnElement1.attachEvent("onclick",addFunc); } }else{ btnElement1.addEventListener("click",btnFunc,true); btnElement1.addEventListener("click",submitFunc,true); if(addFunc != null){ btnElement1.addEventListener("click",addFunc,true); } } tdElement1.appendChild(btnElement1); var btnElement2 = document.createElement('input'); btnElement2.type = "button"; btnElement2.value = "キャンセル"; btnElement2.style.width = "80px"; btnElement2.style.height = "30px"; if(btnElement2.attachEvent){ btnElement2.attachEvent("onclick",btnFunc); if(addFunc != null){ btnElement2.attachEvent("onclick",addFunc); } }else{ btnElement2.addEventListener("click",btnFunc,true); if(addFunc != null){ btnElement2.addEventListener("click",addFunc,true); } } tdElement2.appendChild(btnElement2); trElement1.appendChild(tdElement1); trElement1.appendChild(tdElement2); tableElement.appendChild(trElement1); popup.appendChild(document.createElement("BR")); popup.appendChild(tableElement); popup.className = "opac_round_top opac_round_bottom"; popup.style.zIndex = div_el.style.zIndex + 1; popup.style.width = "350px"; popup.style.height = "120px"; popup.style.backgroundColor = "#FFFFFF"; popup.style.border = "solid 2px black"; popup.style.borderColor = "#cccccc"; var scroll_left = (document.documentElement.scrollLeft || document.body.scrollLeft || 0); var scroll_top = (document.documentElement.scrollTop || document.body.scrollTop || 0); var cx = document.documentElement.clientWidth / 2 + scroll_left; var cy = document.documentElement.clientHeight / 2 + scroll_top; popup.style.left = (cx - 120) + 'px'; popup.style.top = (cy - 100) + 'px'; popup.style.display = 'block'; } function ufinityShowModal(event, el, loading_flag) { el = (event == undefined || event == null) ? el : this; var scroll_left = (document.documentElement.scrollLeft || document.body.scrollLeft || 0); var scroll_top = (document.documentElement.scrollTop || document.body.scrollTop || 0); var offset = 0; var w = Position.getWinOuterWidth(); var h = ufinityGetWinOuterHeight(); el.style.width = (w + scroll_left - offset) +"px"; el.style.height = (h + scroll_top - offset) +"px"; if(loading_flag) { el.style.backgroundColor = "#ff0000"; Element.setStyle(el, {"opacity":0.2}); } el.style.position = "absolute"; el.style.left = "0px"; el.style.top = "0px"; if(event == undefined || (event.type != "scroll" && event.type != "resize")) { commonCls.max_zIndex = commonCls.max_zIndex + 1; el.style.zIndex = commonCls.max_zIndex; commonCls.inModalEvent[el] = ufinityShowModal.bindAsEventListener(el); Event.observe(window,"scroll",commonCls.inModalEvent[el],false); Event.observe(window,"resize",commonCls.inModalEvent[el],false); if(browser.isIE) { var img_blank = document.createElement("img"); img_blank.src = _nc_core_base_url + "/images/common/blank.gif"; el.appendChild(img_blank); } if(browser.isIE) { if(img_blank==undefined) { var img_blank = Element.getChildElement(el); } img_blank.style.width = el.style.width; img_blank.style.height = el.style.height; } } } function ufinityGetWinOuterHeight() { if(document === document.window) { return document.documentElement.clientHeight; } else { var doc; if(document.nodeType == 9) { doc = document.documentElement; return Math.max( document.body.scrollHeight, doc.scrollHeight, document.body.offsetHeight, doc.offsetHeight, doc.clientHeight ); } } return 0; } //カテゴリ絞込み用 function opacCategryOption(action,suffix,id,startpos,sortkey,listcnt,options){ $('v3_module'+id).innerHTML = ""; var url = "&stpos"+suffix+"="+encodeURIComponent(startpos)+"&sortkey"+suffix+"="+encodeURIComponent(sortkey)+"&listcnt"+suffix+"="+encodeURIComponent(listcnt); for(key in options){ url += "&" + key + "Option=" + encodeURIComponent(options[key]); } var params = "action=v3search_view_main_"+action+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } function opacRevcntDtl(id,event,tab_num,bibid,volbr,isbn){ url = "/revsrx.do?key=logoff"; url += "&block_id="+encodeURIComponent(id); url += "&tab_num="+encodeURIComponent(tab_num); url += "&bibid="+encodeURIComponent(bibid); url += "&volbr="+encodeURIComponent(volbr); url += "&isbn="+encodeURIComponent(isbn); url += "&popup_flg=true"; var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "opac"; params["url"] = url; params["close_btn"] = "true"; params["prefix_id_name"] = "revdtl"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } //投稿者一覧画面表示 function opacRusesra(id, startpos, sortkey, listcnt){ $('v3_module'+id).innerHTML = ""; var url = "&stposRuselsa="+encodeURIComponent(startpos)+"&sortkeyRuselsa="+encodeURIComponent(sortkey)+"&listcntRuselsa="+encodeURIComponent(listcnt); var params = "action=v3search_view_main_rusesra"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } // 特定利用者のレビュー一覧画面表示 function opacRusesrh(id, formkeyno, bibid, volbr, isbn, revid, stpos, sortkey, listcnt, userid, action, needSortkey, needListcnt, needStpos, svcaction){ $('v3_module'+id).innerHTML = ""; var url = ""; if(formkeyno != null){ url += "&formkeyno="+encodeURIComponent(formkeyno); } if(bibid != null){ url += "&pkey="+encodeURIComponent(bibid); } if(volbr != null){ url += "&pkeyVol="+encodeURIComponent(volbr); } if(isbn != null){ url += "&pkeyIsbn="+encodeURIComponent(isbn); } if(revid != null){ url += "&pkeyRevid="+encodeURIComponent(revid); } if(stpos != null){ url += "&stposRuse="+encodeURIComponent(stpos); } if(sortkey != null){ url += "&sortkeyRuse="+encodeURIComponent(sortkey); } if(listcnt != null){ url += "&listcntRuse="+encodeURIComponent(listcnt); } if(userid != null){ url += "&userid="+encodeURIComponent(userid); } if(action != null){ // 遷移元情報を付与(レビュー一覧:Revlsa / レビュー詳細画面:Rev) url += "&targetAction="+encodeURIComponent(action); if(needSortkey != null){ url = url + "&sortkey" + action + "=" + encodeURIComponent(needSortkey); } if(needListcnt != null){ url = url + "&listcnt" + action + "=" + encodeURIComponent(needListcnt); } if(needStpos != null){ url = url + "&stpos" + action + "=" + encodeURIComponent(needStpos); } } if(svcaction != null && svcaction != ""){ url += "&svcaction="+encodeURIComponent(svcaction); } var params = "action=v3search_view_main_rusesrh"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } //レビュー詳細画面表示(投稿者一覧画面、特定利用者のレビュー一覧画面表示経由) function opacRusedbl(id, formkeyno, stposCmt, stposRev, stposRevlsa, action, bibid, volbr, isbn, userid, svcaction,listcnt){ $('v3_module'+id).innerHTML = ""; var url = ""; if(formkeyno != null){ url += "&formkeyno="+encodeURIComponent(formkeyno); } if(stposCmt != null){ url += "&stposCmt="+encodeURIComponent(stposCmt); } if(stposRev != null){ url += "&stposRev="+encodeURIComponent(stposRev); } if(stposRevlsa != null){ url += "&stposRevlsa="+encodeURIComponent(stposRevlsa); } if(listcnt != null){ url += "&listcntRev="+encodeURIComponent(listcnt); } if(action != null){ // 遷移元情報を付与(投稿者一覧画面:rusesra / 特定利用者画面のレビュー一覧画面:rusesrh) url += "&originTransition="+encodeURIComponent(action); } if(bibid != null){ // 書誌ID url += "&pkey="+encodeURIComponent(bibid); } if(volbr != null){ // 巻号 url += "&pkeyVol="+encodeURIComponent(volbr); } if(isbn != null){ // ISBN url += "&pkeyIsbn="+encodeURIComponent(isbn); } if(userid != null){ // 利用者ID url += "&userid="+encodeURIComponent(userid); } if(svcaction != null && svcaction != ""){ url += "&svcaction="+encodeURIComponent(svcaction); } var params = "action=v3search_view_main_revdbl"+"&url=" + encodeURIComponent(url); commonCls.sendView(id,params); } //スタンプ登録画面のポップアップ表示用 function opacStampPopup(id,event,bibid){ var params = new Object(); params["action"] = "v3search_view_main_stppop"; params["prefix_id_name"] = "stamp"; params["bibid"] = bibid; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } //スタンプ登録用 function opacStampExe(id,bibid,stpno){ var top_el = $(id); var param = "v3search_view_main_stpexe"; param += "&bibid=" + encodeURIComponent(bibid); param += "&stpno=" + encodeURIComponent(stpno); var params = new Object(); params["param"] = param; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params['target_el'] = $('opac_stppopup'+id);; commonCls.send(params); } //ボタンの連クリックを抑制 - レビュー一覧と投稿者一覧間の遷移 function DisableButton(obj, ajax_area){ // 非活性化 obj.disabled=true; // ボタンアニメーションを動作させる var loading_el = $(ajax_area); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); // 位置情報を設定 var loading_imege_offset_x = 8; var loading_imege_offset_y = 16; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); } // Local書誌詳細に関連資料(別巻号)を表示する function opacRelbibAjaxLocal(id,bibid,target,refFlg){ var url = null; if(refFlg == "true"){ // 並列書誌 url = "/ajaxrelbiblcl.do?"; }else{ // 別巻号 url = "/ajaxathvollcl.do?"; } url += "bibid="+encodeURIComponent(bibid); url += "&block_id="+id.replace("_",""); var top_el = $(id); var params = new Object(); var loading_el = $(target); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target); commonCls.send(params); } // NII書誌詳細に関連資料(並列書誌・別巻号)を表示する function opacRelbibAjaxNii(id,ncid,target,refFlg){ var url = null; if(refFlg == "true"){ // 並列書誌 url = "/ajaxrelbibnii.do?"; }else{ // 別巻号 url = "/ajaxathvolnii.do?"; } url += "ncid="+encodeURIComponent(ncid); url += "&block_id="+id.replace("_",""); var top_el = $(id); var params = new Object(); var loading_el = $(target); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target); commonCls.send(params); } function dspclvBytogid(form_id, action, bibid, togid, stposTog,chkhol){ var w; document.getElementById(form_id).action=action; document.getElementById(form_id).target='Dspclv'; document.getElementById(form_id).pkey.value=bibid; document.getElementById(form_id).pkeyTog.value=togid; document.getElementById(form_id).stposTog.value=stposTog; document.getElementById(form_id).chkhol.value=chkhol; w = window.open("", document.getElementById(form_id).target, "location=yes, toolbar=no, directories=no, menubar=no, status=no, resizable=yes, scrollbars=yes, width=225,height=520"); document.getElementById(form_id).hitcntTog.value='1000000'; document.getElementById(form_id).initFlg.value=''; document.getElementById(form_id).submit(); document.getElementById(form_id).target=''; w.focus(); } function opacClnBlockPlus(value_cln,delimiter,callno_cnt,clnlabel_pri,event){ //請求記号1 var cln1 = ""; //請求記号2 var cln2 = ""; //請求記号3 var cln3 = ""; //請求記号4 var cln4 = ""; //請求記号5 var cln5 = ""; //delimiterで請求記号値を分ける var clnArray = value_cln.split(delimiter); //請求記号1があれば cln1 = opacClnsChk(clnArray[0]); //請求記号2があれば cln2 = opacClnsChk(clnArray[1]); //請求記号3があれば cln3 = opacClnsChk(clnArray[2]); //請求記号4があれば cln4 = opacClnsChk(clnArray[3]); //請求記号5があれば cln5 = opacClnsChk(clnArray[4]); //請求記号1、2、3、4、5のいずれがあれば、ポップ画面を表示する if(cln1!=" "||cln2!=" "||cln3!=" "||cln4!=" "||cln5!=" "){ //表示内容を編集 var content = ""; var clnArray_new = new Array(5); clnArray_new[0] = cln1; clnArray_new[1] = cln2; clnArray_new[2] = cln3; clnArray_new[3] = cln4; clnArray_new[4] = cln5; //段数の登録データ優先フラグが有効な場合 if(clnlabel_pri == "true"){ var data_cnt = 0; //cln5に値があれば5段表示 if(cln5!=" "){ data_cnt = 5; } //cln4に値があれば4段表示 else if(cln4!=" "){ data_cnt = 4; } //cln3に値があれば3段表示 else if(cln3!=" "){ data_cnt = 3; } //cln2に値があれば2段表示 else if(cln2!=" "){ data_cnt = 2; } //登録データ数がcallno_cntより多ければそちらを優先 if(data_cnt > callno_cnt){ callno_cnt = data_cnt; } } //ラベル内容の構築 content += "

"; for(var i = 0 ; i < callno_cnt ; i++){ //最後の行の場合に、Endのタグを付く if(i + 1 == callno_cnt){ content += ""; content += "
" + clnArray_new[i] + "
"; //最後の行ではない場合に、表示クラスを指定して、下線を表示する }else{ content += "

" + clnArray_new[i] + "

"; } } var cln_popup = document.getElementById("cln_popup"); if(cln_popup == null){ cln_popup = document.createElement('div'); cln_popup.id = "cln_popup"; cln_popup.style.position = "absolute"; document.body.appendChild(cln_popup); } cln_popup.innerHTML = content; var cx = event.clientX + (document.body.scrollLeft || document.documentElement.scrollLeft); var cy = event.clientY + (document.body.scrollTop || document.documentElement.scrollTop); cln_popup.style.left = (cx + 6) + 'px'; cln_popup.style.top = (cy + 6) + 'px'; cln_popup.style.display = 'block'; } } function opacNoteBlock(id,event,note){ var note_popup = document.getElementById("_note_popup"+id); if(note_popup != null){ commonCls.removeBlock("_note_popup"+id); } var params = new Object(); params["action"] = "v3search_view_main_popmes"; params["message"] = note; params["prefix_id_name"] = "note_popup"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; commonCls.sendPopupView(event, params, popupParams); } function opacFtfsrhAjax(bibid,stposVol,id,ajax_area){ url = "/ftfsrh.do?"; url += "bibid="+encodeURIComponent(bibid); url += "&stposVol="+encodeURIComponent(stposVol); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["loading_el"] = $(ajax_area); params["top_el"] = top_el; params["target_el"] = $(ajax_area); commonCls.send(params); } function dspclvByholidLocal(form_id, action, bibid, holid, stposHol, local_area_code){ var w; document.getElementById(form_id).action=action; document.getElementById(form_id).target='Dspclv'; document.getElementById(form_id).pkey.value=bibid; document.getElementById(form_id).pkeyHol.value=holid; document.getElementById(form_id).stposHol.value=stposHol; document.getElementById(form_id).local_area_code.value=local_area_code; w = window.open("", document.getElementById(form_id).target, "location=yes, toolbar=no, directories=no, menubar=no, status=no, resizable=yes, scrollbars=yes, width=225,height=520"); document.getElementById(form_id).hitcntHol.value=''; document.getElementById(form_id).initFlg.value=''; document.getElementById(form_id).submit(); document.getElementById(form_id).target=''; w.focus(); } /** * プリント用共通メソッド * * @param el 印刷したいエレメント(el or string)(必須) * @param width プレビュー画面の広さ default:600 * @param height プレビュー画面の高さ default:600 * @param header_flag プレビュー画面の閉じる等のヘッダー表示 default:true * @param window_name プレビュー画面のWindowタイトル * @return none **/ function v3searchPrint(el, width, height, header_flag, window_name) { width = (width == undefined) ? 600 : width; height = (height == undefined) ? 600 : height; header_flag = (header_flag == undefined) ? true : header_flag; window_name = (window_name == undefined) ? commonLang.printTitle : window_name; if(header_flag) { //egdeの場合のみ閉じるボタンの処理を変える if(browser.isEdge) { var html = "

"+commonLang.close+""+ commonLang.separator+""+commonLang.print+"

"; } else { var html = "

"+commonLang.close+""+ commonLang.separator+""+commonLang.print+"

"; } } else { var html = ""; } var print_script = ""; var disabled_script = "window.opener.commonCls.disableLink(document.body, \"print_btn\", true);"; var re_script = new RegExp('((.|\n|\r|\t)*?)<\/script>', 'ig'); if(typeof el == 'string') { html += "

"; html += el.replace(re_script,""); } else { if(!el.id) { var print_id = "_global_print_el"; el.id = print_id; } else { var print_id = el.id; } html += "
"; //egdeは個別判定で分岐しdivタブを構成 if(browser.isEdge) { html += el.innerHTML.replace(re_script,""); } else if(!browser.isGecko) { html += el.innerHTML.replace(re_script,""); } else { var append_el = el.cloneNode(true); print_script = "document.getElementById('"+print_id+"').appendChild(print_el);"+disabled_script; } } html += "
"; var features="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no"; if (width) { if (window.screen.width > width) features+=", left="+(window.screen.width-width)/2; else width=window.screen.width; features += ", width="+width; } if (height) { if (window.screen.height > height) features+=", top="+(window.screen.height-height)/2; else height=window.screen.height; features+=", height="+height; } var head = document.getElementsByTagName("head")[0]; var links = head.getElementsByTagName("link"); var linkText = ""; linkText += ""; for (var i = 0; i < links.length; i++) { var link = links[i]; if (link.getAttribute("type") == "text/css") { linkText += "\n"; } } var scriptText = ''; if(print_script == "") { var scriptTextPrint = "

"); winprint.document.close(); }catch(e){ winprint.close(); winprint = window.open("", "PrintPreview" , features); if(append_el != undefined) { winprint.print_el = append_el; } winprint.document.open("text/html"); /* ブロック内部のデザインは維持しない */ winprint.document.write("

" + window_name + "

" + linkText + scriptText + ""+"

"+html+scriptTextPrint+"

"); winprint.document.close(); } } function scSiteOpen(id){ document.getElementById("sc_site_open"+id).style.display = 'none'; document.getElementById("sc_site_close"+id).style.display = 'block'; document.getElementById("sc_site_table"+id).style.display = 'block'; } function scSiteClose(id){ document.getElementById("sc_site_open"+id).style.display = 'block'; document.getElementById("sc_site_close"+id).style.display = 'none'; document.getElementById("sc_site_table"+id).style.display = 'none'; } function scSiteCheckAll(id){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = true; }else{ sites[i].checked = false; } } } function scSiteCheck(el,id,gid){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); if(el.checked){ for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = false; break; } } }else{ var all_el = null; var all_flg = true; for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ all_el = sites[i]; }else{ if(sites[i].checked){ all_flg = false; break; } } } if(all_flg){ all_el.checked = true; } } document.getElementById("sc_sitegrp_chk"+gid+id).checked = false; } function scSiteGrpCheck(el,id,gid){ var sites = document.getElementById("sc_site_table"+id).getElementsByTagName('input'); var grpsites = document.getElementById("sc_sitegrp"+gid+id).getElementsByTagName('input'); if(el.checked){ for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ sites[i].checked = false; break; } } for(var i = 0; i < grpsites.length; i++){ grpsites[i].checked = true; } }else{ for(var i = 0; i < grpsites.length; i++){ grpsites[i].checked = false; } var all_el = null; var all_flg = true; for(var i = 0; i < sites.length; i++){ if(sites[i].value == "all"){ all_el = sites[i]; }else{ if(sites[i].checked){ all_flg = false; break; } } } if(all_flg){ all_el.checked = true; } } } function scSiteGrpTgl(id,gid){ var grptglArea = document.getElementById("sc_grptgl"+gid+id); var grpsiteArea = document.getElementById("sc_sitegrp"+gid+id); if(grpsiteArea.style.display == "block"){ grpsiteArea.style.display = "none"; grptglArea.innerHTML = grptglArea.innerHTML.replace("minus.png","plus.png"); }else{ grpsiteArea.style.display = "block"; grptglArea.innerHTML = grptglArea.innerHTML.replace("plus.png","minus.png"); } } function sendSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'sc_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; document.getElementById('opt_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_search"; param += "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); param += "&req_param=" + encodeURIComponent(Form.serialize(form_el)); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function sendSearch_history(id,tab_num,formkeyno){ document.getElementById('search_page'+id+tab_num).innerHTML = ''; document.getElementById('opt_page'+id+tab_num).innerHTML = ''; var top_el = $(id); var param = "v3search_action_main_search"; param += "&tab_num=" + encodeURIComponent(tab_num); var req_param = "formkeyno="+formkeyno; param += "&req_param=" + encodeURIComponent(req_param); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+tab_num); commonCls.send(params); } function scStatus(id,tab_num,system){ var url = "/iframe.do?block_id=" + encodeURIComponent(id); url += "&tab_num=" + encodeURIComponent(tab_num); url += "&system=" + encodeURIComponent(system); url += "&ufi_flg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $('ajax_area'+id+tab_num); commonCls.send(params); } function scLoading(id,tab_num){ var loading_el = $('loading_area'+id+tab_num); if(loading_el != null){ var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); } } function scResearch(siteid,hitcnt,id,num){ document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var scparam = "&siteid="+encodeURIComponent(siteid); scparam += "&sitehitcnt="+encodeURIComponent(hitcnt); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=rsh&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scSearchStop(id,num){ var scparam = "&siteid=&dispname=&sitehitcnt=&stopflg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=rsh&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scListChange(startno,sort,dispnum,id,num){ document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var scparam = "&startno="+encodeURIComponent(startno); scparam += "&sort="+encodeURIComponent(sort); scparam += "&dispnum="+encodeURIComponent(dispnum); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_search&target_act=lst&tab_num=" + num + "&scparam=" + encodeURIComponent(scparam); params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+num); commonCls.send(params); } function scUsrsrd(siteid,sysno,id,event){ var params = new Object(); params["action"] = "v3search_view_main_usrsrd"; params["siteid"] = siteid; params["sysno"] = sysno; params["prefix_id_name"] = "usrsrd"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scDtlurlCheck(url){ if(url.indexOf("http://") == 0 || url.indexOf("https://") == 0){ window.open(url,"detwin"); }else{ var pattern = new RegExp("^/.*?/"); var url_rep = url.replace(pattern,"/"); var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_sitdtl"+"&url="+encodeURIComponent(url_rep); window.open(baseurl+paramurl,"detwin"); } } function scSubmitLink(sysno,linkurlid,locale) { var url = "/lnkurl.do"; url += "?sysno="+sysno; url += "&linkurlid="+linkurlid; url += "&locale="+locale; url += "&ufi_flg=true"; var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_sitdtl"+"&url="+encodeURIComponent(url); window.open(baseurl+paramurl,"_blank"); } function scLinklistButton(target,area_id){ if(target != "myopac"){ var myopac_el = document.getElementById("myopac"+area_id); if(myopac_el != null){ myopac_el.style.display = "none"; } } if(target != "linkresolver"){ var linkresolver_el = document.getElementById("linkresolver"+area_id); if(linkresolver_el != null){ linkresolver_el.style.display = "none"; } } if(target != "bookstore"){ var bookstore_el = document.getElementById("bookstore"+area_id); if(bookstore_el != null){ bookstore_el.style.display = "none"; } } var list_el = document.getElementById(target+area_id); if(list_el.style.display != "block"){ list_el.style.display = "block"; }else{ list_el.style.display = "none"; } } function scCheckSysno(form_el,func){ var boxs = form_el.sysno_check; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function scDownloadOpen(id,event,form_el){ var sysno = Form.serialize(form_el); if(sysno.indexOf("sysno_check") != -1){ sysno = sysno.replace(/sort.*?dispnum.*?&sysno_check=/,""); sysno = sysno.replace(/&sysno_check=/g,","); var params = new Object(); params["action"] = "v3search_view_main_usrdwl"; params["prefix_id_name"] = "download"; params["downloadSysno"] = sysno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function scDownloadFile(id,downloadSysno,format){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=v3search_view_main_usrdwlfile"; paramurl += "&downloadSysno=" + encodeURIComponent(downloadSysno); paramurl += "&format=" + encodeURIComponent(format); location.href = baseurl + paramurl; } function scThumbnailAjax(id,tab_num,isbn,target_id){ var url = "/casimg.do?"; url += "block_id="+encodeURIComponent(id); url += "&tab_num="+encodeURIComponent(tab_num); url += "&isbn="+encodeURIComponent(isbn); var loading_el = $(target_id); var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1 + (loading_el.offsetWidth/2) - loading_imege_offset_x) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; loading_el.appendChild(div_parent); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_ajax&target=opac" + "&url=" + encodeURIComponent(url); params["method"] = "post"; params["top_el"] = top_el; params["target_el"] = $(target_id); params["callbackfunc"] = function(res){ Element.remove(div); }; commonCls.send(params); } function scMyssts(id,event){ var params = new Object(); params["action"] = "v3search_view_main_myssts"; params["prefix_id_name"] = "myssts"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scMyscmp(id,form_el){ var top_el = $(id); var param = "v3search_action_main_myscmp"; param += "&req_param=" + encodeURIComponent(Form.serialize(form_el)); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["callbackfunc"] = function(res){ commonCls.removeBlock('_myssts'+id); }; commonCls.send(params); } function scMysshh(id){ var top_el = $(id); var params = new Object(); params["param"] = "v3search_view_main_mysshh"; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["target_el"] = $('v3_module'+id); commonCls.send(params); } function scMysexe(id,formno){ var top_el = $(id); var params = new Object(); var param = "v3search_view_main_mysexe"; param += "&formno=" + encodeURIComponent(formno); params["param"] = param; params["method"] = "get"; params["loading_el"] = top_el; params["loading_x"] = document.documentElement.clientWidth / 2 + document.documentElement.scrollLeft; params["loading_y"] = document.documentElement.clientHeight / 2 + document.documentElement.scrollTop; params["top_el"] = top_el; params["target_el"] = $('v3_module'+id); commonCls.send(params); } function scMysexeSrh(id,form_el){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var param = "?action=pages_view_main&active_action=v3search_view_main_init"; param += "&block_id="+encodeURIComponent(id.replace("_","")); param += "&tab_num="+encodeURIComponent(v3searchCls[id].disp_num); var search_mode = ""; if(form_el.keywd == null){ search_mode = "detail"; param += "&search_mode=detail"; } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); location.href = baseurl + param; } function scMysdel(id,form_el,event){ var del_formno = Form.serialize(form_el); if(del_formno.indexOf("del_formno") != -1){ var params = new Object(); params["action"] = "v3search_view_main_mysdel"; params["prefix_id_name"] = "mysdel"; params["del_formno"] = del_formno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("検索条件が選択されていません。"); } } function scCheckDelFormno(form_el,func){ var boxs = form_el.del_formno; if(boxs.length){ for(num=0; num < boxs.length; num++){ boxs[num].checked = func; } }else{ boxs.checked = func; } } function scBooklistOpen(id,event,form_el){ var sysno = Form.serialize(form_el); if(sysno.indexOf("sysno_check") != -1){ sysno = sysno.replace(/sort.*?dispnum.*?&sysno_check=/,""); sysno = sysno.replace(/&sysno_check=/g,","); var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["prefix_id_name"] = "booklist"; params["sysno"] = sysno; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['target_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); }else{ alert("書誌が選択されていません。"); } } function scBooklistPut(id,list_id,sysno){ var list_name = document.getElementById("booklist_"+list_id+id).innerHTML; if(confirm(list_name + "へ登録します。") == false){ return; } var top_el = $(id); var param = "v3search_action_main_usrbkl"; param += "&list_id=" + encodeURIComponent(list_id); param += "&sysno=" + encodeURIComponent(sysno); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["callbackfunc"] = function(res){ res = res.replace(/\\n/g,"\n"); alert(res); }; commonCls.send(params); } function scBooklistAdd(id,sysno) { var params = new Object(); params["action"] = "v3search_view_main_usrbkl_add"; params["sysno"] = sysno; commonCls.sendView(id, params); } function scBooklistAddCheck(id,form_el) { var top_el = $(id); var param = "booklist_action_main_check"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ if(res == ""){ var top_el = $(id); var param = "v3search_view_main_usrbkl_check"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["top_el"] = top_el; params["target_el"] = top_el; params["loading_el"] = top_el; commonCls.send(params); }else{ alert(res); } }; commonCls.send(params); } function scBooklistAddList(id,form_el){ var top_el = $(id); var param = "v3search_action_main_usrbkl_add"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["callbackfunc"] = function(res){ res = res.replace(/\\n/g,"\n"); alert(res); var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["sysno"] = form_el.sysno.value; commonCls.sendView(id, params); }; commonCls.send(params); } function scBooklistAddListBack(id,form_el){ var top_el = $(id); var param = "v3search_view_main_usrbkl_add"; param += "&" + Form.serialize(form_el); var params = new Object(); params["param"] = param; params["top_el"] = top_el; params["target_el"] = top_el; params["loading_el"] = top_el; commonCls.send(params); } function scBooklistChangePage(id, sysno, booklist_start){ var params = new Object(); params["action"] = "v3search_view_main_usrbkl"; params["sysno"] = sysno; params["booklist_start"] = booklist_start; commonCls.sendView(id, params); } function appendGoogleScript(id, url, callback){ var script = document.createElement("script"); script.src = url + "&callback="+callback; script.type = "text/javascript"; document.getElementById("googlebooks_script"+id).appendChild(script); } function callbackGoogleScript(res){ if(res != null && res.items){ var item = res.items[0]; var link = item.volumeInfo.previewLink; var isbn13 = null; var identifiers = item.volumeInfo.industryIdentifiers; if(identifiers != null){ for(var i = 0 ; identifiers.length > i ; i++){ if(identifiers[i].type == "ISBN_13"){ isbn13 = identifiers[i].identifier; break; } } } var obj = null; while( (obj = document.getElementById("googlebooks_area_"+isbn13) ) != null ){ if(link != null){ obj.href = link; obj.target = "_blank"; } obj.id = isbn13; var desobj = document.getElementById("googlebooks_des_area_"+isbn13); if(desobj != null){ var description = item.volumeInfo.description; if(description != null){ desobj.innerHTML = description; desobj.id = isbn13; } } } } } function isbnsrcButton(id, el_id, isbn, opac_locale){ var top_el = $('opac_isbnsrc' + el_id); var params = new Object(); params["param"] = { "action":"v3search_view_main_holding_isbnsrc", "block_id":id.replace("_",""), "isbn":isbn, "opac_locale":opac_locale }; params["top_el"] = top_el; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ setIsbnResult(res, el_id); }.bind(this); params["callbackfunc_error"] = function(res){ commonCls.alert(res); }.bind(this); commonCls.send(params); } function setIsbnResult(xml, el_id){ // XMLを解析し、リンクを変動 var tagRoot = xml.getElementsByTagName('root'); var tagHeader = tagRoot[0].getElementsByTagName("header"); var tagHitcnt = tagHeader[0].getElementsByTagName('hitcnt'); var hitCnt = tagHitcnt[0].firstChild.nodeValue; var tagMoveEvent = tagRoot[0].getElementsByTagName("moveevent"); var moveevent = tagMoveEvent[0].firstChild.nodeValue; var tagResultMsg = tagRoot[0].getElementsByTagName("resultmsg"); var resultmsg = tagResultMsg[0].firstChild.nodeValue; var el =null; var displayElement = null; var viewHtml = ""; el = $('opac_isbnsrc_result' + el_id); // ヒット数が0の場合 if(hitCnt == 0){ viewHtml = resultmsg; }else{ viewHtml = ""; viewHtml += resultmsg; viewHtml += ""; } el.innerHTML = viewHtml; Element.addClassName($("opac_isbnsrc" + el_id), "display-none"); Element.removeClassName(el, "display-none"); } function casssrcButton(id, el_id, title, autor, opac_locale){ var top_el = $("opac_casssrc" + el_id); var params = new Object(); params["param"] = { "action":"v3search_view_main_holding_casssrc", "block_id":id.replace("_",""), "title":title, "autor":autor, "opac_locale":opac_locale }; params["top_el"] = top_el; params["loading_el"] = top_el; params["callbackfunc"] = function(res){ setCassResult(res, el_id); }.bind(this); params["callbackfunc_error"] = function(res){ commonCls.alert(res); }.bind(this); commonCls.send(params); } function setCassResult(xml, el_id){ // XMLを解析し、リンクを変更 var tagRoot = xml.getElementsByTagName('root'); var tagHeader = tagRoot[0].getElementsByTagName("header"); var tagHitcnt = tagHeader[0].getElementsByTagName('hitcnt'); var hitCnt = tagHitcnt[0].firstChild.nodeValue; var tagMoveEvent = tagRoot[0].getElementsByTagName("moveevent"); var moveevent = tagMoveEvent[0].firstChild.nodeValue; var tagResultMsg = tagRoot[0].getElementsByTagName("resultmsg"); var resultmsg = tagResultMsg[0].firstChild.nodeValue; var el =null; var displayElement = null; var viewHtml = ""; el = $('opac_casssrc_result' + el_id); // ヒット数が0の場合 if(hitCnt == 0){ viewHtml = resultmsg; }else{ viewHtml = ""; viewHtml += resultmsg; viewHtml += ""; } el.innerHTML = viewHtml; Element.addClassName($("opac_casssrc" + el_id), "display-none"); Element.removeClassName(el, "display-none"); } function opacSearchToIsbn(id, isbn){ v3searchCls[id].opac_block_id = id.replace("_",""); var param = "&tab_num=0"; param += "&search_mode=detail"; var isbnEnc = encodeURIComponent(isbn); param += "&op_param="+encodeURIComponent("isbn_issn="+isbnEnc); openWindowOpacPage(id,"v3search_view_main_init",param); } function opacSearchToTitleAndAuth(id, title, autor){ v3searchCls[id].opac_block_id = id.replace("_",""); var param = "&tab_num=0"; param += "&search_mode=detail"; param += "&op_param="+encodeURIComponent("title=" + title + "&auth=" + autor); openWindowOpacPage(id,"v3search_view_main_init",param); } function openWindowOpacPage(id,act,param){ var baseurl = "https://opac.osaka-gu.ac.jp/index.php"; var paramurl = "?action=pages_view_main&active_action="+act+"&block_id="+v3searchCls[id].opac_block_id; var hash = "#" + act; window.open(baseurl + paramurl + param + hash); } function clearCattp(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); cattp[0].checked = true; cattp[1].checked = false; cattp[2].checked = false; cattp[3].checked = false; if(cattp.length == 5 ){ cattp[4].checked = false; } } function cattpCheckEach(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); if(cattp[1].checked == true || cattp[2].checked == true || cattp[3].checked == true || (cattp.length == 5 && cattp[4].checked == true)) { cattp[0].checked = false; }else{ cattp[0].checked = true; } } function clearCattp2(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); cattp[0].checked = false; cattp[1].checked = false; cattp[2].checked = false; cattp[3].checked = true; if(cattp.length == 5 ){ cattp[3].checked = false; cattp[4].checked = true; } } function cattpCheckEach2(id) { var cattp = document.getElementById("sc_cattp_table"+id).getElementsByTagName('input'); if(cattp[0].checked == true || cattp[1].checked == true || cattp[2].checked == true || (cattp.length == 5 && cattp[3].checked == true)) { if(cattp.length == 4){ cattp[3].checked = false; }else if(cattp.length == 5){ cattp[4].checked = false; } }else{ if(cattp.length == 4){ cattp[3].checked = true; }else if(cattp.length == 5){ cattp[4].checked = true; } } } function sendEdsSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'eds_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var top_el = $(id); var param = "v3search_action_main_eds"; param += "&" + Form.serialize(form_el); document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; //ブラウザのアドレスバーに表示するURLを生成(ブラウザの履歴からGET送信可能にするため) var pathname = location.pathname; var get_action = "?action=pages_view_main&active_action=v3search_view_main_init"; var block_id = "&block_id=" + id.replace("_",""); var tab_num = "&tab_num=" + encodeURIComponent(v3searchCls[id].disp_num); var search_mode = "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); var op_param = "&op_param=" + encodeURIComponent(Form.serialize(form_el)); var hash = location.hash; window.history.replaceState(null, null, pathname + get_action + op_param + block_id + tab_num + search_mode + hash); }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function edsChangePage(id,form_id,page){ var form_el = $(form_id); if(form_el != null && form_el["pagenumber"].value != null){ form_el["pagenumber"].value = page; sendEdsSearch(form_el,id); } } function edsFacet(id,form_id,facetact){ var form_el = $(form_id); if(form_el != null && form_el["facetact"].value != null){ form_el["facetact"].value = facetact; sendEdsSearch(form_el,id); } } function scOdrPopup(id, event, siteid, sysno, tab_num, rec_num){ url = "/ufiill.do"; url += "?siteid="+encodeURIComponent(siteid); url += "&sysno="+encodeURIComponent(sysno); url += "&mode=odr"; url += "&tab_num=" + encodeURIComponent(tab_num); var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form != null && Form.serialize(siteid_form) != ""){ url += "&" + Form.serialize(siteid_form); } var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "sc"; params["url"] = url; params["close_btn"] = "false"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scIllPopup(id, event, siteid, sysno, tab_num, rec_num){ url = "/ufiill.do"; url += "?siteid="+encodeURIComponent(siteid); url += "&sysno="+encodeURIComponent(sysno); url += "&mode=ill"; var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form != null && Form.serialize(siteid_form) != ""){ url += "&" + Form.serialize(siteid_form); } var params = new Object(); params["action"] = "v3search_view_main_popup"; params["target"] = "sc"; params["url"] = url; params["close_btn"] = "false"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function scIllPopupLibsrh(id, event, siteid, sysno, tab_num, rec_num, error_mes){ var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); if(siteid_form == null || Form.serialize(siteid_form) == ""){ alert(error_mes); }else{ scIllPopup(id, event, siteid, sysno, tab_num, rec_num); } } //書誌同定処理実行 function scLibsrch(id, tab_num, rec_num, isbn, attgrp_flg) { if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var form_el = document.getElementById("sc_usrlibsrh"+id+tab_num); form_el.event.value = ""; form_el.isbn.value = isbn; var sc_param = Form.serialize(form_el); var libsrh_id = "libsrh"; if(attgrp_flg == true){ libsrh_id = "libattsrh"; sc_param += "&attgrp_flg=true"; } scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; params["callbackfunc"] = function(res){ scLoadingDelete(libsrh_id + '_loading_area' + id + tab_num + rec_num); var json = (new Function("return " + res))(); var status = json["status"]; if(status == "LOAD"){ var message = json["message"]; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = message; var button = json["button"]; //中止ボタンのonclick部分を作成する button = button.replace("onclick=''","onclick=\"scLibsrchStop('" + id + "');return false;\""); $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = button; } setTimeout( function(){scLibsrchReload(id, tab_num, rec_num, attgrp_flg);} ,1000); scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); }.bind(this); //書誌同定処理はロック v3searchCls[id].search_lock = true; commonCls.send(params); } function scLibsrchReload(id, tab_num, rec_num, attgrp_flg) { var form_el = document.getElementById("sc_usrlibsrh"+id+tab_num); form_el.event.value = "getResult"; var sc_param = Form.serialize(form_el); var libsrh_id = "libsrh"; if(attgrp_flg == true){ libsrh_id = "libattsrh"; sc_param += "&attgrp_flg=true"; } var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; params["callbackfunc"] = function(res){ scLoadingDelete(libsrh_id + '_loading_area' + id + tab_num + rec_num); var json = (new Function("return " + res))(); var site_mes = json["site_mes"]; for(var i = 0 ; i < json["site"].length ; i++){ if(json["site"][i]){ site_mes += " " + json["site"][i]; } } $('dsite_area' + id + tab_num + rec_num).innerHTML = site_mes; var status = json["status"]; if(status == "LOAD"){ var message = json["message"]; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = message; var button = json["button"]; //中止ボタンのonclick部分を作成する button = button.replace("onclick=''","onclick=\"scLibsrchStop('" + id + "');return false;\""); $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = button; setTimeout( function(){scLibsrchReload(id, tab_num, rec_num, attgrp_flg);} ,1000); scLoadingDisp(libsrh_id + '_loading_area' + id + tab_num + rec_num); }else{ var message = json["message"]; $(libsrh_id + '_ajax' + id + tab_num + rec_num).innerHTML = message; $(libsrh_id + '_mes' + id + tab_num + rec_num).innerHTML = ""; var siteid_form = document.getElementById("lib_siteid_form" + id + tab_num + rec_num); siteid_form.innerHTML = ""; for(var i = 0 ; i < json["siteid"].length ; i++){ if(json["siteid"][i]){ var element = document.createElement('input'); element.type = "hidden"; element.name = "owning"; element.value = json["siteid"][i]; siteid_form.appendChild(element); } } //ロック解除 v3searchCls[id].search_lock = false; } }.bind(this); commonCls.send(params); } function scLibsrchStop(id) { var sc_param = "stopflg=true"; var top_el = $(id); var params = new Object(); params["param"] = "v3search_action_main_usrlibsrh" + "&sc_param=" + encodeURIComponent(sc_param); params["method"] = "post"; params["top_el"] = top_el; commonCls.send(params); } function scLoadingDisp(loading_id){ var loading_el = $(loading_id); if(loading_el != null){ var div_parent = document.createElement("DIV"); div_parent.innerHTML = "

\"loading\"

"; var div = div_parent.childNodes[0]; Element.addClassName(div,"loading"); var loading_imege_offset_x = 8; var loading_imege_offset_y = 8; var offset = Position.cumulativeOffset(loading_el); var ex1 = offset[0]; var ey1 = offset[1]; div.style.left = (ex1) +"px"; div.style.top = (ey1 + (loading_el.offsetHeight/2) - loading_imege_offset_y + 10) +"px"; div_parent.id = "load_div" + loading_id; loading_el.appendChild(div_parent); } } function scLoadingDelete(loading_id){ var loading_el = $(loading_id); var load_div = document.getElementById("load_div" + loading_id); if(loading_el != null && load_div != null){ loading_el.removeChild(load_div); } } function scCreIllPopup(id, event){ var params = new Object(); params["action"] = "v3search_view_main_usrcreill"; params["prefix_id_name"] = "scill"; var popupParams = new Object(); var top_el = $(id); popupParams['top_el'] = top_el; popupParams['modal_flag'] = true; commonCls.sendPopupView(event, params, popupParams); } function sendSummonSearch(form_el,id){ v3searchCls[id].old_search_form = form_el.cloneNode(true); formConvert(form_el,v3searchCls[id].old_search_form); v3searchCls[id].search_mode = v3searchCls[id].disp_search_mode; if(v3searchCls[id].opac_block_id != null){ var tabs = document.getElementById('tab_area'+id).getElementsByTagName('li'); if(tabs != null){ for(var num = 0 ; num < tabs.length ; num++) { if(tabs[num].className == 'summon_tab_present') break; } }else{ var num = v3searchCls[id].disp_num; } var param = "&tab_num="+encodeURIComponent(num); if(v3searchCls[id].search_mode != null){ param += "&search_mode="+encodeURIComponent(v3searchCls[id].search_mode); } param += "&op_param="+encodeURIComponent(Form.serialize(form_el)); sendOpacPage(id,"v3search_view_main_init",param); }else{ if(v3searchCls[id].search_lock == true){ alert("処理の実行中です。そのままお待ちください。"); return false; } var top_el = $(id); var param = "v3search_action_main_summon"; param += "&" + Form.serialize(form_el); document.getElementById('search_page'+id+v3searchCls[id].disp_num).innerHTML = ''; var params = new Object(); params["param"] = param; params["method"] = "post"; params["loading_el"] = top_el; params["top_el"] = top_el; params["target_el"] = $('search_page'+id+v3searchCls[id].disp_num); params["callbackfunc"] = function(res){ //二度押し防止:ロック解除 v3searchCls[id].search_lock = false; }.bind(this); //二度押し防止:ロック v3searchCls[id].search_lock = true; commonCls.send(params); } } function summonChangePage(id,form_id,page){ var form_el = $(form_id); if(form_el != null && form_el["pagenumber"].value != null){ form_el["pagenumber"].value = page; sendSummonSearch(form_el,id); } } function summonChangeList(id,form_id){ var form_el = $(form_id); if(form_el != null){ sendSummonSearch(form_el,id); } } function summonFacet(id,form_id,facetact,rangeflg){ var form_el = $(form_id); if(form_el != null){ if(rangeflg){ form_el["facetactRange"].value = facetact; }else{ form_el["facetact"].value = facetact; } sendSummonSearch(form_el,id); } } function summonFacetRemove(id,form_id,facetremove,rangeflg){ var form_el = $(form_id); if(form_el != null){ if(rangeflg){ form_el["facetremoveRange"].value = facetremove; }else{ form_el["facetremove"].value = facetremove; } sendSummonSearch(form_el,id); } } function summonSuggested(id,suggested){ var tab_num = v3searchCls[id].disp_num; var form_el = document.getElementById('summon_tab_form'+id+tab_num); if(form_el != null){ form_el["keywd"].value = suggested; sendSummonSearch(form_el,id); } } function summonSetExFacet(form_id,target,flg){ var form_el = $(form_id); if(form_el != null && form_el[target] != null){ form_el[target].value = flg; } } function summonConvertKeywd(id,num){ var simple = document.getElementById('summon_tab_form'+id+num); var detail = document.getElementById('summon_tab_detail_form'+id+num); if(simple != null && simple["keywd"] != null && detail != null && detail["keywd"] != null){ detail.reset(); detail["keywd"].value = simple["keywd"].value; } } if(!announcementCls["_721"]) { announcementCls["_721"] = new clsAnnouncement("_721"); } if(!announcementCls["_667"]) { announcementCls["_667"] = new clsAnnouncement("_667"); } if(!announcementCls["_639"]) { announcementCls["_639"] = new clsAnnouncement("_639"); } if(!announcementCls["_669"]) { announcementCls["_669"] = new clsAnnouncement("_669"); } if(!pushlistCls["_476"]) {pushlistCls["_476"] = new clsPushlist("_476");}if(!pushlistCls["_467"]) {pushlistCls["_467"] = new clsPushlist("_467");} if(!announcementCls["_762"]) { announcementCls["_762"] = new clsAnnouncement("_762"); } if(!announcementCls["_676"]) { announcementCls["_676"] = new clsAnnouncement("_676"); } if(!announcementCls["_930"]) { announcementCls["_930"] = new clsAnnouncement("_930"); } if(!announcementCls["_763"]) { announcementCls["_763"] = new clsAnnouncement("_763"); } if(!pushlistCls["_671"]) {pushlistCls["_671"] = new clsPushlist("_671");} if(!loginCls["_0"]) { loginCls["_0"] = new clsLogin("_0"); } loginCls["_0"].initializeFocus(); loginCls["_0"].setButtonStyle($("login_login_button_0")); loginCls["_0"].setButtonStyle($("login_cancel_button_0")); $("login_id_0").setAttribute("autocomplete", "off"); $("password_0").setAttribute("autocomplete", "off"); function loginMfaMode(id){ } commonCls.moduleInit("_333",0);commonCls.moduleInit("_1786",0);commonCls.moduleInit("_616",0);commonCls.moduleInit("_2199",0);commonCls.moduleInit("_714",0);commonCls.moduleInit("_939",0);pagesCls.pageInit(0);pagesCls.setShowCount(126,156);pagesCls.setToken(126,"8d54f11495f21aad3a2f64cce0e2f059",true);pagesCls.setShowCount(4,199);pagesCls.setToken(4,"4c091c6f9e3f925f16ab52ee775ef185");pagesCls.setShowCount(5,6);pagesCls.setToken(5,"6f4cd3c5f8996bda325a54109c90d38e");pagesCls.setShowCount(3,145);pagesCls.setToken(3,"f4f126bbc4f4e0de17710ca82abfb7a4");