PageSourceSearch

https://opac.vnulib.edu.vn/scripts/webbridge.js

js vnulib.edu.vn collected 2026-10-02 14:55:33 UTC 3,614 bytes, 144 lines download raw bytes

1//  VERSION[] = "$Date: 2013-10-26 21:14:38 +0000 (Sat, 26 Oct 2013) $ @(#) webbridge.js $Rev: 220718 $ @(#)";
2
3function createResourceWindow( url )
4{
5    this.name = "catalog";
6    var select =  getObj( "affiliation_select" );
7    if( select != null && select.type == "select-one" )
8	{
9	url = url + select.options[select.selectedIndex].value;
10	}
11    resourceWindow = top.open( url, 'ResourceWindow','resizable=yes,scrollbars=yes,width=600,height=400');
12    if( resourceWindow.opener == null )
13        {
14        resourceWindow.opener = window;
15        }
16    resourceWindow.focus();
17    return false;
18}
19
20// needs to open once during the life time of the resources window,
21// else focus won't work for certain IE version -- 5.00.
22
23var newWin;
24var parentWin;
25function loadInSelf( url )
26	{
27    self.location = url;
28    self.focus();
29    return false;
30    }
31
32function loadInParent( url )
33	{
34    if (parentWin == null && self.opener != null)
35		{
36        parentWin = self.opener.self;
37        }
38	else if (self.opener == null)
39		{
40		parentWin = parent;
41		}
42	parentWin.location = url;
43	parentWin.focus();
44	return false;
45	}
46
47function loadInNewWindow( url )
48	{
49	// If newWin is not opened yet or opened but has been closed..
50	if( newWin == null || newWin.closed || newWin.location == null ) 
51		newWin = window.open( url, "resources", 'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes' ); 
52	else newWin.location.replace(url);
53
54	newWin.focus();
55	return false;
56	}
57
58function loadTopLevelFrame( url )
59	{
60    if( self.parent !=null)
61	   {
62       self.parent.location = url;
63       self.parent.focus();
64   }
65   else
66	   {
67		top.location = url;
68		top.focus();
69	   }
70	return false;
71    }
72
73function closeWindow()
74	{
75    window.close();
76    return false;
77    }
78
79function goToCatalog( url )
80	{
81    loadInParent(url);
82    closeWindow();
83    return false;
84    }
85        
86function replaceToken( one_res_form, one_res_url )
87	{
88	var repl_url = new String(one_res_url.value);
89	for(var i = 0; i< one_res_form.elements.length; i++)
90		{
91		if (one_res_form.elements[i].type == "select-one")
92			{
93            var one_repl_re_pounds_not_enc = new RegExp("#" + one_res_form.elements[i].name + "#");
94            repl_url = repl_url.replace(one_repl_re_pounds_not_enc, one_res_form.elements[i].value);
95            var one_repl_re_pounds_yes_enc = new RegExp("%23" + one_res_form.elements[i].name + "%23");
96            repl_url = repl_url.replace(one_repl_re_pounds_yes_enc, one_res_form.elements[i].value);
97            }
98		}
99		return repl_url;
100	}
101
102function replaceTokenLoadNew( one_res_form, one_res_url )
103        {
104		var repl_url = replaceToken(one_res_form, one_res_url);
105		loadInNewWindow(repl_url);
106		return false;
107        }
108
109function replaceTokenLoadParent( one_res_form, one_res_url )
110	{
111	var repl_url = replaceToken(one_res_form, one_res_url);
112	loadInParent(repl_url);
113	return false;
114	}
115
116function replaceTokenLoadSelf( one_res_form, one_res_url )
117	{
118    var repl_url = replaceToken(one_res_form, one_res_url);
119    loadInSelf(repl_url);
120    return false;
121    }
122
123function createOtherResources( url )
124	{
125	resourceWindow = top.open( url, 'ResourceWindow', 'resizable=yes,scrollbars=yes,width=600,height=400');
126	resourceWindow.focus();
127	window.close();
128	return false;
129	}
130
131
132function resubmitOpenurl( url, selectId, errorMsg )
133{
134dropdown = getObj( selectId );
135if( dropdown == null )
136   return false;
137if( dropdown.options[dropdown.selectedIndex].value.length == 0 )
138   {
139   alert( errorMsg );
140   return false;
141   }
142location = url + "&req_dat=" + dropdown.options[dropdown.selectedIndex].value;
143return true;
144}

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.