/*
 * This file is part of EC-CUBE
 *
 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
 *
 * http://www.lockon.co.jp/
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
function fnIsopener(){var a=navigator.userAgent;return window.opener?a.indexOf("MSIE 4")!=-1&&a.indexOf("Win")!=-1?!window.opener.closed:typeof window.opener.document=="object":false} function fnCallAddress(a,b,c,d,e){zip1=document.form1[b].value;zip2=document.form1[c].value;if(zip1.length==3&&zip2.length==4){url=a+"?zip1="+zip1+"&zip2="+zip2+"&input1="+d+"&input2="+e;window.open(url,"nomenu","width=500,height=350,scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=no")}else alert("\u90f5\u4fbf\u756a\u53f7\u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002")} function fnPutAddress(a,b){if(fnIsopener()){if(document.form1.state.value!=""){state_id=document.form1.state.value;town=document.form1.city.value+document.form1.town.value;window.opener.document.form1[a].selectedIndex=state_id;window.opener.document.form1[b].value=town;window.opener.document.form1.addr02.focus()}}else window.close()}function fnOpenNoMenu(a){window.open(a,"nomenu","scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=no")} function fnOpenWindow(a,b,c,d){window.open(a,b,"width="+c+",height="+d+",scrollbars=yes,resizable=no,toolbar=no,location=no,directories=no,status=no")}function fnSetFocus(a){document.form1[a]&&document.form1[a].focus()} function fnSetSelect(a,b,c){sele1=document.form1[a];sele2=document.form1[b];if(sele1&&sele2){index=sele1.selectedIndex;for(i=count=sele2.options.length;i>=0;i--)sele2.options[i]=null;len=lists[index].length;for(i=0;i<len;i++){sele2.options[i]=new Option(lists[index][i],vals[index][i]);if(c!=""&&vals[index][i]==c)sele2.options[i].selected=true}}}function fnCancelEnter(){if(gCssUA.indexOf("WIN")!=-1&&gCssUA.indexOf("MSIE")!=-1)if(window.event.keyCode==13)return false;return true} function fnModeSubmit(a,b,c){switch(a){case "delete_category":if(!window.confirm("\u9078\u629e\u3057\u305f\u30ab\u30c6\u30b4\u30ea\u3068\u30ab\u30c6\u30b4\u30ea\u5185\u306e\u3059\u3079\u3066\u306e\u30ab\u30c6\u30b4\u30ea\u3092\u524a\u9664\u3057\u307e\u3059"))return;break;case "delete":if(!window.confirm("\u4e00\u5ea6\u524a\u9664\u3057\u305f\u30c7\u30fc\u30bf\u306f\u3001\u5143\u306b\u623b\u305b\u307e\u305b\u3093\u3002\n\u524a\u9664\u3057\u3066\u3082\u5b9c\u3057\u3044\u3067\u3059\u304b\uff1f"))return; break;case "delete_order":if(!window.confirm("\u5728\u5eab\u6570\u306f\u624b\u52d5\u3067\u623b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u4e00\u5ea6\u524a\u9664\u3057\u305f\u30c7\u30fc\u30bf\u306f\u3001\u5143\u306b\u623b\u305b\u307e\u305b\u3093\u3002\n\u524a\u9664\u3057\u3066\u3082\u5b9c\u3057\u3044\u3067\u3059\u304b\uff1f"))return;break;case "confirm":if(!window.confirm("\u767b\u9332\u3057\u3066\u3082\u5b9c\u3057\u3044\u3067\u3059\u304b"))return;break;case "delete_all":if(!window.confirm("\u691c\u7d22\u7d50\u679c\u3092\u3059\u3079\u3066\u524a\u9664\u3057\u3066\u3082\u5b9c\u3057\u3044\u3067\u3059\u304b"))return; break;default:break}document.form1.mode.value=a;if(b!=""&&c!="")document.form1[b].value=c;document.form1.submit()} function fnFormModeSubmit(a,b,c,d){switch(b){case "delete":if(!window.confirm("\u4e00\u5ea6\u524a\u9664\u3057\u305f\u30c7\u30fc\u30bf\u306f\u3001\u5143\u306b\u623b\u305b\u307e\u305b\u3093\u3002\n\u524a\u9664\u3057\u3066\u3082\u5b9c\u3057\u3044\u3067\u3059\u304b\uff1f"))return;break;case "confirm":if(!window.confirm("\u767b\u9332\u3057\u3066\u3082\u5b9c\u3057\u3044\u3067\u3059\u304b"))return;break;case "regist":if(!window.confirm("\u767b\u9332\u3057\u3066\u3082\u5b9c\u3057\u3044\u3067\u3059\u304b"))return; break;default:break}document.forms[a].mode.value=b;if(c!=""&&d!="")document.forms[a][c].value=d;document.forms[a].submit()}function fnSetFormSubmit(a,b,c){document.forms[a][b].value=c;document.forms[a].submit();return false}function fnSetFormVal(a,b,c){document.forms[a][b].value=c}function fnChangeAction(a){document.form1.action=a}function fnNaviPage(a){document.form1.pageno.value=a;document.form1.submit()} function fnSearchPageNavi(a){document.form1.pageno.value=a;document.form1.mode.value="search";document.form1.submit()}function fnSubmit(){document.form1.submit()}function fnCheckInputPoint(){if(document.form1.point_check){list=new Array("use_point");if(document.form1.point_check[0].checked){color="";flag=false}else{color="#dddddd";flag=true}len=list.length;for(i=0;i<len;i++)if(document.form1[list[i]]){document.form1[list[i]].disabled=flag;document.form1[list[i]].style.backgroundColor=color}}} function fnCheckInputDeliv(){if(document.form1)if(document.form1.deliv_check){list=new Array("deliv_name01","deliv_name02","deliv_kana01","deliv_kana02","deliv_pref","deliv_zip01","deliv_zip02","deliv_addr01","deliv_addr02","deliv_tel01","deliv_tel02","deliv_tel03");document.form1.deliv_check.checked?fnChangeDisabled(list,""):fnChangeDisabled(list,"#dddddd")}} function fnCheckInputMember(){if(document.form1.member_check){list=new Array("password","password_confirm","reminder","reminder_answer");document.form1.member_check.checked?fnChangeDisabled(list,""):fnChangeDisabled(list,"#dddddd")}}var g_savecolor=[]; function fnChangeDisabled(a,b){len=a.length;for(i=0;i<len;i++)if(document.form1[a[i]])if(b==""){document.form1[a[i]].disabled=false;document.form1[a[i]].style.backgroundColor=g_savecolor[a[i]]}else{document.form1[a[i]].disabled=true;g_savecolor[a[i]]=document.form1[a[i]].style.backgroundColor;document.form1[a[i]].style.backgroundColor=b}} function fnCheckLogin(a){var b=[];if(a=="login_mypage"){b[0]="mypage_login_email";b[1]="mypage_login_pass"}else{b[0]="login_email";b[1]="login_pass"}var c=b.length,d=false,e=0;for(e=0;e<c;e++)if(document.forms[a][b[e]].value==""){d=true;break}if(d==true){alert("\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9/\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002");return false}} function fnPassTime(){end_time=new Date;time=end_time.getTime()-start_time.getTime();alert(time/1E3)}start_time=new Date;function fnUpdateParent(a){if(fnIsopener())window.opener.location.href=a;else window.close()}function fnKeySubmit(a,b){if(a!=""&&b!="")document.form1[a].value=b;document.form1.submit()}function fnCharCount(a,b,c){document.forms[a][c].value=document.forms[a][b].value.length} function ChangeSize(a,b,c,d,e){if(b.rows<=d){b.rows=c;a.value="\u5c0f\u3055\u304f\u3059\u308b";e.value=c}else{b.rows=d;a.value="\u5927\u304d\u304f\u3059\u308b";e.value=d}}function rollOver(){var a={};$("img.Over,input.Over").not("[src*='_r.']").each(function(){var b=this.src,c=b.substring(b.lastIndexOf(".")),d=b.substr(0,b.lastIndexOf("."))+"_r"+c;a[this.src]=new Image;a[this.src].src=d;$(this).hover(function(){this.src=d},function(){this.src=b})})}$(document).ready(rollOver); function alphaOver(){$("img.alphaOver").each(function(){var a={op:1,oa:0.7,durationp:"fast",durationa:"fast"};$(this).each(function(){$(this).css({opacity:a.op,filter:"alpha(opacity="+a.op*100+")"}).hover(function(){$(this).fadeTo(a.durationp,a.oa)},function(){$(this).fadeTo(a.durationa,a.op)})})})}$(document).ready(alphaOver);