PageSourceSearch

https://k-avance.jp/_module/js/script.js?l=0,t=default08,f=g,fs=m,c=311a

js k-avance.jp collected 2026-10-05 10:36:48 UTC 10,292 bytes, 266 lines download raw bytes

1/* script.js
2  - Setting global variables - These variables are used in other scripts as well.
3  - Selecting js files to be loaded - For app use.
4  121018_2
5--------------------------------------------------------- */
6////////// global variables
7// for FREESPACE
8var fsURL = 'http://module.bindsite.jp/';
9var fsModule = '_module140218-1200';
10// bindobj
11var bindobj = new Object();
12bindobj.ua = navigator.userAgent.toLowerCase();
13bindobj.win = bindobj.ua.indexOf('windows')>-1 || bindobj.ua.indexOf('win32')>-1 ? true : false;
14bindobj.win7 = bindobj.win && bindobj.ua.indexOf('nt 6.1')>-1 ? true : false;
15bindobj.vista = bindobj.win && bindobj.ua.indexOf('nt 6.0')>-1 ? true : false;
16bindobj.xp = bindobj.win && (bindobj.ua.indexOf('nt 5.1')>-1 || bindobj.ua.indexOf('windows xp')>0) ? true : false;
17bindobj.mac = bindobj.ua.indexOf('macintosh')>-1 || bindobj.ua.indexOf('mac_power')>-1 ? true : false;
18bindobj.opr = bindobj.ua.indexOf('opera')>-1 ? true : false;
19bindobj.ie = bindobj.ua.indexOf('msie')>-1 && !bindobj.opr ? true : false;
20bindobj.ffx = bindobj.ua.indexOf('firefox')>0 ? true : false;
21bindobj.chr = bindobj.ua.indexOf('chrome')>0 ? true : false;
22bindobj.ie90 = bindobj.ua.indexOf('msie 9')>0 && !bindobj.opr ? true : false;
23bindobj.ie80 = bindobj.ua.indexOf('msie 8')>0 && !bindobj.opr ? true : false;
24bindobj.ie70 = bindobj.ua.indexOf('msie 7')>0 && !bindobj.opr ? true : false;
25bindobj.ie60 = bindobj.ua.indexOf('msie 6.0')>0 && !bindobj.opr && bindobj.ua.indexOf('safari')<0 ? true : false;
26bindobj.ie55 = bindobj.ua.indexOf('msie 5')>0 && !bindobj.opr ? true : false;
27bindobj.ie52 = bindobj.ua.indexOf('msie 5')>0 && bindobj.mac ? true : false;
28bindobj.ie40 = bindobj.ua.indexOf('msie 4')>0 ? true : false;
29bindobj.wff = bindobj.ffx && bindobj.win ? true : false;
30bindobj.mff = bindobj.ffx && bindobj.mac ? true : false;
31bindobj.ff1 = bindobj.ua.indexOf('firefox/1.0')>0 ? true : false;
32bindobj.sf1 = bindobj.ua.indexOf('safari/85')>0 ? true : false;
33bindobj.msf = (bindobj.ua.indexOf('safari')>0 || bindobj.ua.indexOf('applewebkit')>0) && bindobj.mac ? true : false;
34bindobj.wsf = bindobj.ua.indexOf('safari')>0 && bindobj.win ? true : false;
35bindobj.op8 = bindobj.ua.indexOf('opera/8')>0 || bindobj.ua.indexOf('opera 8')>0 ? true : false;
36bindobj.op7 = bindobj.ua.indexOf('opera/7')>0 || bindobj.ua.indexOf('opera 7')>0 ? true : false;
37bindobj.op6 = bindobj.ua.indexOf('opera 6')>0 ? true : false;
38bindobj.ns7 = bindobj.ua.indexOf('netscape/7')>0 ? true : false;
39bindobj.ns6 = bindobj.ua.indexOf('netscape6')>0 ? true : false;
40bindobj.ipad = (bindobj.ua.indexOf('ipad')>0 && bindobj.ua.indexOf('safari')>0) ? true : false;
41bindobj.iphone = (bindobj.ua.indexOf('iphone')>0 && bindobj.ua.indexOf('safari')>0) ? true : false;
42
43bindobj.printstate = window.location.search.indexOf('printstate=true')>-1 ? true : false;
44bindobj.disablecss = function() {
45	document.getElementById('theme-css').disabled = true;
46	document.getElementById('page-css').disabled = true;
47};
48bindobj.isLegacy = false;
49bindobj.isLocal = false;
50if (document.URL.indexOf('file://')==0 && location.search.indexOf('bindapp=1')>-1) bindobj.isLocal = true;
51bindobj.level = '';
52bindobj.textsize = '';
53bindobj.theme = '';
54bindobj.font = '';
55bindobj.fontsize = '';
56bindobj.rs = 0;
57//***sato modified 090626
58bindobj.cornerskin = '';
59bindobj.siteroot = '';
60bindobj.moduleroot = '';
61
62param = document.getElementById('script-js').src.replace(/^.*\?(.*)$/g,'$1');
63param = param.split(',');
64for (i=0;i<param.length;i++) {
65	kv = param[i].split('=');
66	id = kv[0];
67	val = kv[1];
68	if (id=='l') eval('bindobj.level = ' + val);
69	if (id=='s') eval('bindobj.textsize = ' + val);
70	if (id=='t') eval('bindobj.theme = "' + val + '"');
71	if (id=='f') eval('bindobj.font = "' + val + '"');
72	if (id=='fs') eval('bindobj.fontsize = "' + val + '"');
73	if (id=='rs') eval('bindobj.rs = ' + val);
74//***sato modified 090626
75	if (id=='c') eval('bindobj.cornerskin = "' + val + '"');
76}
77
78for (i=0;i<bindobj.level;i++) bindobj.siteroot += '../';
79
80bindobj.dir = '';
81var moduleDir = '_module';
82if (bindobj.rs == 0) {
83	bindobj.dir = bindobj.siteroot;
84} else {
85	bindobj.dir = fsURL;
86	moduleDir = fsModule;
87}
88bindobj.moduleroot = bindobj.dir + moduleDir;
89
90/* include view.js start */
91/* view.js
92  - Browser Optimization
93  - Print setting - Checking if the page is for print.
94  - Legacy browser view - Setting for IE5.5, IE5.2, Netscape 6, Netscape 7, Opera 8, Safari 1.03.
95    Cuts the theme style off from default setting.
96--------------------------------------------------------- */
97var optionscss = document.getElementById('options-css') ? true : false;
98
99////////// browser optimization
100////////// legacy browser view
101if (bindobj.ie52 || bindobj.ie55 || bindobj.ns7 || bindobj.ff1 || bindobj.op8) {
102	bindobj.disablecss();
103	bindobj.isLegacy = true;
104	///// options
105	if (optionscss) document.getElementById('options-css').href = bindobj.moduleroot + '/layout/legacy.css';
106	else document.write('<link rel="stylesheet" type="text/css" href="' + bindobj.moduleroot + '/layout/legacy.css" />');
107	
108////////// modern browser view
109} else {
110	var optcss = bindobj.moduleroot + '/layout/';
111//*** 090626 modified
112	if (bindobj.cornerskin) optcss = bindobj.siteroot + '_cnskin/' + bindobj.cornerskin + '/css/';
113	
114	if (bindobj.ie70) {
115		if (bindobj.win7 || bindobj.vista) optcss += '_ie7v.css';
116		else optcss += '_ie7x.css';
117	}
118	else if (bindobj.ie80) {
119		if (bindobj.win7 || bindobj.vista) optcss += '_ie8v.css';
120		else optcss += '_ie8x.css';
121	}
122//*** 090825 modified
123	else if (bindobj.ie60) {
124		optcss += '_ie6.css';
125		if (bindobj.cornerskin) document.write('<link rel="stylesheet" type="text/css" href="' + bindobj.moduleroot + '/layout/cnskin-ie6.css" />');
126	}
127	else if (bindobj.msf) optcss += '_msf.css';
128	else if (bindobj.mff) optcss += '_mff.css';
129	else if (bindobj.wff || bindobj.ie80) {
130		if (bindobj.win7 || bindobj.vista) optcss += '_wffv.css';
131		else optcss += '_wffx.css';
132	}
133	else if (bindobj.chr) optcss += '_chr.css';
134	else if (bindobj.mac) optcss += '_mac.css';
135	else optcss += '_else.css';
136	if (optionscss) document.getElementById('options-css').href = optcss;
137	else addCSS(optcss);
138	
139	///// overwrite.css on BiNDServer
140	if (bindobj.rs == 1) {
141		addCSS(bindobj.moduleroot + '/layout/overwrite.css');
142	}
143	
144	///// font
145	if (bindobj.font != '' && bindobj.fontsize != '') {
146		
147		///// directory
148		var fcss = bindobj.moduleroot + '/layout/font/';
149		switch (bindobj.font)	{
150			case 'm': fcss += 'mincho/'; break;
151			case 'g': fcss += 'gothic/'; break;
152		}
153		switch (bindobj.fontsize) {
154			case 'l': fcss += 'l/'; break;
155			case 'm': fcss += 'm/'; break;
156			case 's': fcss += 's/'; break;
157		}
158		
159		///// filename
160		if (bindobj.ie70) {
161			if (bindobj.win7 || bindobj.vista) fcss += '_ie7v.css';
162			else fcss += '_ie7x.css';
163		}
164//*** 090825 modified
165		else if (bindobj.ie60) {
166			optcss += '_ie6.css';
167			if (bindobj.cornerskin) document.write('<link rel="stylesheet" type="text/css" href="' + bindobj.moduleroot + '/layout/cnskin-ie6.css" />');
168		}
169		else if (bindobj.msf) fcss += '_msf.css';
170		else if (bindobj.mff) fcss += '_mff.css';
171		else if (bindobj.wff) {
172			if (bindobj.win7 || bindobj.vista) fcss += '_wffv.css';
173			else fcss += '_wffx.css';
174		}
175		else if (bindobj.mac) fcss += '_mac.css';
176		else fcss += '_else.css';
177		
178		addCSS(fcss);
179	}
180}
181
182////////// print setting
183if (bindobj.printstate) {
184	bindobj.disablecss();
185	startcss = '<style type="text/css"><!-- ';
186	endcss = ' --></style>';
187	printcss = '';
188	if (bindobj.ffx) printcss += startcss + '#area-print * { font-weight:normal !important;}' + endcss;
189	if (bindobj.ie60) printcss += '<link rel="stylesheet" type="text/css" href="' + bindobj.moduleroot + '/layout/printlayout-ie6.css" />';
190	document.write(printcss);
191}
192
193function legacyCheck() {
194	if (bindobj.ns6 || bindobj.op7 || bindobj.op6) {
195		bindobj.disablecss();
196		bindobj.isLegacy = true;
197	}
198	
199	if (bindobj.ie52 || bindobj.ie40) {
200		bindobj.disablecss();
201		bindobj.isLegacy = true;
202		pick = function(e) {
203			if (e.className.indexOf(' ')) {
204				cN = e.className.split(' ');
205				e.className = cN[0];
206			}
207		};
208		erace = function() {
209			divs = document.getElementsByTagName('div');
210			for (i=0;i<divs.length;i++) pick(divs[i]);
211		};
212		erace();
213	}
214	
215//*** 090825 added
216	if (bindobj.ie60 && bindobj.cornerskin) {
217		document.getElementById('area-header').style.background = "url(" + bindobj.moduleroot + "/layout/img/ie6.gif) no-repeat center top";
218		document.getElementById('area-header').style.paddingTop = "30px";
219	}
220}
221/* include view.js end */
222
223function addCSS(csssrc) {
224	document.write('<link rel="stylesheet" type="text/css" href="' + csssrc + '" />');
225}
226function addJS(src, id) {
227	document.write('<script type="text/javascript" src="' + src + '" charset="utf-8" id="' + id + '"></script>');
228}
229
230////////// load js files
231bindobj.js = new Array();
232if (!bindobj.ie52) {
233	bindobj.js = [
234		['jquery-1.6.3.min.js','jquery-js'],['jquery.easing.1.3.js','jquery-easing-js'],
235		['movie.js','movie-js'],['parts.js','parts-js'],['fx.js','fx-js']];
236	if (bindobj.ie60) bindobj.js.push(['png.js','png-js']); ///for IE6
237	if (bindobj.isLocal) bindobj.js.push(['blockeditor/blockeditor.js','blockeditor-js']); ///Works only on local.
238	for (i=0;i<bindobj.js.length;i++) addJS(bindobj.moduleroot + '/js/' + bindobj.js[i][0], bindobj.js[i][1]);
239	
240	// corner js
241	if (bindobj.cornerskin) addJS(bindobj.siteroot + '_cnskin/' + bindobj.cornerskin + '/js/override.js', 'override-js');
242	
243	// load js
244	addJS(bindobj.moduleroot + '/js/load.js', 'load-js');
245	
246} else {
247	legacyCheck();
248	
249}
250
251
252/* common.js
253  - Popup window control
254  HTML: onclick="popup(this.href,this.target,500,600,0,1);return false;"
255  Parameter order: url,target,width,height,scrollbars,resizable
256--------------------------------------------------------- */
257////////// popup
258function popup(u,t,w,h,s,r) {
259	var param = '';
260	if (w>0) param += 'width=' + w + ',';
261	if (h>0) param += 'height=' + h + ',';
262	if (!t) t = '_blank';
263	param += 'scrollbars=' + s + ',resizable=' + r;
264	var popwin = window.open(u,t,param);
265	popwin.focus();
266}

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.