var Lang={jp:{motherTongue:"ja",ja:{docpath:"/iphone/jp/products/index.html",cmnimgpath:"/common/jp/ja/css/imgs/ico_new.gif",newstr:"発売"}},my:{motherTongue:"en",en:{docpath:"/iphone/my/products/index.html",cmnimgpath:"/common/my/en/css/imgs/ico_new.gif",newstr:""}},get:function(){var A=location.href.substr(location.href.indexOf("iphone",0)+7).split("/");if(!this[A[0]][A[1]]){return this[A[0]][this[A[0]].motherTongue]}else{return this[A[0]][this[A[0]].motherTongue]}}};var kao={jump:function(B){switch(B){case 0:location.href="http://"+location.hostname+Lang.get().docpath;break;case 1:var A=document.documentElement.scrollHeight||document.body.scrollHeight;scroll(0,A);break;case 2:scroll(0,0);break;default:location.href=B;break}},fullnew:function(){var B=document.getElementsByTagName("ul");for(i=0;i<B.length;i++){if(B[i].getAttribute("selected")=="true"){var D=B[i].getElementsByTagName("p");for(j=0;j<D.length;j++){if(D[j].getAttribute("class")=="li-new"){var A=new Date(D[j].getAttribute("sales_date_add"));var F=new Date();var C=D[j].parentNode;var E=(A-F)/(1000*24*3600);if(0<=E){D[j].innerHTML="<img src='"+Lang.get().cmnimgpath+"'>"+D[j].getAttribute("sales_date")+Lang.get().newstr}else{C.removeChild(D[j])}}}}}},skincarestep:function(){var C=document.getElementsByTagName("ul");for(i=0;i<C.length;i++){if(C[i].getAttribute("selected")=="true"&&C[i].getAttribute("id")=="skincare_step"){var A=C[i].getElementsByTagName("a");for(j=0;j<A.length;j++){var D=A[j].parentNode;if(D.parentNode.className!="footer"){if(A[j].getAttribute("href").substr(0,7)!="/iphone"){var B="/iphone"+A[j].getAttribute("href");A[j].setAttribute("href",B)}}}}}},setMaxWidth:function(){var B=document.getElementsByTagName("ul");for(i=0;i<B.length;i++){if(B[i].getAttribute("selected")=="true"){var D=B[i].getElementsByTagName("img");for(j=0;j<D.length;j++){var C=D[j].getAttribute("width");var A=D[j].style.width;if(C||A){if(C>=320||A>=320){D[j].removeAttribute("width");D[j].style.maxWidth="320px";D[j].style.maxWidth="320px"}}else{D[j].style.maxWidth="320px"}}}}}};addEventListener("error",function(A){if(A.target.tagName=="IMG"&&(A.target.src.indexOf("banner.jpg")>=0)){A.target.parentNode.removeChild(A.target)}},true);addEventListener("load",function(){kao.fullnew();kao.skincarestep();kao.setMaxWidth()},true);var month=["January","February","March","April","May","June","July","August","September","October","November","December"];function em(A){document.write(month[A-1])};