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";}function setcommon(){inheader();infooter();if(nowpagename!="english"){insubmenuset();setHeight();if(nowpagename=="company_agency"){setCateItems('package');}if(nowpagename!="news"){initLightbox();}}}function inheader(){status_products="off";status_news="off";status_company="off";status_accessmap="off";status_recruit="off";if(nowpagename=="products"){status_products="now";}else if(nowpagename=="news"){status_news="now";}else if(nowpagename=="company"||nowpagename=="company_agency"){status_company="now";}else if(nowpagename=="accessmap"){status_accessmap="now";}else if(nowpagename=="recruit"){status_recruit="now";}htmldata='';htmldata+='<div id="logo">';htmldata+='<a href="'+tarpath+'index.html"><img src="'+tarpath+'images/common_logo.jpg" width="164" height="38" border="0" alt="素数株式会社"/></a>';htmldata+='</div>';htmldata+='<div id="mainset">';if(nowpagename!="english"){htmldata+='<div class="noborder"><a href="'+tarpath+'product/product.php" onmouseover="onsub(\'products\',\'on\')" onmouseout="outsub(\'products\',\'off\')"><img src="'+tarpath+'images/common_main_products_'+status_products+'.gif" width="68" height="27" border="0" alt="取扱商品" id="products"/></a></div>';}else{htmldata+='<div class="noborder"><a href="'+tarpath+'product/product.php" onmouseover="imgcng(\'products\',\'on\')" onmouseout="imgcng(\'products\',\'off\')"><img src="'+tarpath+'images/common_main_products_'+status_products+'.gif" width="68" height="27" border="0" alt="取扱商品" id="products"/></a></div>';}htmldata+='<div class="noborder"><a href="'+tarpath+'media/media_news.php" onmouseover="imgcng(\'news\',\'on\')" onmouseout="imgcng(\'news\',\'off\')"><img src="'+tarpath+'images/common_main_news_'+status_news+'.gif" width="90" height="27" border="0" alt="素数ニュース" id="news"/></a></div>';htmldata+='<div class="noborder"><a href="'+tarpath+'company/index.html" onmouseover="imgcng(\'company\',\'on\')" onmouseout="imgcng(\'company\',\'off\')"><img src="'+tarpath+'images/common_main_company_'+status_company+'.gif" width="67" height="27" border="0" alt="会社案内" id="company"/></a></div>';htmldata+='<div class="noborder"><a href="'+tarpath+'company/accessmap.html" onmouseover="imgcng(\'accessmap\',\'on\')" onmouseout="imgcng(\'accessmap\',\'off\')"><img src="'+tarpath+'images/common_main_accessmap_'+status_accessmap+'.gif" width="42" height="27" border="0" alt="地図" id="accessmap"/></a></div>';htmldata+='<div class="inborder"><a href="'+tarpath+'company/recruit.html" onmouseover="imgcng(\'recruit\',\'on\')" onmouseout="imgcng(\'recruit\',\'off\')"><img src="'+tarpath+'images/common_main_recruit_'+status_recruit+'.gif" width="68" height="27" border="0" alt="採用情報" id="recruit"/></a></div>';htmldata+='<div class="noborder"><a href="http://sosuonline.jp/" target="_blank" onmouseover="imgcng(\'shop\',\'on\')" onmouseout="imgcng(\'shop\',\'off\')"><img src="'+tarpath+'images/common_main_shop_off.gif" width="126" height="27" border="0" alt="オンラインショップ" id="shop"/></a></div>';htmldata+='<div class="endmenu"><a href="http://www.sosu.jp/blog/" target="_blank" onmouseover="imgcng(\'blog\',\'on\')" onmouseout="imgcng(\'blog\',\'off\')"><img src="'+tarpath+'images/common_main_blog_off.gif" width="54" height="27" border="0" alt="ブログ" id="blog"/></a></div>';htmldata+='</div>';htmldata+='<div id="menuborder">';htmldata+='<img src="'+tarpath+'images/common_main_border1.gif" width="1" height="54" border="0" alt=""/>';htmldata+='</div>';htmldata+='<div id="miniset">';htmldata+='<div><a href="'+tarpath+'form/inquiry.html"><img src="'+tarpath+'images/common_mini_contact.gif" width="53" height="15" border="0" alt="お問い合せ"/></a></div>';htmldata+='<div class="borderdot"><img src="'+tarpath+'images/common_mini_dot.gif" width="3" height="15" border="0" alt=""/></div>';htmldata+='<div><a href="'+tarpath+'form/estimate.html"><img src="'+tarpath+'images/common_mini_estimate.gif" width="53" height="15" border="0" alt="見積り依頼"/></a></div>';htmldata+='<div class="borderdot"><img src="'+tarpath+'images/common_mini_dot.gif" width="3" height="15" border="0" alt=""/></div>';htmldata+='<div><a href="'+tarpath+'en/index.html"><img src="'+tarpath+'images/common_mini_english.gif" width="40" height="15" border="0" alt="English"/></a></div>';htmldata+='</div>';document.getElementById("headerline").innerHTML=htmldata;}function insubmenuset(){htmldata='';htmldata+='<div id="productssub" class="submenus submenufontb" onmouseover="onsub(\'products\',\'on\')" onmouseout="outsub(\'products\',\'off\')">';htmldata+='<div><img src="'+tarpath+'images/common_sub_top.gif" width="120" height="7" alt=""/></div>';htmldata+='<div class="menuitem"><a href="'+tarpath+'product/product_list.php?cate1=original">オリジナル商品</a></div>';htmldata+='<div class="menuitem"><a href="'+tarpath+'product/product_list.php?cate1=series">シリーズ商品</a></div>';htmldata+='<div class="menuitem"><a href="'+tarpath+'product/product_list.php?cate1=01&cate2=01">スキンケア</a></div>';htmldata+='<div class="menuitem"><a href="'+tarpath+'product/product_list.php?cate1=02&cate2=01">ボディケア</a></div>';htmldata+='<div class="menuitem"><a href="'+tarpath+'product/product_list.php?cate1=03&cate2=03">ヘアケア</a></div>';htmldata+='<div class="menuitem"><a href="'+tarpath+'product/product_list.php?cate1=04&cate2=01">オーラルケア</a></div>';htmldata+='<div class="menuitem"><a href="'+tarpath+'product/product_list.php?cate1=05&cate2=01">生活雑貨</a></div>';htmldata+='<div class="menuitem"><a href="'+tarpath+'product/product_list.php?cate1=06&cate2=01">ヘルスケア</a></div>';htmldata+='<div class="menuitem"><a href="'+tarpath+'product/product_list.php?cate1=07&cate2=02">フレグランス</a></div>';htmldata+='<div class="menuitem"><a href="'+tarpath+'product/product_list.php?cate1=08&cate2=01">ダイエット</a></div>';htmldata+='<div><img src="'+tarpath+'images/common_sub_btm.png" width="120" height="14" alt="" class="iepngfix"/></div>';htmldata+='</div>';document.getElementById("submenuline").innerHTML=htmldata;}function infooter(){htmldata='';var copyrightDate=new Date();nowYear=copyrightDate.getFullYear();if(nowpagename!="english"){htmldata+='<div id="links">';htmldata+='<a href="'+tarpath+'product/product.php" class="rightsfont">取扱商品</a>';htmldata+='<a href="'+tarpath+'form/inquiry.html" class="rightsfont">お問い合せ</a>';htmldata+='<a href="'+tarpath+'form/estimate.html" class="rightsfont">見積り依頼</a>';htmldata+='<a href="'+tarpath+'company/links.html" class="rightsfont">関連サイト</a>';htmldata+='<a href="'+tarpath+'images/footer_decomail.gif" rel="lightbox[decomail]" title="スクラッチデコメ登場！" class="rightsfont">スクラッチシリーズデコメ</a>';htmldata+='</div>';htmldata+='<div id="copyright" class="rightsfont">Copyright(C) '+nowYear+' 素数株式会社 All Rights Reserved.</div>';}else{htmldata+='<div id="links">';htmldata+='<a href="form/inquiry.html" class="rightsfont">Inquiry</a>';htmldata+='</div>';htmldata+='<div id="copyright" class="rightsfont">Copyright(C) '+nowYear+' Sosu Company Limited. All Rights Reserved.</div>';}document.getElementById("footerline").innerHTML=htmldata;}function setHeight(){if(document.getElementById("pagemenu")){menuH=document.getElementById("pagemenu").offsetHeight-40;}else{menuH=0;}contdataArray=new Array("contdata10","contdata11","contdata20","contdata21");count=0;do{dataH=0;if(document.getElementById(contdataArray[count])){dataH=document.getElementById(contdataArray[count]).offsetHeight;}count++;}while(dataH<=0 && count<contdataArray.length);if(menuH>dataH){document.getElementById(contdataArray[count-1]).style.height=menuH+"px";}}function setcommon2(){setcommon();for(i=1;i<=3;i++){getH1=document.getElementById("frame"+((i*3)-2)).offsetHeight;getH2=document.getElementById("frame"+((i*3)-1)).offsetHeight;getH3=document.getElementById("frame"+((i*3)-0)).offsetHeight;maxH1=Math.max(getH1,getH2);useH=Math.max(getH3,maxH1);if(useH>120){imgmargin=Math.floor((useH-120)/2);}else{imgmargin=0;}for(ii=1;ii<=3;ii++){document.getElementById("frame"+((i*3)-(3-ii))).style.height=useH+"px";document.getElementById("img"+((i*3)-(3-ii))).style.marginTop=imgmargin+"px";if(i==1){sosupadding=20+Math.floor(imgmargin/2);document.getElementById("sosuitems1").style.padding=sosupadding+"px 0";document.getElementById("sosuitems2").style.padding=sosupadding+"px 0";}}}}function RunFooEx(fFile,fW,fH,fID,fBg){if(navigator.appName.charAt(0)!="M"){for(i=0;i<=navigator.plugins.length-1;i++){if(navigator.plugins[i].filename.indexOf("Flash",0)>=0||navigator.plugins[i].filename.indexOf("SWF",0)>=0){flashplugin=true;break;}else{flashplugin=false;}}}else{flashplugin=true;}if(flashplugin){document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width='+fW+' height='+fH+' id='+fID+'>');document.write('<param name=movie value=\"'+fFile+'\">');document.write('<param name=quality value=high>');document.write('<param name=bgcolor value='+fBg+'>');document.write('<param name=wmode value=transparent>');document.write('<embed src=\"'+fFile+'\" quality=high bgcolor='+fBg+' width='+fW+' height='+fH+' name='+fID+' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent">');document.write('</embed>\n</object>');}else{document.location.href="index.html";}}pathbase="../";tarpath="";nowpagename="";function styleSetL(tarL,pagename){nowpagename=pagename;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+'.css"/>');thislevel=tarL;bugkicker();getcache();}if(nowpagename!="news"){document.write('<link rel="stylesheet" href="'+tarpath+'css/lightbox.css" type="text/css" media="screen"/>');document.write('<script type="text/javascript" src="'+tarpath+'js/prototype.lite.js"></script>');document.write('<script type="text/javascript" src="'+tarpath+'js/moo.fx.js"></script>');document.write('<script type="text/javascript" src="'+tarpath+'js/litebox-1.0.js"></script>');}}var thisie=false;function bugkicker(){if(osPlat=="win" && bwsName=="ie"){thisie=true;document.write('<link rel="stylesheet" type="text/css" href="'+tarpath+'css/style_winie.css"/>');document.write('<script type="text/javascript" src="'+tarpath+'js/iepngfix.js" charset="utf-8"></script>');}}function getcache(){cacheArray=new Array('products','news','company','accessmap','recruit','shop','blog');for(i=0;i<=cacheArray.length-1;i++){var cacheimg=new Image();cacheimg.src=tarpath+"images/common_main_"+cacheArray[i]+"_on.gif";cacheimg.src=tarpath+"images/common_main_"+cacheArray[i]+"_off.gif";}cacheArray2=new Array('common_sub_bg.gif','common_sub_border.gif','common_sub_top.gif','common_sub_btm.png');for(i=0;i<=cacheArray2.length-1;i++){var cacheimg2=new Image();cacheimg2.src=tarpath+"images/"+cacheArray2[i];}if(nowpagename=="company"){cacheArrayComp=new Array('common_btn_contact_on.gif','common_progress0_on.gif','common_progress1_on.gif','common_progress2_on.gif','common_progress3_on.gif','common_progress4_on.gif','common_progress5_on.gif','common_progress6_on.gif');for(i=0;i<=cacheArrayComp.length-1;i++){var cacheimgComp=new Image();cacheimgComp.src="images/"+cacheArrayComp[i];}}}var scrOldY=10000;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){if(nowpagename!=btnName){document.getElementById(btnName).src=tarpath+"images/common_main_"+btnName+"_"+contStatus+".gif";}}function imgcngall(btnName,contStatus){document.getElementById(btnName).src="images/"+btnName+"_"+contStatus+".gif";}function prgcng(btnNum,contStatus){document.getElementById("progress"+btnNum).src="images/common_progress"+btnNum+"_"+contStatus+".gif";}function numimgcng(btnName,contStatus){newName=btnName.substr(0,btnName.length-1);document.getElementById(btnName).src="images/common_"+newName+"_"+contStatus+".gif";}function compcng(btnName,compnum,contStatus){document.getElementById(btnName).src="images/comp"+compnum+"_"+btnName+"_"+contStatus+".gif";}var movsubtimer;var hidesubtimer;function onsub(tarCont,movStatus){clearTimeout(hidesubtimer);imgcng(tarCont,movStatus);if(bwsName!="opera"){clearTimeout(movsubtimer);document.getElementById(tarCont+"sub").style.display="block";movsubact(tarCont,movStatus);}else{document.getElementById(tarCont+"sub").style.display="block";document.getElementById(tarCont+"sub").style.clip="rect(auto auto auto auto)";document.getElementById(tarCont+"sub").style.top="0px";}}function outsub(tarCont,movStatus){if(bwsName!="opera"){clearTimeout(movsubtimer);hidesubtimer=setTimeout("movsubact(\""+tarCont+"\",\""+movStatus+"\")",200);}else{hidesubtimer=setTimeout("hidesubact(\""+tarCont+"\",\""+movStatus+"\")",200);}}function movsubact(tarCont,movStatus){baseH=document.getElementById(tarCont+"sub").offsetHeight;if(movStatus=="on"){tarY=document.getElementById(tarCont+"sub").offsetTop+70;}else if(movStatus=="off"){tarY=document.getElementById(tarCont+"sub").offsetTop-100;}document.getElementById(tarCont+"sub").style.clip="rect("+(0-tarY)+"px auto auto auto)";document.getElementById(tarCont+"sub").style.top=tarY+"px";if((movStatus=="on" && tarY<0)||(movStatus=="off" && tarY>-100-baseH)){movsubtimer=setTimeout("movsubact(\""+tarCont+"\",\""+movStatus+"\")",5);}else{if(movStatus=="on"){document.getElementById(tarCont+"sub").style.clip="rect(auto auto auto auto)";document.getElementById(tarCont+"sub").style.top="0px";}else if(movStatus=="off"){imgcng(tarCont,movStatus);document.getElementById(tarCont+"sub").style.display="none";}clearTimeout(movsubtimer);}}function hidesubact(tarCont,movStatus){imgcng(tarCont,movStatus);document.getElementById(tarCont+"sub").style.display="none";document.getElementById(tarCont+"sub").style.clip="rect(999px auto auto auto)";document.getElementById(tarCont+"sub").style.top="-999px";}var mapstatus="map";function valtoflash(){if(mapstatus=="map"){mapstatus="video";}else{mapstatus="map";}if(bwsName=="ie"){window.mapflash.SetVariable("nowStatus",mapstatus);}else{window.document.mapflash.SetVariable("nowStatus",mapstatus);}}function printmap(){window.print();}function framecng(boxid,boxstatus){document.getElementById(boxid).style.backgroundImage="url(../company/images/common_boxframe_"+boxstatus+".gif)";}function setnum(num1,num2){catenum=num1;prodnum=num2;}function agencywindow(){window.open("agency_tools.html","agencywin","directories=no,location=no,menubar=no,scrollbars=no,status=yes,resizable=no,width=590,height=560");}function phpcheck(){phpcheck1();phpcheck2();phpcheck3();}function phpcheck_search(){phpcheck1();}function phpcheck1(){prevobj=document.getElementById("naviprev");nextobj=document.getElementById("navinext");if(prevobj.innerHTML.indexOf("<!--")>=0 && nextobj.innerHTML.indexOf("<!--")>=0){document.getElementById("pagenavitop").style.display="none";document.getElementById("pagenavibtm").style.display="none";}}function phpcheck2(){minicateobj=document.getElementById("minicatelinks");if(minicateobj.innerHTML==""){document.getElementById("minicatelist").style.marginBottom="0";document.getElementById("minicateborder").style.display="none";}}function phpcheck3(){leadobj=document.getElementById("leadcopy");if(leadobj.innerHTML==""){document.getElementById("leadcopy").style.display="none";}}