PageSourceSearch

https://www.aishima.co.jp/js/option.js

js aishima.co.jp collected 2026-10-06 23:56:00 UTC 9,752 bytes, 573 lines download raw bytes

1/* Browser Detection
2
3----------------------------------------------------------------------------- */
4
5var _BROWSER_IS_IE =
6
7    (document.all
8
9     && window.ActiveXObject
10
11     && navigator.userAgent.toLowerCase().indexOf("msie") > -1
12
13     && navigator.userAgent.toLowerCase().indexOf("opera") == -1);
14
15
16
17/**
18
19 * I hate navigator string based browser detection too, but when Opera alone
20
21 * chokes on cookies containing double quotes...
22
23 */
24
25var _BROWSER_IS_OPERA =
26
27    (navigator.userAgent.toLowerCase().indexOf("opera") != -1);
28
29
30
31/* CookieManager Object
32
33----------------------------------------------------------------------------- */
34
35/**
36
37 * Provides a simple interface for creating, retrieving and clearing cookies.
38
39 *
40
41 * @author Jonathan Buchanan
42
43 * @version 0.8
44
45 * @dependencies $() in Core.js
46
47 */
48
49CookieManager = Class.create();
50
51CookieManager.prototype =
52
53{
54
55    /**
56
57     * Determines if this object will use IE's proprietary userData behaviour
58
59     * instead of cookies for storage.
60
61     */
62
63    userDataForIE: false,
64
65
66
67    initialize: function(userDataForIE)
68
69    {
70
71        this.cookieShelfLife = 365;
72
73        this.userDataForIE = userDataForIE;
74
75
76
77        // Internet Explorer has a cookie handling bug - if the *combined size*
78
79        // of all cookies stored for a given domain is greater than 4096 bytes,
80
81        // document.cookie will return an empty string. Until this is fixed , we
82
83        // will fall back on IE's proprietary userData behaviour.
84
85        if (_BROWSER_IS_IE && this.userDataForIE)
86
87        {
88
89            this.IE_CACHE_NAME = "storage";
90
91            if ($(this.IE_CACHE_NAME) == null)
92
93            {
94
95                var div = document.createElement("DIV");
96
97                div.id = this.IE_CACHE_NAME;
98
99                document.body.appendChild(div);
100
101            }
102
103            this.store = $(this.IE_CACHE_NAME);
104
105            this.store.style.behavior = "url('#default#userData')";
106
107        }
108
109    },
110
111
112
113    /**
114
115     * Returns the value of a cookie with the given name, or <code>null</code>
116
117     * if no such cookie exists.
118
119     */
120
121    getCookie: function(aCookieName)
122
123    {
124
125        var result = null;
126
127        if (_BROWSER_IS_IE && this.userDataForIE)
128
129        {
130
131            this.store.load(this.IE_CACHE_NAME);
132
133            result = this.store.getAttribute(aCookieName);
134
135        }
136
137        else
138
139        {
140
141            for (var i = 0; i < document.cookie.split('; ').length; i++)
142
143            {
144
145                var crumb = document.cookie.split('; ')[i].split('=');
146
147                if (crumb[0] == aCookieName && crumb[1] != null)
148
149                {
150
151                    result = crumb[1];
152
153                    break;
154
155                }
156
157            }
158
159        }
160
161
162
163        if (_BROWSER_IS_OPERA && result != null)
164
165        {
166
167            result = result.replace(/%22/g, '"');
168
169        }
170
171        return result;
172
173    },
174
175
176
177    /**
178
179     * Sets a cookie with the given name and value.
180
181     */
182
183    setCookie: function(aCookieName, aCookieValue)
184
185    {
186
187        if (_BROWSER_IS_IE && this.userDataForIE)
188
189        {
190
191            this.store.setAttribute(aCookieName, aCookieValue);
192
193            this.store.save(this.IE_CACHE_NAME);
194
195        }
196
197        else
198
199        {
200
201            if (_BROWSER_IS_OPERA)
202
203            {
204
205                aCookieValue = aCookieValue.replace(/"/g, "%22");
206
207            }
208
209            var date = new Date();
210
211            date.setTime(date.getTime() + (this.cookieShelfLife * 24*60*60*1000));
212
213            var expires = '; expires=' + date.toGMTString();
214
215            document.cookie = aCookieName + '=' + aCookieValue + expires + '; path=/';
216
217        }
218
219    },
220
221
222
223    /**
224
225     * Clears the cookie with the given name.
226
227     */
228
229    clearCookie: function(aCookieName)
230
231    {
232
233        if (_BROWSER_IS_IE && this.userDataForIE)
234
235        {
236
237            this.store.load(this.IE_CACHE_NAME);
238
239            this.store.removeAttribute(aCookieName);
240
241            this.store.save(this.IE_CACHE_NAME);
242
243        }
244
245        else
246
247        {
248
249            document.cookie =
250
251                aCookieName + '=;expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/';
252
253        }
254
255    }
256
257}
258
259
260
261// FontChanger
262
263// Copyright (c) 2007 Hirotaka Ogawa
264
265// REQUIRES: prototype.js, cookiemanager.js
266
267FontChanger = Class.create();
268
269FontChanger.prototype = {
270
271  id: null,
272
273  cookieManager: null,
274
275  cookieName: 'body.style.fontSize',
276
277  initialize: function(id) {
278
279    this.id = id || 'fontChanger';
280
281    this.cookieManager = new CookieManager();
282
283    var fontSize = this.cookieManager.getCookie(this.cookieName);
284
285    if (fontSize) document.body.style.fontSize = fontSize;
286
287  },
288
289  setCookieShelfLife: function(days) {
290
291    this.cookieManager.cookieShelfLife = days;
292
293  },
294
295  change: function(fontSize) {
296
297    document.body.style.fontSize = fontSize;
298
299    this.cookieManager.setCookie(this.cookieName, fontSize);
300
301  },
302
303  reset: function() {
304
305    document.body.style.fontSize = '';
306
307    this.cookieManager.clearCookie(this.cookieName);
308
309  },
310
311  show: function() {
312
313    var id = this.id;
314
315    document.writeln([
316
317'<div id="' + id + '">',
318
319'<span style="cursor: pointer; font-size: 1.2em ;" id="' + id + '-small" ><img src="images/bt_small.gif"></span>',
320
321'<span style="cursor: pointer; font-size: 1.4em;" id="' + id + '-medium"><img src="images/bt_medium.gif"></span>',
322
323'<span style="cursor: pointer; font-size: 1.6em;" id="' + id + '-large" ><img src="images/bt_large.gif"></span>',
324
325'</div>'
326
327    ].join("\n"));
328
329    Event.observe($(id + '-small' ), 'click', this.onClickSmall.bind(this));
330
331    Event.observe($(id + '-medium'), 'click', this.onClickMedium.bind(this));
332
333    Event.observe($(id + '-large' ), 'click', this.onClickLarge.bind(this));
334
335  },
336
337  onClickSmall:  function(e) { this.change('80%' ); },
338
339  onClickMedium: function(e) { this.change('100%'); },
340
341  onClickLarge:  function(e) { this.change('120%'); }
342
343};
344
345// Bootstrap
346
347FontChanger.start = function(id) {
348
349  var fontChanger = new FontChanger(id);
350
351  fontChanger.show();
352
353};
354
355
356
357///////////////////////////////////////////////////////////////////////////////////////////
358
359
360
361
362
363/*
364*	Image rollover js
365*	Author : Kazuhito Hokamura
366*	http://webtech-walker.com/
367*
368*	Licensed under the MIT License:
369*	http://www.opensource.org/licenses/mit-license.php
370*/
371
372(function(){
373	function rollover(){
374		var targetClassName = "hover";
375		var suffix = "_o";
376
377		var overReg = new RegExp("^(.+)(\\.[a-z]+)$");
378		var outReg = new RegExp("^(.+)" + suffix + "(\\.[a-z]+)$");
379
380		var preload = new Array();
381		var images = document.getElementsByTagName("img");
382
383		for (var i = 0, il = images.length; i < il; i++) {
384			var classStr = images[i].getAttribute("class") || images[i].className;
385			var classNames = classStr.split(/\s+/);
386			for(var j = 0, cl = classNames.length; j < cl; j++){
387				if(classNames[j] == targetClassName){
388
389					//preload
390					preload[i] = new Image();
391					preload[i].src = images[i].getAttribute("src").replace(overReg, "$1" + suffix + "$2");
392
393					//mouseover
394					images[i].onmouseover = function() {
395						this.src = this.getAttribute("src").replace(overReg, "$1" + suffix + "$2");
396					}
397
398					//mouseout
399					images[i].onmouseout = function() {
400						this.src = this.getAttribute("src").replace(outReg, "$1$2");
401					}
402				}
403			}
404		}
405	}
406
407	function addEvent(elem,event,func){
408		if(elem.addEventListener) {
409			elem.addEventListener(event, func, false);
410		}else if(elem.attachEvent) {
411			elem.attachEvent("on" + event, func);
412		}
413	}
414	addEvent(window,"load",rollover);
415})();
416
417
418
419///////////////////////////////////////////////////////////////////////////////////////////
420
421            
422
423/* This script and many more are available free online at
424
425The JavaScript Source!! http://javascript.internet.com
426
427Created by: Konstantin Jagello | http://javascript-array.com/ */
428
429
430
431var TimeOut         = 300;
432
433var currentLayer    = null;
434
435var currentitem     = null;
436
437var currentLayerNum = 0;
438
439var noClose         = 0;
440
441var closeTimer      = null;
442
443
444
445function mopen(n) {
446
447  var l  = document.getElementById("menu"+n);
448
449  var mm = document.getElementById("mmenu"+n);
450
451	
452
453  if(l) {
454
455    mcancelclosetime();
456
457    l.style.visibility='visible';
458
459    if(currentLayer && (currentLayerNum != n))
460
461      currentLayer.style.visibility='hidden';
462
463    currentLayer = l;
464
465    currentitem = mm;
466
467    currentLayerNum = n;			
468
469  } else if(currentLayer) {
470
471    currentLayer.style.visibility='hidden';
472
473    currentLayerNum = 0;
474
475    currentitem = null;
476
477    currentLayer = null;
478
479 	}
480
481}
482
483
484
485function mclosetime() {
486
487  closeTimer = window.setTimeout(mclose, TimeOut);
488
489}
490
491
492
493function mcancelclosetime() {
494
495  if(closeTimer) {
496
497    window.clearTimeout(closeTimer);
498
499    closeTimer = null;
500
501  }
502
503}
504
505
506
507function mclose() {
508
509  if(currentLayer && noClose!=1)   {
510
511    currentLayer.style.visibility='hidden';
512
513    currentLayerNum = 0;
514
515    currentLayer = null;
516
517    currentitem = null;
518
519  } else {
520
521    noClose = 0;
522
523  }
524
525  currentLayer = null;
526
527  currentitem = null;
528
529}
530
531
532
533document.onclick = mclose; 
534
535
536
537function formReset(targetElement){
538	if(targetElement.value == targetElement.defaultValue){
539		targetElement.value = "";
540	}
541}
542
543function jumpPage(selection){
544	var url=selection[selection.selectedIndex].value;
545	if(url!=""){
546	location.href=url;
547	}
548}
549
550function getMonday() {
551	
552	var now = new Date();
553	var Y = now.getFullYear();
554	var M = now.getMonth();
555	var D = now.getDate();
556	var W = now.getDay();
557	
558	if (W == 0) { W = 6; }
559	if (W == 1) { W = 0; }
560	if (W == 2) { W = 1; }
561	if (W == 3) { W = 2; }
562	if (W == 4) { W = 3; }
563	if (W == 5) { W = 4; }
564	if (W == 6) { W = 5; }
565	
566	var monday = new Date(Y, M, D - W);
567	var mY = monday.getFullYear();
568	var mM = monday.getMonth();
569	var mD = monday.getDate();
570	
571	document.write(mY + '/' + (mM + 1) + '/' + mD + '/現在');
572
573}

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.