var tempPTop=0; var headerboxobj=document.getElementById("headerbox"); var headerposition=0; var scrolldirection=""; var scrollstartpos=0; window.onresize=function(){ followResponsive(); }; function sleep(msec) { return new Promise(function(resolve) { setTimeout(function() {resolve()}, msec); }) } async function init0() { if(pid!="index"){ if(target=document.getElementById("cover1a")){ target.style.display="none"; } if(target=document.getElementById("cover1b")){ target.style.display="none"; } if(target=document.getElementById("cover2a")){ target.style.display="none"; } if(target=document.getElementById("cover2b")){ target.style.display="none"; } action4("trianglelogo",0,0.2); action5("triangleboxfg",0,0.15); action6("img1",0,0); if(target_wait=document.getElementById("wait")){ target_wait.style.display="none"; } init1(); init2(); } else { await sleep(200); if(target_wait=document.getElementById("wait")){ target_wait.firstChild.classList.add("zoomin"); } await sleep(350); init1(); init2(); } var allimages=document.getElementsByTagName("img"); for(i=0; i0){ for(i=0;i scrollstartpos) { scrolldirection="down"; } else { scrolldirection="up"; } scrollstartpos=scrollcurrentpos; followResponsive(tempPTop); fadeinimages(); if(target=document.getElementById("totop")){ str=target.className; if(str.match("fadeout")){ target.className=str.replace(/v0/,"v1"); target.classList.remove("fadeout"); target.classList.add("fadein"); } if(tempPTop==0){ target.classList.remove("fadein"); target.classList.add("fadeout"); } if(target2=document.getElementById("trianglefooter")){ if((getDocHeight() - tempPTop - window.innerHeight - target2.clientHeight ) < -140 ){ target.style.position="absolute"; target.style.bottom=(target2.clientHeight - 120 )+"px"; } else { target.style.position="fixed"; target.style.bottom="20px"; } } } } } var windowWidth; function followResponsive(){ windowWidth=window.innerWidth; if(target=document.getElementById("testobj1")){ target.innerHTML=windowWidth; } if(target=document.getElementById("triangleboxbg")){ } if(target91=document.getElementById("triangleheader")){ } if(target92=document.getElementById("menu1")){ } if(target93=document.getElementById("triangleboxbg")){ } if(target94=document.getElementById("menu1b_toplogo")){ } if(target91.clientHeight - tempPTop<120){ target91.style.marginTop= -(target91.clientHeight - 120)+"px" target91.style.position="fixed"; target93.style.zIndex="1"; target93.style.pointerEvents="none"; target94.className=target94.className.replace(/v0/,"v1"); target94pos=((target91.clientHeight - tempPTop - 120 + target94.clientHeight -10 ) / -1 ); if(target94pos<=0){ target94.style.top=target94pos+"px"; } else { target94.style.top="0px"; } } else { target91.style.marginTop="0px"; target91.style.position="absolute"; target93.style.zIndex="initial"; target93.style.pointerEvents="initial"; target94.className=target94.className.replace(/v1/,"v0"); } target92.style.paddingLeft=null; if(windowWidth>750){ if(pid!="index"){ target92paddingLeft=250; target92.style.position="fixed"; target92.className="menu1b"; target92.style.top="0px"; target92paddingLeft=target92paddingLeft-tempPTop; if(target92paddingLeft>=110){ target92.style.paddingLeft=target92paddingLeft+"px"; } } else { if(target91.clientHeight - tempPTop<120){ target92.style.position="fixed"; target92.className="menu1b"; target92pos=((target91.clientHeight - tempPTop - 120 + target92.clientHeight ) / -1 ); if(target92pos<=0){ target92.style.top=target92pos+"px"; } else { target92.style.top="0px"; } } else { target92.style.top="initial"; target92.style.marginTop="0px"; target92.className="menu1a"; target92.style.position="absolute"; } } target92.style.height="initial"; PPP['menu1']['openstatus']="closed" } else { if(PPP['menu1']['openstatus']=="open"){ } else { target92.className="menu1b"; target92.style.position="fixed"; target92.style.top="0px"; target92.style.height="0"; } } } function getScrollTop() { if (document.all){ if(document.documentElement.scrollTop){ tempPTop=document.documentElement.scrollTop; } else { tempPTop=document.body.scrollTop; }; } else { tempPTop=window.pageYOffset; }; if(target=document.getElementById("testobj2")){ target.innerHTML=tempPTop; } return tempPTop; } function fadeinimages(){ if(fadeinimageslist=document.getElementsByClassName2("fadein1")){ for(i=0;itargetObj.getBoundingClientRect().top+windowY-windowH+-20){ console.log(datacount); var datacount=targetObj.getAttribute("data-count"); var delaytime=datacount*70; setTimeout(function(){ targetObj.className=targetObj.className.replace(/fadein1/,"fadein2"); },delaytime); } } } function targetfocusandcusortolast(objId){ if(target=document.getElementById(objId)){ target.focus(); var len=target.value.length; target.setSelectionRange(len, len); } }; function showhide2(v){ if(v.id){ if(target=document.getElementById(v.id)){ str=target.className; if(str.match("v0")){ } else { target.style.display="none"; } } } } function showhide(a,b,mode){ if(target=document.getElementById(a)){ str=target.className; if(mode=="v1"){ target.className=str.replace(/v0/,"v1"); } else if(mode=="v0"){ target.className=str.replace(/v1/,"v0"); } else if(str.match(/v0/)){ target.className=str.replace(/v0/,"v1"); if(target2=document.getElementById(b)){ target2.className="v0"; }; } else if(str.match(/v1/)){ target.className=str.replace(/v1/,"v0"); if(target2=document.getElementById(b)){ target2.className="v1"; }; } else { target.className="v0"; }; }; }; function z_slidebox(v){ if ($("#"+v).is(":hidden")) { $("#"+v).slideDown("fast"); } else { $("#"+v).slideUp("fast"); } } function activateorderpage(){ if(target=document.getElementById('jsbody')){ target.className='v1'; } } function rcpopup(obj,url,mode){ if(mode==1){ if(t=obj.parentNode){ if(a=document.getElementById("asff")){ a.parentNode.removeChild(a); } var element=document.createElement('div'); element.id="asff"; element.className="rcpopup"; t.appendChild(element); readRemoteData("asff",url); } else { return; }; } else { if(a=document.getElementById("asff")){ a.parentNode.removeChild(a); }; }; } httpRequest=false; if(window.XMLHttpRequest) { httpRequest=new XMLHttpRequest(); if (httpRequest.overrideMimeType) { httpRequest.overrideMimeType('text/xml'); }; } else if(window.ActiveXObject) { try { httpRequest=new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { httpRequest=new ActiveXObject('Microsoft.XMLHTTP'); }; }; function readRemoteData(target,page){ if(page == '') return; httpRequest.abort(); httpRequest.open('GET',page, true); httpRequest.onreadystatechange=function() { if(httpRequest.readyState == 4) { if(httpRequest.status == 200) { document.getElementById(target).innerHTML=httpRequest.responseText; }; }; }; httpRequest.send(null); }; var PPP=new Array(); function rcSlideBox(objId,min,max,forceslidemode){ if(document.getElementById(objId)){ if(!PPP[objId]){ PPP[objId]=new Array(); } PPP[objId]['edgingvalue']=100 ; PPP[objId]['stepcount']=0 ; PPP[objId]['division']=10 ; if(min || max){ PPP[objId]['resetsize']=0 ; } else { PPP[objId]['resetsize']=1 ; } if(PPP[objId]['timer']){ clearTimeout(PPP[objId]['timer']); PPP[objId]['stepcount']=0; } if(!PPP[objId]['openstatus']){ if( document.getElementById(objId).className.search("v1")>0 || document.getElementById(objId).className.search("v0")<0 ){ PPP[objId]['openstatus']="open"; } else{ PPP[objId]['openstatus']="close"; }; }; if(forceslidemode){ if( (forceslidemode=="open" && PPP[objId]['openstatus']=="open") || (forceslidemode=="close" && PPP[objId]['openstatus']=="closed") ){ return; } if(forceslidemode=="close"){ PPP[objId]['openstatus']="open"; } else if(forceslidemode=="open"){ PPP[objId]['openstatus']="closed"; } } if( (forceslidemode=="close" && PPP[objId]['openstatus']=="open") || (!forceslidemode && PPP[objId]['openstatus']=="open") ){ if(min){ PPP[objId]['minsize']=min; } else { PPP[objId]['minsize']=1; } if(max){ PPP[objId]['maxsize']=max; } else { PPP[objId]['maxsize']=document.getElementById(objId).clientHeight; } rcSlideBoxExec(objId,"close"); PPP[objId]['openstatus']="close"; } else if ( forceslidemode=="open" || !forceslidemode ) { document.getElementById(objId).className=document.getElementById(objId).className.replace(/v0/,"v1"); document.getElementById(objId).style.height=null; if(min){ PPP[objId]['minsize']=min; } else { PPP[objId]['minsize']=1; } if(max){ PPP[objId]['maxsize']=max; } else { PPP[objId]['maxsize']=document.getElementById(objId).clientHeight; } document.getElementById(objId).style.height=0+"px"; rcSlideBoxExec(objId,"open"); PPP[objId]['openstatus']="open"; } } } function rcSlideBoxExec(objId,slidemode){ target=document.getElementById(objId); if(PPP[objId]['stepcount']++ < PPP[objId]['division']){ var c=PPP[objId]['stepcount']/PPP[objId]['division'] ; if(slidemode=="open"){ var x=Math.floor(PPP[objId]['minsize']+((PPP[objId]['maxsize']-PPP[objId]['minsize'])*(c+PPP[objId]['edgingvalue']/(100*Math.PI)*Math.sin( Math.PI*c)))); } else if(slidemode=="close") { var x=Math.floor(PPP[objId]['maxsize']-((PPP[objId]['maxsize']-PPP[objId]['minsize'])*(c+PPP[objId]['edgingvalue']/(100*Math.PI)*Math.sin( Math.PI*c)))); } PPP[objId]['timer']=setTimeout( "rcSlideBoxExec(\""+objId+"\",\""+slidemode+"\");" , 30 ); target.style.height=x+"px"; } else { PPP[objId]['stepcount']=0 ; if(slidemode=="open"){ if(PPP[objId]['resetsize']==1){ target.style.height=null; } } else { document.getElementById(objId).className=document.getElementById(objId).className.replace(/v1/,"v0"); } } } function zipfix(v,type){ var R2=v.innerHTML.split("_"); document.getElementById(type+"address1").value=R2[0]; pulldown_option=document.getElementById(type+"address1").getElementsByTagName('option'); for(i=0; i"); var RESPONSE=""; if(R1.length>1){ for(i=0;i"+R2[1]+"_"+R2[2]+"
"; } showhide(type+"addresslistbox","","v1"); document.getElementById(type+"addresslist").innerHTML=RESPONSE; } else if (R1.length==1){ var R2=R1[0].split("_"); showhide(type+"addresslistbox","","v0"); var sel=document.getElementById(type+"address1").options; for(var i=0; i=7){ if(v.value==rememberZipValue){ } else { zipsearch(type,pid); rememberZipValue=v.value; } } } httpRequest=false; if(window.XMLHttpRequest) { httpRequest=new XMLHttpRequest(); if (httpRequest.overrideMimeType) { httpRequest.overrideMimeType('text/xml'); }; } else if(window.ActiveXObject) { try { httpRequest=new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { httpRequest=new ActiveXObject('Microsoft.XMLHTTP'); }; }; function cztoh(v){ var han= '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@-.,:'; var zen= '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@-.,:'; for(i=0;i= rScrArr.tcurrentTopPosition) endFlag=1; }; if (endFlag){ rScrArr.tcurrentTopPosition=rScrArr.TargetElementPosition; rScrArr.timeId=clearInterval(rScrArr.timeId); }; scrollTo(rScrArr.currentLeftPosition, rScrArr.tcurrentTopPosition) }; function clearallchecks(id){ if(target=document.getElementById(id)){ var childarray=target.childNodes; for (var i=0; i1){ for (var j=0; j0){ target.disabled=false; } else { target.disabled=true; } } } function blockremove(target){ if(objId=target.parentNode.parentNode.id){ document.getElementById("messageeditbox").removeChild(document.getElementById(objId)); createMessageOrder(); }; }; function blockadd(type,target){ mcount=document.getElementById("message_count").value; mcount++; document.getElementById("message_count").value=mcount; var newid="block_"+mcount; var addfunctions="
"; addfunctions+="見出しを追加 "; addfunctions+="画像を追加 "; addfunctions+="段落を追加 "; addfunctions+="
"; var deletefunction="削除"; if(next=target.parentNode.parentNode.nextSibling){ var newelement=document.createElement('div'); newelement.id=newid; newelement.className="addedbox"; document.getElementById("messageeditbox").insertBefore(newelement,next); if(targetdiv=document.getElementById(newid)){ switch(type){ case"jsimage": targetdiv.innerHTML="
"+deletefunction +"▼新しい画像
" +"
" +"" +"" +"
" +"
0
" +"
" +"
" +"縦横比率 : " +" " +" " +"
" +"画像位置 : " +" " +" " +" " +"
" +"画像の幅(中央の場合) : " +" " +" " +" " +"
画像キャプション " +"
" +addfunctions; targetdiv.id="message_uploadfile_"+mcount+""; document.getElementById("message_uploadfile_"+mcount+"_button").click(); break; case"jsheader": targetdiv.innerHTML+="
"+deletefunction+"
"+addfunctions; targetdiv.id="message_header_"+mcount+""; break; case"jstextarea": targetdiv.innerHTML+="
"+deletefunction+"
"+addfunctions; targetdiv.id="message_paragraph_"+mcount+""; break; }; }; createMessageOrder(mcount); }; }; function controlfloat(floattype,objId){ var tmparray=new Array("50","75","100"); if(obj=document.getElementById(objId+"_float")){ if(floattype!="blogimgc"){ obj.disabled=""; for(i=0;i5242880){ alert("ファイルサイズは5MB以下でご用意下さい(現在 "+Math.floor(size/1024/1024)+"MB)。"); target.value=""; return; } } agentprojectid=document.getElementById("agentprojectid").value; var formData=new FormData(document.getElementById("my_form")); document.getElementById("imgerror_"+v).innerHTML=""; var xhr=new XMLHttpRequest(); document.getElementById("progressbarbg_"+v).className=document.getElementById("progressbarbg_"+v).className.replace(/v0/,"v1"); document.getElementById("imguploaddelete_"+v).value=""; xhr.onreadystatechange=function() { if (xhr.readyState == 4 && xhr.status == 200) { document.getElementById("progressbar_"+v).style.width="100%"; if(xhr.responseText.match("★")){ document.getElementById("progressbar_"+v).style.backgroundColor="#a00"; document.getElementById("progressstatusvalue_"+v).innerHTML="エラー"+v; document.getElementById("imgerror_"+v).innerHTML=xhr.responseText; } else { document.getElementById("progressbar_"+v).style.backgroundColor="#0a0"; document.getElementById("progressstatusvalue_"+v).innerHTML="アップロード完了"+v; document.getElementById("imguploaded_"+v).value=xhr.responseText; document.getElementById("imguploadedcurrent_"+v).innerHTML=xhr.responseText; document.getElementById("imguploadcancel_"+v).className=null; } } }; xhr.upload.addEventListener("load", function(e){ }, false); xhr.upload.addEventListener("error", function(e){ }, false); xhr.upload.addEventListener("abort", function(e){ }, false); xhr.upload.addEventListener("progress", function(e){ onProgressHandler(e,v); }, false); xhr.open("POST", rpath+"x_uploadfile.php?agentprojectid="+agentprojectid+"&f="+v, true); xhr.send(formData); } function ajax_upload_img(v,mode) { var imagesizelimit=5; if(target=document.getElementById("selectedfile_"+v)){ var size=target.files[0].size; if(size>(imagesizelimit*1024*1024)){ alert("ファイルサイズは"+imagesizelimit+"MB以下でご用意下さい(現在 "+Math.floor(size/1024/1024)+"MB)。"); target.value=""; return; } } if(document.getElementById("projectno")){ filenamebasenumber=document.getElementById("projectno").value; } else if (document.getElementById("temporaryno")){ filenamebasenumber=document.getElementById("temporaryno").innerHTML; } var formData=new FormData(document.getElementById("my_form")); if(mode=="blog"){ var tmparray=document.getElementsByTagName("input"); for(i=0; i"; document.getElementById("popup").innerHTML=newsrc; } } function controlpopupbgclick(mode){ if(mode==1){ popupbgstatus=1; } else { popupbgstatus=0; } } function controlpopup(v){ if(v==0){ popupmode=0; } else { popupmode=1; } } function popup_adjustposition(mode){ document.getElementById("popupbox").style.marginTop=(getWinYOffset()+20)+"px"; document.getElementById("popupimg").className="v1"; } function closepopup(){ enableScroll(); document.getElementById("popup").className="v0"; document.getElementById("popupimg").className="v0"; } function getWinYOffset(){ if(window.scrollY) return window.scrollY; if(window.pageYOffset) return window.pageYOffset; if(document.documentElement && document.documentElement.scrollTop){ return document.documentElement.scrollTop; } else if(document.body && document.body.scrollTop){ return document.body.scrollTop; } return 0; }; function getWindowHeight(){ if(window.innerHeight) return window.innerHeight; if(document.documentElement && document.documentElement.clientHeight){ return document.documentElement.clientHeight; } else if(document.body && document.body.clientHeight){ return document.body.clientHeight; } return 0; }; function getWindowWidth(){ if(window.innerWidth) return window.innerWidth; if(document.documentElement && document.documentElement.clientWidth){ return document.documentElement.clientWidth; } else if(document.body && document.body.clientWidth){ return document.body.clientWidth; } return 0; }; function getDocumentHeight() { var D=document; return Math.max( Math.max(D.body.scrollHeight, D.documentElement.scrollHeight), Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), Math.max(D.body.clientHeight, D.documentElement.clientHeight) ); }; function preventDefault(e) { e=e || window.event; if (e.preventDefault) e.preventDefault(); e.returnValue=false; }; function preventDefaultForScrollKeys(e) { if (keys[e.keyCode]) { preventDefault(e); return false; }; }; var passiveSupported=false; try { document.addEventListener("test", null, Object.defineProperty({}, "passive", { get: function() { passiveSupported=true; } })); } catch(err) {} function touchmovelistener(e){ e.preventDefault(); }; function disableScroll() { return; document.addEventListener('touchmove', touchmovelistener, passiveSupported ? { passive: false } : false); if (window.addEventListener) window.addEventListener('DOMMouseScroll', preventDefault, false); window.onwheel=preventDefault; window.onmousewheel=document.onmousewheel=preventDefault; window.ontouchmove =preventDefault; document.onkeydown =preventDefaultForScrollKeys; target=document.getElementById("front").className=document.getElementById("front").className+" fixed"; }; function enableScroll() { return; document.removeEventListener('touchmove', touchmovelistener, passiveSupported ? { passive: false } : false); if (window.removeEventListener) window.removeEventListener('DOMMouseScroll', preventDefault, false); window.onmousewheel=document.onmousewheel=null; window.onwheel=null; window.ontouchmove=null; document.onkeydown=null; target=document.getElementById("front").className=document.getElementById("front").className.replace(" fixed",""); }; function startyoutubemovie3(obj,protocol){ target1=obj; target2=target1.nextSibling; target3=target2.nextSibling; youtubeid=target2.getAttribute("data-youtubeid"); w=target2.width; h=target2.height; if(target1 && target2 && target3 && w && h && youtubeid){ target1.style.display="none"; target2.style.display="none"; target3.innerHTML=""; console.log(target3.innerHTML); } }; function simulateRadioCheckbox(obj){ if(obj.type=="checkbox"){ if(obj.checked==true){ obj.parentNode.className="label1"; } else { obj.parentNode.className=obj.parentNode.className.replace("label1",""); } } else if (obj.type=="radio"){ array=document.getElementsByName(obj.name); if(array.length>0){ for(i=0;i