PageSourceSearch

https://www.nhk-cul.co.jp/common/js/basic.js

js nhk-cul.co.jp collected 2026-10-02 03:30:35 UTC 3,176 bytes, 116 lines download raw bytes

1function gfncZipSearch(formname, trgfrm, zipid, addrid, winname)
2{
3	if(document.getElementById(zipid).value == '') return;
4	if(document.getElementById(addrid).value != '') return;
5	
6	formElement = eval(formname);
7	formElement.target = trgfrm;
8	
9	var actionName = "/nhkcc-webapp/util/UJushoKensaku.do?";
10	// ZipCode
11	actionName += "lbJusho_L.yubinNo=";
12	actionName += escape(document.getElementById(zipid).value);
13	// OutputElementId
14	actionName += "&lbJusho_L.jushoId=";
15	actionName += addrid
16	// FormName
17	actionName += "&lbJusho_L.targetForm=";
18	actionName += formname;
19	// WindowName
20	actionName += "&lbJusho_L.targetWindow=";
21	actionName += winname;
22	
23	formElement.action = actionName;
24	formElement.submit();
25}
26
27function chgImgReSize(chgImg, chgSizeW, chgSizeH){
28
29	var tempImgStyle = chgImg.currentStyle || document.defaultView.getComputedStyle(chgImg, '');
30
31	var targetString1 = tempImgStyle.marginLeft;
32	targetString1.search("p");
33	var cssYohakuL = targetString1.substring(0, targetString1.search("p"));
34	var targetString2 = tempImgStyle.marginTop;
35	var cssTopString = targetString2.substring(0, targetString1.search("p"));
36
37	// ------------------------------------------------
38	// ’萔Ý’è
39	// ------------------------------------------------
40	var YOHAKU_WIDTH 		= cssYohakuL; 		
41	var YOHAKU_HEIGHT 		= cssTopString; 	
42
43	var tempOutputImg 		= new Image();
44
45	tempOutputImg.src 		= cutTs(chgImg.src);
46
47	var tempOutputImgSizeW 		= tempOutputImg.width;
48	var tempOutputImgSizeH 		= tempOutputImg.height;
49	var syukusyoRitsu = null;
50
51	if (tempOutputImgSizeW > chgSizeW)
52	{
53		syukusyoRitsu = (chgSizeW -YOHAKU_WIDTH) / tempOutputImgSizeW
54
55		tempOutputImgSizeW = tempOutputImgSizeW * syukusyoRitsu
56		tempOutputImgSizeH = tempOutputImgSizeH * syukusyoRitsu
57
58		tempOutputImg.width = tempOutputImgSizeW;
59
60		tempOutputImg.height = tempOutputImgSizeH;
61	}
62
63	if (tempOutputImgSizeH > chgSizeH)
64	{
65		syukusyoRitsu = (chgSizeH - YOHAKU_HEIGHT) / tempOutputImgSizeH
66
67		tempOutputImgSizeW = tempOutputImgSizeW * syukusyoRitsu
68		tempOutputImgSizeH = tempOutputImgSizeH * syukusyoRitsu
69
70		tempOutputImg.width = tempOutputImgSizeW;
71
72		tempOutputImg.height = tempOutputImgSizeH;
73	}
74
75	chgImg.src = tempOutputImg.src + "?" + new Date().getTime();
76	chgImg.width = tempOutputImg.width;
77	chgImg.height = tempOutputImg.height;
78
79	chgImg.onload="NextProc()";
80}
81
82function cutTs(imgPath){
83	var str = imgPath;
84	var searchIndex = str.search("%?");
85
86	if (searchIndex != 0) {
87		str = str.substring(0, searchIndex);
88		return str;
89	} else {
90		return imgPath;
91	}
92}
93
94function getBodyScrollHeight(){
95	if (this.ie) {
96		return this.document.body.scrollHeight;
97	}
98	if (this.webkit) {
99		return Math.max(this.document.documentElement.offsetHeight, this.document.documentElement.scrollHeight);
100	}
101	return this.document.documentElement.scrollHeight;
102}
103
104function setValue(id,kw){
105	if (kw == 'on'){
106		if (id.value.indexOf('ƒL[ƒ[ƒh‚ð“ü—Í') > -1) {
107			id.value='';
108			id.style.color='#333333';
109		}
110	} else {
111		if (id.value == '') {
112			id.value = 'ƒL[ƒ[ƒh‚ð“ü—Í';
113			id.style.color='#999999';
114		}
115	}
116}

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.