PageSourceSearch

http://orahoo.com/php/lib/openSearch.js

js orahoo.com collected 2026-10-02 06:24:29 UTC 8,294 bytes, 276 lines download raw bytes

1//----------------------------------------------------------------------
2//¡ÚJavaScript Orahoo SearchÂбþÈÇ¡Û 
3//----------------------------------------------------------------------
4//¡ÚÊѹ¹ÍúÎò¡Û
5// 2000/10/16    Sato       ½éÈÇ
6// 2001/05/07    Enomoto    ¥³¥Ô¡¼
7// 2001/05/07    zhou       ¥Õ¥©¡¼¥Þ¥Ã¥ÈήÍÑ
8//----------------------------------------------------------------------
9
10function SubmitAdmin() {
11	//procSubmit('_blank', 'http://www.orahoo.com/phphope/admin_frame.php');
12	//SubmitAdmin2('www.orahoo.com');
13	SubmitAdmin2('');
14}
15
16function SubmitAdmin2(baseurl) {
17    var url = '/phphope/admin_frame.php';
18    if (baseurl != '') {
19        url = 'http://' + baseurl + url;
20    }
21	procSubmit('_blank', url);
22	//procSubmit('_blank', 'http://' + baseurl + '/phphope/admin_frame.php');
23}
24
25function SubmitInsertGuest(baseurl) {
26	//procSubmit('_blank', baseurl + '/easyadmin/useradd_search_only.php');
27	procSubmit('_blank', 'http://' + baseurl + '/easyadmin/useradd_search_only.php');
28}
29
30function SubmitEdit() {
31	procSubmit('_blank', '/phphope/view/v_genre_edit.php');
32}
33
34function SubmitEditSearchTop() {
35	procSubmit('_blank', '/phphope/view/v_genre_edit_search.php');
36}
37
38function SubmitRegist(){
39	procSubmit('_blank', '/phphope/view/v_genre_prepare_register.php');
40}
41
42function procSubmit(target, action) {
43    var back_target = document.confirmfm.target;
44    var back_action = document.confirmfm.action;
45    document.confirmfm.target = target;
46    document.confirmfm.action = action;
47    document.confirmfm.submit();
48    document.confirmfm.target = back_target;
49    document.confirmfm.action = back_action;
50}
51
52function openSearch(Url , SID , UsrHome , HP , SS){
53	var entryUrl = Url ;
54	entryUrl += "?SID=" + SID;
55	entryUrl += "&UsrHome=" + UsrHome;
56	entryUrl += "&HP=" + HP;
57	entryUrl += "&SS=" + SS;
58	entryUrl += "&dummyq=ÈþÆý"  ;
59	entryUrl = encodeURI(entryUrl);
60	window.parent.document.location.href = entryUrl;
61}
62/*
63function openSearch(Url , SID , UsrHome , HP , SS){
64	var entryUrl = Url ;
65	entryUrl += "?SID=" + SID;
66	entryUrl += "&UsrHome=" + UsrHome;
67	entryUrl += "&HP=" + HP;
68	entryUrl += "&SS=" + SS;
69	entryUrl += "&dummyq=ÈþÆý"  ;
70	entryUrl = encodeURI(entryUrl);
71	window.parent.document.location.href = entryUrl;
72}
73*/
74//----------------------------------------------------------------------
75//¡Ú³µÍ×¡Û »ØÄꤵ¤ì¤¿RSS ¤ò¡¡IFrame ¤Çɽ¼¨¤µ¤»¤ë¡£
76//----------------------------------------------------------------------
77//¡ÚÊѹ¹ÍúÎò¡Û
78// 2008/08/18  create by zhou
79// 2010/02/03  isNoBar¤Ëtrue¤òÅϤ¹¤ÈURL¤Ënobar=1¤ò¤Ä¤±¤ë by ten
80//----------------------------------------------------------------------
81
82function chgIFramURL(Url){
83    chgIFramURL2(Url, false);
84}
85
86function chgIFramURL2(Url, isNoBar){
87	var entryUrl = "http://www.orahoo.com/search/rssReader.php?url=" + Url ;
88    // nobar=1¤ò¤Ä¤±¤ë¤ÈGoogle¥Ë¥å¡¼¥¹¤òɽ¼¨¤·¤Ê¤¤
89    if (isNoBar) { entryUrl += '&nobar=1'; }
90	entryUrl = encodeURI(entryUrl);
91
92	var objrssframe = window.rssframe;
93	if (objrssframe == undefined) {
94		objrssframe = window.open(entryUrl, 'rsswindow', 'location=no,menubar=no,status=no,resizable=yes,scrollbars=yes');
95		objrssframe.focus();
96	} else {
97		window.rssframe.location.href = entryUrl;
98	}
99}
100
101//----------------------------------------------------------------------
102//¡Ú³µÍ×¡Û »ØÄꤵ¤ì¤¿¥Ú¡¼¥¸ ¤ò¡¡IFrame ¤Çɽ¼¨¤µ¤»¤ë¡£
103//----------------------------------------------------------------------
104//¡ÚÊѹ¹ÍúÎò¡Û
105// 2008/08/22  create by zhou
106//----------------------------------------------------------------------
107/*
108function chgGenreURL(Url , frameid ){
109	var entryUrl =  Url ;
110	var targetFrame = document.getElementById(frameid);
111	entryUrl = encodeURI(entryUrl);
112	if (!targetFrame){
113		targetFrame.location.href = entryUrl;
114	}else{
115		alert("frame could not find.");
116	}
117}
118*/
119function chgGenreURL(Url){
120	var entryUrl =  encodeURI(Url);
121	window.rssframe.location.href = entryUrl;
122}
123
124
125//----------------------------------------------------------------------
126//¡ÚJavaScript Orahoo SearchÂбþÈÇ¡Û 
127//----------------------------------------------------------------------
128//¡ÚÊѹ¹ÍúÎò¡Û
129// 2000/10/16    Sato       ½éÈÇ
130// 2001/05/07    Enomoto    ¥³¥Ô¡¼
131// 2001/05/07    zhou       ¥Õ¥©¡¼¥Þ¥Ã¥ÈήÍÑ
132//----------------------------------------------------------------------
133
134function openSearch1(Url , SID , UsrHome , HP , SS){
135	var entryUrl = Url ;
136	entryUrl += "?SID=" + SID;
137	entryUrl += "&UsrHome=" + UsrHome;
138	entryUrl += "&HP=" + HP;
139	entryUrl += "&SS=" + SS;
140	entryUrl += "&dummyq=ÈþÆý"  ;
141	entryUrl = encodeURI(entryUrl);
142	window.open( entryUrl , "sw");
143}
144
145//----------------------------------------------------------------------
146//¡ÚJavaScript openSearch1¤Î¥­¡¼¥ï¡¼¥É»ØÄê2¤Ä¡Û 
147//----------------------------------------------------------------------
148//¡ÚÊѹ¹ÍúÎò¡Û
149// 2009/03/13    Nakano     ½éÈÇ
150//----------------------------------------------------------------------
151function openSearch1_2(Url , SID , UsrHome , HP , SS1, SS2){
152	openSearch1(Url , SID , UsrHome , HP , SS1 + ' ' + SS2);
153}
154
155
156
157function openSearch2(SS){
158	var entryUrl = "http://www.orahoo.com/search/asearch.php" ;
159	entryUrl += "?SID=0" ;
160	entryUrl += "&UsrHome=/" ;
161	entryUrl += "&HP=/" ;
162	entryUrl += "&SS=" + SS;
163	entryUrl += "&dummyq=ÈþÆý"  ;
164	entryUrl = encodeURI(entryUrl);
165	window.open( entryUrl , null);
166}
167
168//----------------------------------------------------------------------
169//¡ÚJavaScript ¸¡º÷²èÌ̤ò³«¤¯¡Û 2¤Ï¸¡º÷¥­¡¼¥ï¡¼¥É¤ò2¤Ä»ØÄê²Äǽ
170//----------------------------------------------------------------------
171//¡ÚÊѹ¹ÍúÎò¡Û
172// 2009/04/02    Nakano     ½éÈÇ
173//----------------------------------------------------------------------
174//  opt¤ÏͽÈ÷¤Ç¤½¤Î¤Û¤«¥ª¥×¥·¥ç¥ó¤¬É¬Íפˤʤ俤Ȥ­¤Ë»ÈÍѤ¹¤ë
175//----------------------------------------------------------------------
176function openSearch3(Engine, SS, opt) {
177	var entryUrl;
178	var encSS = encodeURI(SS);
179
180	switch (Engine) {
181		case 'google':
182			entryUrl = 'http://www.google.com/search?q=' + encSS;
183			window.open( entryUrl , null);
184			break;
185		case 'yahoo':
186			entryUrl = 'http://search.yahoo.co.jp/search?p=' + encSS;
187			window.open( entryUrl , null);
188			break;
189		default:
190			openSearch2(SS);
191			break;
192	}
193}
194function openSearch3_2(Engine, SS1, SS2, opt) {
195	openSearch3(Engine , SS1 + ' ' + SS2, opt);
196}
197
198//----------------------------------------------------------------------
199//¡ÚJavaScript ¸¡º÷²èÌ̤ò³«¤¯¡Û 2¤Ï¸¡º÷¥­¡¼¥ï¡¼¥É¤ò2¤Ä»ØÄê²Äǽ
200//----------------------------------------------------------------------
201//¡ÚÊѹ¹ÍúÎò¡Û
202// 2009/04/02    Nakano     ½éÈÇ
203//----------------------------------------------------------------------
204//  opt¤ÏͽÈ÷¤Ç¤½¤Î¤Û¤«¥ª¥×¥·¥ç¥ó¤¬É¬Íפˤʤ俤Ȥ­¤Ë»ÈÍѤ¹¤ë
205//----------------------------------------------------------------------
206function openSearch4(Engine, SS, SelectForm, opt) {
207	var entryUrl;
208	var param = "";
209
210	var fm = getForm(SelectForm);
211	if (fm != null) {
212		var eles = fm.elements;
213		for (var li = 0; li < eles.length; li++) {
214			var ele = eles[li];
215			switch (ele.name) {
216				case 'area1_select':
217				case 'area_select':
218				case 'area2_select':
219					param += " ";
220					param += ele.options[ele.selectedIndex].value;
221					break
222				case 'engine':
223					Engine = ele.options[ele.selectedIndex].value;
224					break;
225			}
226		}
227	}
228
229	if (param.length > 0) { SS = param + " " + SS; }
230
231	var encSS = encodeURI(SS);
232
233	switch (Engine) {
234		case 'google':
235			entryUrl = 'http://www.google.com/search?q=' + encSS;
236			window.open( entryUrl , null);
237			break;
238		case 'yahoo':
239			entryUrl = 'http://search.yahoo.co.jp/search?p=' + encSS;
240			window.open( entryUrl , null);
241			break;
242		case 'gnews':
243			entryUrl = 'http://news.google.co.jp/news/search?pz=1&ned=jp&hl=ja&q=' + encSS;
244			window.open( entryUrl , null);
245			break;
246		default:
247			openSearch2(SS);
248			break;
249	}
250}
251function openSearch4_2(Engine, SS1, SS2, SelectForm, opt) {
252	openSearch4(Engine , SS1 + ' ' + SS2, SelectForm, opt);
253}
254
255function openNews(SS) {
256	openSearch4('gnews', SS, '', '');
257}
258
259function getForm(SelectForm) {
260	var fm = null;
261
262	if (SelectForm.length == 0) { return fm; }
263
264	for (li = 0; li < document.forms.length; li++) {
265		if (document.forms[li].name == SelectForm) {
266			fm = document.forms[li];
267		}
268	}
269
270	return fm;
271}
272
273function openBooks(SS){
274	entryUrl = "http://books.google.co.jp/books?q="+encodeURI(SS)+"&bt
274nG="+encodeURI("½ñÀҤθ¡º÷");
275	window.open( entryUrl , null);
276}

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.