PageSourceSearch

http://www.beatlesebooks.com/account/js/site.js?cache=1470679636000

js beatlesebooks.com collected 2026-10-02 05:17:28 UTC 4,767 bytes, 257 lines download raw bytes

1Event.observe(window, "load", function() {
2	$$('.paymentmethodlist input.radiobutton[name^=payment_]:checked').each(
3		function(method) {
4			paymentMethodDetails(method)
5		});
6
7	$$('select.paymentmethodlist.popupmenu[name^=payment_]').each(
8		function(method) {
9			paymentMethodDetailsPopup(method);
10		});
11});
12
13
14function viewProductImage(inURL)
15{
16	open(inURL, 'viewproduct', 'width=200,height=200,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
17}
18
19function updateProductImage(inImageURL, inLinkURL, inAltText, inID, inOriginalImage)
20{
21	var element = $('product_' + inID + '_image');
22	
23	var link = $('product_' + inID + '_view');
24	
25	var lightbox = $('product_' + inID + '_lightbox');
26	
27	if(lightbox && link)
28	{	
29		link.innerHTML = '<img id="' + lightbox.id + '" src="' + inImageURL + '" alt="' + inAltText + '" border=' + lightbox.border + ' class="' + lightbox.className + '" rel="lightbox" />';
30
31		link.href = inOriginalImage;
32	}
33	
34	if(element && link)
35	{
36		link.innerHTML = '<img id="' + element.id + '" src="' + inImageURL + '" alt="' + inAltText + '" border=' + element.border + ' class="' + element.className + '" />';
37
38		link.href = "javascript:viewProductImage('" + inLinkURL + "')";
39	}
40
41	if(element && !link)
42	{
43		element.src = inImageURL;
44
45		element.alt = inAltText;
46	}
47}
48
49function updateForm(page, id)
50{
51	var formgoto = document.getElementById('formgoto_' + id);
52	
53	if(formgoto)
54	{
55		formgoto.value = page;
56	}
57	
58	document.forms['form_' + id].submit();
59}
60
61function updateList(index, id)
62{
63	var page = document.getElementById('page_' + id);
64
65	if(page)
66	{
67		page.value = index;
68	}
69
70	document.forms['list_' + id].submit();
71}
72
73function updateLogin(newState, id)
74{
75	var state = document.getElementById('state_' + id)
76
77	if(state)
78	{
79		state.value = newState
80
81		var login = document.getElementById('login_' + id)
82
83		if(login)
84		{
85			login.submit();
86		}
87	}
88}
89
90function viewPost(forumid, postid)
91{
92	var post = document.getElementById('forumpost_' + forumid);
93
94	var state = document.getElementById('forumdst_' + forumid);
95	
96	if(post && state)
97	{
98		post.value = postid;
99		
100		state.value = 'view';
101		
102		document.forms['forum_' + forumid].submit();
103	}
104}
105
106function viewOrder(inTrackingID, inOrderNumber, inViewPrefix)
107{
108	if(!inViewPrefix)
109	{
110		inViewPrefix = 'trackingview_';
111	}
112	
113	var input = document.getElementById('trackingnumber_' + inTrackingID);
114
115	if(input)
116	{
117		var button = document.getElementById(inViewPrefix + inTrackingID);
118
119		if(button)
120		{
121			input.value = inOrderNumber;
122			button.click();
123		}
124	}
125}
126
127function getElementWidth(inElement)
128{
129	if(inElement.scrollWidth > inElement.offsetWidth)
130	{
131		return inElement.scrollWidth;
132	}
133	else
134	{
135		return inElement.offsetWidth;
136	}
137}
138
139function getElementHeight(inElement)
140{
141	if(inElement.scrollHeight > inElement.offsetHeight)
142	{
143		return inElement.scrollHeight;
144	}
145	else
146	{
147		return inElement.offsetHeight;
148	}
149}
150
151function getElementX(inElement)
152{
153	var x = 0;
154	
155	if(inElement.offsetParent)
156	{
157		while(inElement.offsetParent)
158		{
159			x += inElement.offsetLeft
160			
161			inElement = inElement.offsetParent;
162		}
163	}
164	else if(inElement.x)
165	{
166		x += inElement.x;
167	}
168	
169	return x;
170}
171
172function getElementY(inElement)
173{
174	var y = 0;
175	
176	if(inElement.offsetParent)
177	{
178		while(inElement.offsetParent)
179		{
180			y += inElement.offsetTop
181	
182			inElement = inElement.offsetParent;
183		}
184	}
185	else if(inElement.y)
186	{
187		y += inElement.y;
188	}
189	
190	return y;
191}
192
193function getGiftCardBalance(accountID, elementID)
194{	
195	new Ajax.Updater("messagePanel_" + elementID, "/store/" + accountID + "/giftcard/balance",
196	{
197		parameters: { cardnumber: $F('giftCardNumber_' + elementID)}
198	});
199}
200
201function updateButtonStatus(inButtonName, inPageCartID)
202{
203	var checkboxes = $$('.cartitemcheckbox');
204	var shouldEnable = false;
205	
206	for(var i = 0; i < checkboxes.length; i++)
207	{
208		if(checkboxes[i].checked == true)
209		{
210			shouldEnable = true;
211			break;
212		}
213	}
214
215	$(inButtonName + inPageCartID).disabled = !shouldEnable;
216}
217
218//form element specific items
219
220function paymentMethodDetails(input) {
221	var tbody = input.up(2);
222
223	if (tbody.hasAttribute("activedetails")) {
224		$(tbody.getAttribute("activedetails")).hide();
225	}
226
227	if (input.hasAttribute("details")) {
228		var details = $(input.getAttribute("details"));
229
230		details.show();
231
232		tbody.setAttribute("activedetails", details.id);
233	}
234}
235
236function paymentMethodDetailsPopup(input) {
237	togglePopupItemDetails(input);
238}
239
240function togglePopupItemDetails(input) {
241	if (!input || !$(input))
242		return;
243
244	if (input.hasAttribute("activedetails")) {
245		$(input.getAttribute("activedetails")).hide();
246	}
247
248	var selected = input.options[input.selectedIndex];
249
250	if (selected.hasAttribute("details")) {
251		var details = $(selected.getAttribute("details"));
252
253		details.show();
254
255		input.setAttribute("activedetails", details.id);
256	}
257}

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.