//------------------------------------------------------- function tglTmp1Dialog(type,url,CB2){ var elm_1 = document.getElementById("tmp1_dialog"); var elm_2 = document.getElementById("tmp1_dialog_box"); var elm_3 = document.getElementById("tmp1_dialog_close"); if(!hsfwJsBase.isset(type) || elm_1.style.height=="100%"){ elm_2.innerHTML = ""; elm_1.style.backgroundColor="rgba(0,0,0,0)"; setTimeout(function(){elm_1.style.height="0%";}, 200); return; }else{ var h = window.innerHeight; elm_1.style.height=h + "px"; elm_1.style.backgroundColor="rgba(0,0,0,0.5)"; if(type==1){ hsfwJs.ajaxGet(url,1,tglTmp1DialogCB,CB2,""); }else if(type==2 || type==3){ if(type==2){ elm_2.innerHTML = url; }else{ elm_2.innerHTML = decodeURIComponent(escape(atob(url))); } tglTmp1DialogPosi(); } return; } } function tglTmp1DialogCB(res,ret,callBack2,param){ var elm = document.getElementById("tmp1_dialog_box"); if(res != 1 || !hsfwJsBase.isJson(ret)){ elm.innerHTML = ret; tglTmp1DialogPosi(); return; } var jobj=JSON.parse(ret); if(jobj.ret_type==8){ location.href = jobj.ret_val; return; } if(jobj.ret_type==9){ elm.innerHTML = jobj.ret_val; tglTmp1DialogPosi(); return; } elm.innerHTML = jobj.ret_val; tglTmp1DialogPosi(); if(callBack2!=null && callBack2!=""){ callBack2(ret,param); return; } return; } function tglTmp1DialogPosi(){ var h = window.innerHeight; var elm_2 = document.getElementById("tmp1_dialog_box"); var elm_3 = document.getElementById("tmp1_dialog_close"); var m = h*0.2; elm_2.style.marginTop= m + "px"; st = window.getComputedStyle(elm_2, null); var st_h = st.height.replace("px",""); if(st_h > h*0.6){ elm_2.style.height = h*0.6 + "px"; elm_2.style.overflow = "scroll"; } } //------------------------------------------------------- function setBtnLoading(elm,type){ elm.disabled = true; elm.style.cursor = "default"; el = window.getComputedStyle(elm, null); var el_lh = el.lineHeight; var eli_w = el.width.replace("px","") - el.paddingLeft.replace("px","") - el.paddingRight.replace("px",""); hsfwJsBase.setCookie("btn_txt_" + elm.id,elm.innerHTML,60*60*2,"index.html","www.ishibashi.co.jp"); hsfwJsBase.setCookie("btn_bgc_" + elm.id,el.backgroundColor,60*60*2,"index.html","www.ishibashi.co.jp"); if(!type || type < 1){ elm.style.backgroundColor="#ffffff"; elm.style.borderColor="#ffffff"; }else if(type && type=='1'){ } elm.innerHTML = "
"; } function resBtnLoading(elm){ elm.disabled = false; elm.style.cursor = "pointer"; elm.style.backgroundColor = hsfwJsBase.getCookie("btn_bgc_" + elm.id); elm.innerHTML = hsfwJsBase.getCookie("btn_txt_" + elm.id); } //------------------------------------------------------- function tglCategoryMenu(e,CB2){ /* el1 = document.getElementById("document_main").currentStyle || window.getComputedStyle(document.getElementById("document_main"), null); el2 = document.getElementById("document_footer").currentStyle || window.getComputedStyle(document.getElementById("document_footer"), null); var st_h1 = el1.height.replace("px",""); var st_h2 = el2.height.replace("px",""); if(st_h1=='auto'){ st_h1=2000; st_h2=400; } */ st_h1=2200; st_h2=400; var h = st_h1*1 + st_h2*1; el_cat = document.getElementById("search_cat_nav"); var elm_1 = document.getElementById("search_cat"); var elm_2 = document.getElementById("search_cat_menu"); // var elm_3 = document.getElementById("search_cat_close"); if(elm_1.style.height== h + "px"){ el_cat.style.display="none"; elm_1.style.backgroundColor="rgba(0,0,0,0)"; elm_1.style.height="0"; return; }else{ el_cat.style.display="block"; elm_1.style.height=h + "px"; elm_1.style.backgroundColor="rgba(0,0,0,0.5)"; return; } } function tglCategoryMenu2(id){ for(var i=1;i<=100;i++){ oid="search_cat_menu_li_" + i; if(document.getElementById(oid)){ document.getElementById(oid).style.backgroundColor="#ffffff"; document.getElementById(oid).style.color="#000000"; }else{ break; } } document.getElementById("search_cat_menu_li_" + id).style.backgroundColor="#d8231e"; document.getElementById("search_cat_menu_li_" + id).style.color="#ffffff"; document.getElementById("search_cat_menu_3").style.display="none"; for(var i=1;i<=100;i++){ oid="search_cat_menu_2_" + i; if(document.getElementById(oid)){ document.getElementById(oid).style.display="none"; }else{ break; } } tid="search_cat_menu_2_" + id; var elm = document.getElementById(tid).style.display="table"; } function tglCategoryMenu3(id1,id2,tlid,url){ var elm = document.getElementById("search_cat_menu_3"); elm.style.display = "block"; id="search_cat_menu_2_li_" + id1 + "_" + id2; var elm2 = document.getElementById(id); el = elm2.currentStyle || window.getComputedStyle(elm2, null); h = el.height.replace("px",""); pd = (id2 - 1) * h; elm.style.paddingTop= pd + "px"; elm.innerHTML = "
"; } //------------------------------------------------------- function tglSpSearchMenu(e,CB2,flg){ el1 = document.getElementById("document_main").currentStyle || window.getComputedStyle(document.getElementById("document_main"), null); el2 = document.getElementById("document_footer").currentStyle || window.getComputedStyle(document.getElementById("document_footer"), null); var st_h1 = el1.height.replace("px",""); var st_h2 = el2.height.replace("px",""); if(st_h1=='auto'){ st_h1=1200; st_h2=400; } var h = st_h1*1 + st_h2*1; var elm_1 = document.getElementById("tmp2_header_1110_sp_search_win"); if(flg==1 || elm_1.style.height== h + "px"){ elm_1.style.backgroundColor="rgba(0,0,0,0)"; elm_1.style.height="0"; document.body.style.position="relative"; return; }else{ elm_1.style.height=h + "px"; elm_1.style.backgroundColor="rgba(0,0,0,0.5)"; document.getElementById("tmp2_header_1110_sp_search_win_cat_list_outer").style.height="0"; return; } } function tglSpMyMenu(e,CB2,flg){ el1 = document.getElementById("document_main").currentStyle || window.getComputedStyle(document.getElementById("document_main"), null); el2 = document.getElementById("document_footer").currentStyle || window.getComputedStyle(document.getElementById("document_footer"), null); var st_h1 = el1.height.replace("px",""); var st_h2 = el2.height.replace("px",""); if(st_h1=='auto'){ st_h1=1600; st_h2=400; } var h = st_h1*1 + st_h2*1; var elm_1 = document.getElementById("tmp2_header_1110_sp_menu_win"); if(flg==1 || elm_1.style.height== h + "px"){ elm_1.style.backgroundColor="rgba(0,0,0,0)"; elm_1.style.height="0"; document.body.style.position="relative"; document.getElementById("tmp2_header_1110_sp_menu_logo").src="jpg/header_icon_sp_menu_off.jpg"; return; }else{ elm_1.style.height=h + "px"; elm_1.style.backgroundColor="rgba(0,0,0,0.5)"; document.getElementById("tmp2_header_1110_sp_menu_logo").src="jpg/header_icon_sp_menu_on.jpg"; return; } } function tglSpSearchMenuCat(e,CB2){ var el = document.getElementById("tmp2_header_1110_sp_search_win_cat_list"); var st_h1 = hsfwJs.getStyle(el,"height").replace("px",""); var h = st_h1*1; var elm_1 = document.getElementById("tmp2_header_1110_sp_search_win_cat_list_outer"); if(elm_1.style.height== h + "px"){ elm_1.style.height="0"; document.body.style.position="relative"; document.getElementById("tmp2_header_1110_sp_search_win_arrow_txt").style.transform="rotate(0)"; return; }else{ elm_1.style.height=h + "px"; document.body.style.position="fixed"; document.getElementById("tmp2_header_1110_sp_search_win_arrow_txt").style.transform="rotate(90deg)"; return; } } //------------------------------------------------------- function tglPwVisible(id){ if(!document.getElementById(id)){ return; } var elm = document.getElementById(id); if(elm.getAttribute('type')=='password'){ elm.setAttribute('type','email'); }else{ elm.setAttribute('type','password'); } }