1/* 2 * This file is part of EC-CUBE 3 * 4 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 5 * 6 * http://www.lockon.co.jp/ 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 */ 22// 親ã¦ã£ã³ãã¦ã®åå¨ç¢ºèª. 23function fnIsopener() { 24 var ua = navigator.userAgent; 25 if( !!window.opener ) { 26 if( ua.indexOf('MSIE 4')!=-1 && ua.indexOf('Win')!=-1 ) { 27 return !window.opener.closed; 28 } else { 29 return typeof window.opener.document == 'object'; 30 } 31 } else { 32 return false; 33 } 34} 35 36function fnOpenNoMenu(URL) { 37 window.open(URL,"nomenu","scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=no"); 38} 39 40function fnOpenWindow(URL,name,width,height) { 41 window.open(URL,name,"width="+width+",height="+height+",scrollbars=yes,resizable=no,toolbar=no,location=no,directories=no,status=no"); 42} 43 44function fnSetFocus(name) { 45 if(document.form1[name]) { 46 document.form1[name].focus(); 47 } 48} 49 50// ã»ã¬ã¯ãããã¯ã¹ã«é ç®ãå²ãå½ã¦ã. 51function fnSetSelect(name1, name2, val) { 52 sele1 = document.form1[name1]; 53 sele2 = document.form1[name2]; 54 55 if(sele1 && sele2) { 56 index=sele1.selectedIndex; 57 58 // ã»ã¬ã¯ãããã¯ã¹ã®ã¯ãªã¢ 59 count=sele2.options.length 60 for(i = count; i >= 0; i--) { 61 sele2.options[i]=null; 62 } 63 64 // ã»ã¬ã¯ãããã¯ã¹ã«å¤ãå²ãå½ã¦ãã 65 len = lists[index].length 66 for(i = 0; i < len; i++) { 67 sele2.options[i]=new Option(lists[index][i], vals[index][i]); 68 if(val != "" && vals[index][i] == val) { 69 sele2.options[i].selected = true; 70 } 71 } 72 } 73} 74 75// Enterãã¼å ¥åããã£ã³ã»ã«ããã(IEã«å¯¾å¿) 76function fnCancelEnter() 77{ 78 if (gCssUA.indexOf("WIN") != -1 && gCssUA.indexOf("MSIE") != -1) { 79 if (window.event.keyCode == 13) 80 { 81 return false; 82 } 83 } 84 return true; 85} 86 87// ã¢ã¼ãã¨ãã¼ãæå®ãã¦SUBMITãè¡ãã 88function fnModeSubmit(mode, keyname, keyid) { 89 switch(mode) { 90 case 'delete_category': 91 if(!window.confirm('鏿ããã«ãã´ãªã¨ã«ãã´ãªå ã®ãã¹ã¦ã®ã«ãã´ãªãåé¤ãã¾ã')){ 92 return; 93 } 94 break; 95 case 'delete': 96 if(!window.confirm('ä¸åº¦åé¤ãããã¼ã¿ã¯ãå ã«æ»ãã¾ããã\nåé¤ãã¦ãå®ããã§ããï¼')){ 97 return; 98 } 99 break; 100 case 'confirm': 101 if(!window.confirm('ç»é²ãã¦ãå®ããã§ãã')){ 102 return; 103 } 104 break; 105 case 'delete_all': 106 if(!window.confirm('æ¤ç´¢çµæããã¹ã¦åé¤ãã¦ãå®ããã§ãã')){ 107 return; 108 } 109 break; 110 default: 111 break; 112 } 113 document.form1['mode'].value = mode; 114 if(keyname != "" && keyid != "") { 115 document.form1[keyname].value = keyid; 116 } 117 document.form1.submit(); 118} 119 120function fnFormModeSubmit(form, mode, keyname, keyid) { 121 switch(mode) { 122 case 'delete': 123 if(!window.confirm('ä¸åº¦åé¤ãããã¼ã¿ã¯ãå ã«æ»ãã¾ããã\nåé¤ãã¦ãå®ããã§ããï¼')){ 124 return; 125 } 126 break; 127 case 'confirm': 128 if(!window.confirm('ç»é²ãã¦ãå®ããã§ãã')){ 129 return; 130 } 131 break; 132 case 'regist': 133 if(!window.confirm('ç»é²ãã¦ãå®ããã§ãã')){ 134 return; 135 } 136 break; 137 default: 138 break; 139 } 140 document.forms[form]['mode'].value = mode; 141 if(keyname != "" && keyid != "") { 142 document.forms[form][keyname].value = keyid; 143 } 144 document.forms[form].submit(); 145} 146 147function fnSetFormSubmit(form, key, val) { 148 document.forms[form][key].value = val; 149 document.forms[form].submit(); 150 return false; 151} 152 153function fnSetFormVal(form, key, val) { 154 document.forms[form][key].value = val; 155} 156 157function fnChangeAction(url) { 158 document.form1.action = url; 159} 160 161// ãã¼ã¸ããã§ä½¿ç¨ããã 162function fnNaviPage(pageno) { 163 document.form1['pageno'].value = pageno; 164 document.form1.submit(); 165} 166 167function fnSearchPageNavi(pageno) { 168 document.form1['pageno'].value = pageno; 169 document.form1['mode'].value = 'search'; 170 document.form1.submit(); 171 } 172 173 function fnSubmit(){ 174 document.form1.submit(); 175} 176 177// è³¼å ¥æä¼å¡ç»é²å ¥åå¶éã 178function fnCheckInputMember() { 179 if(document.form1['member_check']) { 180 list = new Array( 181 'password', 182 'password_confirm', 183 'reminder', 184 'reminder_answer' 185 ); 186 187 if(!document.form1['member_check'].checked) { 188 fnChangeDisabled(list, '#dddddd'); 189 } else { 190 fnChangeDisabled(list, ''); 191 } 192 } 193} 194 195// æåã«è¨å®ããã¦ããè²ãä¿åãã¦ããã 196var g_savecolor = new Array(); 197 198function fnChangeDisabled(list, color) { 199 len = list.length; 200 201 for(i = 0; i < len; i++) { 202 if(document.form1[list[i]]) { 203 if(color == "") { 204 // æå¹ã«ããã 205 document.form1[list[i]].disabled = false;
206 document.form1[list[i]].style.backgroundColor = g_savecolor[list[i]]; 207 } else { 208 // ç¡å¹ã«ããã 209 document.form1[list[i]].disabled = true; 210 g_savecolor[list[i]] = document.form1[list[i]].style.backgroundColor; 211 document.form1[list[i]].style.backgroundColor = color;//"#f0f0f0"; 212 } 213 } 214 } 215} 216 217 218// ãã°ã¤ã³æã®å ¥åãã§ã㯠219function fnCheckLogin(formname) { 220 var lstitem = new Array(); 221 222 if(formname == 'login_mypage'){ 223 lstitem[0] = 'mypage_login_email'; 224 lstitem[1] = 'mypage_login_pass'; 225 }else{ 226 lstitem[0] = 'login_email'; 227 lstitem[1] = 'login_pass'; 228 } 229 var max = lstitem.length; 230 var errflg = false; 231 var cnt = 0; 232 233 //ãå¿ é é ç®ã®ãã§ã㯠234 for(cnt = 0; cnt < max; cnt++) { 235 if(document.forms[formname][lstitem[cnt]].value == "") { 236 errflg = true; 237 break; 238 } 239 } 240 241 // å¿ é é ç®ãå ¥åããã¦ããªãå ´å 242 if(errflg == true) { 243 alert('ã¡ã¼ã«ã¢ãã¬ã¹/ãã¹ã¯ã¼ããå ¥åãã¦ä¸ããã'); 244 return false; 245 } 246} 247 248// æéã®è¨æ¸¬. 249function fnPassTime(){ 250 end_time = new Date(); 251 time = end_time.getTime() - start_time.getTime(); 252 alert((time/1000)); 253} 254start_time = new Date(); 255 256//親ã¦ã£ã³ãã¦ã®ãã¼ã¸ã夿´ãã. 257function fnUpdateParent(url) { 258 // 親ã¦ã£ã³ãã¦ã®åå¨ç¢ºèª 259 if(fnIsopener()) { 260 window.opener.location.href = url; 261 } else { 262 window.close(); 263 } 264} 265 266//ç¹å®ã®ãã¼ãSUBMITãã. 267function fnKeySubmit(keyname, keyid) { 268 if(keyname != "" && keyid != "") { 269 document.form1[keyname].value = keyid; 270 } 271 document.form1.submit(); 272} 273 274//æåæ°ãã«ã¦ã³ãããã 275function ShowLength( str, resultid ) { 276 document.getElementById(resultid).innerHTML = str.length + "æå"; 277} 278 279// ããã¹ãã¨ãªã¢ã®ãµã¤ãºã夿´ãã. 280function ChangeSize(button, TextArea, Max, Min, row_tmp){ 281 282 if(TextArea.rows <= Min){ 283 TextArea.rows=Max; button.value="å°ãããã"; row_tmp.value=Max; 284 }else{ 285 TextArea.rows =Min; button.value="大ãããã"; row_tmp.value=Min; 286 } 287} 288 289function subwin(URL,Winname){ 290 var WIN, Wwidth, Wheight; 291 Wwidth = 600; 292 Wheight = 640; 293 WIN = window.open(URL,Winname,"width="+Wwidth+",height="+Wheight+",scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=no"); 294 WIN.focus(); 295}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.