if(navigator.platform=="MacPPC"||navigator.platform=="MacIntel"){osPlat="mac";}else{osPlat="win";}if(navigator.userAgent.lastIndexOf("Firefox")>=0){bwsName="firefox";}else if(navigator.userAgent.lastIndexOf("Chrome")>=0){bwsName="chrome";}else if(navigator.userAgent.lastIndexOf("Safari")>=0){bwsName="safari";}else if(navigator.userAgent.lastIndexOf("Netscape")>=0){bwsName="netscape";}else if(navigator.userAgent.lastIndexOf("MSIE")>=0){bwsName="ie";}else if(navigator.userAgent.lastIndexOf("Opera")>=0){bwsName="opera";}else{bwsName="other";}if(navigator.userAgent.lastIndexOf("MSIE 6")>=0){ieType="ie6";}else if(navigator.userAgent.lastIndexOf("MSIE 7")>=0){ieType="ie7";}else if(navigator.userAgent.lastIndexOf("MSIE 8")>=0){ieType="ie8";}else if(navigator.userAgent.lastIndexOf("MSIE 9")>=0){ieType="ie9";}pathbase="../";tarpath="";function styleSetL(tarL,styletype){for(i=0;i<=tarL;i++){if(i>=1){tarpath+=pathbase;}}if(osPlat!=""){document.write('<link rel="stylesheet" type="text/css" href="'+tarpath+'css/textsets_'+osPlat+'_'+styletype+'.css" />');thislevel=tarL;bugkicker();getcache();}}var thisie=false;function bugkicker(){if(osPlat=="win"&&bwsName=="ie"){thisie=true;if(navigator.appVersion.indexOf("MSIE 6.0")>=0||navigator.appVersion.indexOf("MSIE 7.0")>=0){document.write('<link rel="stylesheet" type="text/css" href="'+tarpath+'css/style_winie7.css" />');if(navigator.appVersion.indexOf("MSIE 6.0")>=0){document.write('<link rel="stylesheet" type="text/css" href="'+tarpath+'css/style_winie6.css" />');}document.write('<script type="text/javascript" src="'+tarpath+'js/iepngfix.js" charset="utf-8"></script>');}}}function getcache(){menuArray=new Array('works1','works2','works3','works4','works5','company1','company2','company3','blog1');for(i=0;i<menuArray.length-1;i++){var cacheimg=new Image();cacheimg.src=tarpath+"images/common_menu_"+menuArray[i]+"_on.gif";}}var scrOldY=10000;var scrTimer;function scrtotop(){speed=5;if((osPlat=="mac"&&bwsName=="ie")||bwsName=="safari"||bwsName=="chrome"||(osPlat=="win"&&bwsName=="netscape")){if(document.body.scrollTop>scrOldY){scrEnd();}else{movY=Math.floor((0-document.body.scrollTop)/speed);window.scrollBy(0,movY);scrOldY=document.body.scrollTop;}}else{if(document.documentElement.scrollTop>scrOldY){scrEnd();}else{movY=Math.floor((0-document.documentElement.scrollTop)/speed);window.scrollBy(0,movY);scrOldY=document.documentElement.scrollTop;}}if(movY==0||scrOldY==10000){scrEnd();}else{scrTimer=setTimeout("scrtotop()",30);}}function scrEnd(){scrOldY=10000;clearTimeout(scrTimer);}function imgcng(btnName,contStatus){document.getElementById(btnName).src=tarpath+"images/common_menu_"+btnName+"_"+contStatus+".gif";}function btncng(btnName,contStatus){document.getElementById(btnName).src="images/contact_btn_"+btnName+"_"+contStatus+".gif";}function updatecng(btnName,contStatus){document.getElementById(btnName).src="images/top_update_bloglink_"+contStatus+".gif";}function bloglinkcng(btnName,contStatus){document.getElementById(btnName).src="images/common_btn_bloglink_"+contStatus+".gif";}function campbtncng(btnName,contStatus){document.getElementById(btnName).src="images/camp_btn_"+btnName+"_"+contStatus+".gif";}function menu1sttop(){setframe();setmaterial();}function menu1st(){setframe();setmaterial();menuctrl();arrowset();}tarYbase=207;tarYcount=0;var menuTimer;function menuctrl(){nowScrT=document.body.scrollTop||document.documentElement.scrollTop;tarobj=document.getElementById("mainmenus");if(nowScrT<=207-20){tarY=207;}else{tarY=nowScrT+20;}if(tarYbase==tarY){if(tarYcount<=15){tarYcount++;}else{nowY=tarobj.offsetTop;movY=Math.floor((tarY-nowY)/5);tarobj.style.top=nowY+movY+"px";}}else{tarYcount=0;tarYbase=tarY;}menuTimer=setTimeout('menuctrl()',20);}function arrowset(){if(this.location.href.indexOf('works')>=0||this.location.href.indexOf('company')>=0){document.getElementById("nowarrow").style.display="block";}else if(this.location.href.indexOf('campaign')>=0){document.getElementById("nowarrow").style.display="none";}else{clearTimeout(menuTimer);}if(this.location.href.indexOf('XXX/YYYYY')>=0){document.getElementById("arrowimg").src=tarpath+"images/common_menu_nowarrow_dark2.gif";}else if(this.location.href.indexOf('works/smallscale')>=0||this.location.href.indexOf('company/contact')>=0){document.getElementById("arrowimg").src=tarpath+"images/common_menu_nowarrow_dark.gif";}}function setframe(){winW=window.innerWidth;if(winW<940){document.getElementById("frameinside").style.width="900px";}else{document.getElementById("frameinside").style.width="auto";}}function setmaterial(){useNum=Math.ceil(Math.random()*29);document.getElementById("materials").innerHTML='<img src="'+tarpath+'images/common_materials_'+useNum+'.jpg" width="647" height="74" border="0" alt="" />';}function gotopage(tarpage){document.location.href=tarpage;}function checkForm(){if(!Chk_txt(document.replayform.clientName.value)){Chkflg1=false;document.getElementById("clientname-cell").style.background="url(images/contact_mark_required_on.gif) no-repeat right center #f7f6f0";}else{Chkflg1=true;document.getElementById("clientname-cell").style.background="url(images/contact_mark_required_off.gif) no-repeat right center #ffffff";}if(!Chk_txt(document.replayform.clientKana.value)){Chkflg2=false;document.getElementById("clientkana-cell").style.background="url(images/contact_mark_required_on.gif) no-repeat right center #f7f6f0";}else{Chkflg2=true;document.getElementById("clientkana-cell").style.background="url(images/contact_mark_required_off.gif) no-repeat right center #ffffff";}if(!Chk_email(document.replayform.Email.value)){Chkflg3=false;document.getElementById("email-cell").style.background="url(images/contact_mark_required_on.gif) no-repeat right center #f7f6f0";}else{Chkflg3=true;document.getElementById("email-cell").style.background="url(images/contact_mark_required_off.gif) no-repeat right center #ffffff";}if(!Chk_txt(document.replayform.contactDetails.value)){Chkflg4=false;document.getElementById("details-cell").style.background="url(images/contact_mark_required_on.gif) no-repeat right center #f7f6f0";}else{Chkflg4=true;document.getElementById("details-cell").style.background="url(images/contact_mark_required_off.gif) no-repeat right center #ffffff";}if(Chkflg1&&Chkflg2&&Chkflg3&&Chkflg4){return true;}else{return false;}}function Chk_txt(txt){if(txt.length<1){return false;}else{return true;}}function Chk_email(Adr){if((Adr=="")||(Adr.indexOf('@')==-1)||(Adr.lastIndexOf('.')<=Adr.indexOf('@'))||(Adr.indexOf('.')==-1)){return false;}else{return true;}}function limitChars(target,maxlength){if(target.value.length>maxlength){alert(maxlength+"文字以内でお願いいたします。");target.value=target.value.substr(0,maxlength);}target.focus();}function formreset(){document.replayform.reset();document.getElementById("clientname-cell").style.background="url(images/contact_mark_required_off.gif) no-repeat right center #ffffff";document.getElementById("clientkana-cell").style.background="url(images/contact_mark_required_off.gif) no-repeat right center #ffffff";document.getElementById("email-cell").style.background="url(images/contact_mark_required_off.gif) no-repeat right center #ffffff";document.getElementById("details-cell").style.background="url(images/contact_mark_required_off.gif) no-repeat right center #ffffff";}var phttimer;cngcount=0;function cngphoto(projnum,tarnum,frametype){if(cngcount==0){if(frametype=="big"){document.getElementById(projnum+"frame").style.top=((tarnum-1)*68)+"px";}else if(frametype=="small"){for(i=1;i<=14;i++){if(!document.getElementById(projnum+i)){endnum=i-1;break;}}if(tarnum==1){document.getElementById(projnum+"frame1").style.display="block";document.getElementById(projnum+"frame2").style.display="none";document.getElementById(projnum+"frame").style.top="0px";}else if(tarnum==endnum){document.getElementById(projnum+"frame1").style.display="block";document.getElementById(projnum+"frame2").style.display="none";document.getElementById(projnum+"frame").style.top=((tarnum*23)-12)+"px";}else{document.getElementById(projnum+"frame1").style.display="none";document.getElementById(projnum+"frame2").style.display="block";document.getElementById(projnum+"frame").style.top=((tarnum*23)-17)+"px";}}if(osPlat=="win"&&bwsName=="ie"){document.getElementById(projnum).style.filter="alpha(opacity=0)";if(ieType=="ie9"){document.getElementById(projnum).style.opacity=0;}}else{document.getElementById(projnum).style.opacity=0;}cngalpha(projnum,tarnum,frametype);}}function cngalpha(projnum,tarnum,frametype){cngcount++;if(cngcount==1){for(i=1;i<=14;i++){if(document.getElementById(projnum+i)){document.getElementById(projnum+i).style.display="none";}else{break;}}document.getElementById(projnum+tarnum).style.display="block";}else if(cngcount>=2&&cngcount<=11){if(osPlat=="win"&&bwsName=="ie"){taralpha=10*(cngcount-1);document.getElementById(projnum).style.filter="alpha(opacity="+taralpha+")";if(ieType=="ie9"){taralpha=(10*(cngcount-1))/100;document.getElementById(projnum).style.opacity=taralpha;}}else{taralpha=(10*(cngcount-1))/100;document.getElementById(projnum).style.opacity=taralpha;}}if(cngcount==11){clearTimeout(phttimer);cngcount=0;for(checknum=0;checknum<movphtAry.length;checknum++){if(projnum+tarnum==movphtAry[checknum]){movphtreset();movpht(projnum+tarnum,movphtNumsAry[checknum]);break;}}}else{phttimer=setTimeout("cngalpha(\""+projnum+"\",\""+tarnum+"\",\""+frametype+"\")",50);}}movphtAry=new Array();movphtAry.push("reform0035");movphtNumsAry=new Array();movphtNumsAry.push(3);function movphtreset(){clearTimeout(movphtTimer);movphotonow=1;movcount=0;movwait=0;movvctr=1;for(i=0;i<movphtAry.length;i++){itemnum=movphtAry[i].substr(6,4);if(movphtAry[i].indexOf("reform")>=0){pagecode="r";}else if(movphtAry[i].indexOf("office")>=0){pagecode="o";}for(ii=1;ii<=movphtNumsAry[i];ii++){tarobj=document.getElementById(pagecode+itemnum+ii);if(osPlat=="win"&&bwsName=="ie"){tarobj.style.filter="alpha(opacity=100)";if(ieType=="ie9"){tarobj.style.opacity=1;}}else{tarobj.style.opacity=1;}}}}function movpht(tarphoto,nums){itemnum=tarphoto.substr(6,4);if(tarphoto.indexOf("reform")>=0){pagecode="r";}else if(tarphoto.indexOf("office")>=0){pagecode="o";}movtar=pagecode+itemnum;movphtalpha(movtar,nums);}var movphtTimer;function movphtalpha(movtar,nums){tarobj=document.getElementById(movtar+movphotonow);movcount++;if(movcount<=10){if(movvctr>0){taralpha=100-(movcount*10);}else{taralpha=movcount*10;}if(osPlat=="win"&&bwsName=="ie"){tarobj.style.filter="alpha(opacity="+taralpha+")";if(ieType=="ie9"){tarobj.style.opacity=(taralpha/100);}}else{tarobj.style.opacity=(taralpha/100);}}else{movwait++;if(movwait>=25){movwait=0;movcount=0;movphotonow+=movvctr;if(movphotonow==nums||movphotonow==0){movvctr*=-1;movphotonow+=movvctr;}}}movphtTimer=setTimeout("movphtalpha(\""+movtar+"\",\""+nums+"\")",50);}
