PageSourceSearch

https://www.nic.ae/javascript/javascript.js

js nic.ae collected 2026-10-02 12:00:06 UTC 38,642 bytes, 691 lines download raw bytes

1var SimpleRequest = function(targetElementId, url, method, parameters) {
2	var targetElement = $(targetElementId);
3	if (targetElement == null) {
4		throw 'Target element is null!';
5	}
6	if (url == null) {
7	    throw 'URL has to be provided';
8	}
9	if (method == null) {
10	    method = 'get';
11	} else if (method != 'get' && method != 'post') {
12	    throw 'Method should be get or post'; 
13	}
14	var myAjax = new Ajax.Updater(
15	    { 
16	    	success: targetElement 
17	    }, 
18	    	url, 
19	    { 
20	        method: method,
21	        parameters: parameters, 
22	        onFailure: errFunc,
23	        evalScripts: true
24	    });
25};
26
27var errFunc = function(t) {
28   	alert('Error ' + t.status + ' -- ' + t.statusText);
29}
30
31function Check(chk,frm)
32{
33		if(document.cartForm.Check_ctr.checked==true)
34		{
35			if (!chk.length)
36				chk.checked = true;
37			for (i = 0; i < chk.length; i++)
38			{
39				chk[i].checked = true;
40			}
41		} else {
42			if (!chk.length)
43				chk.checked = false;
44			for (i = 0; i < chk.length; i++)
45			{
46				chk[i].checked = false;
47			}
48		}
49}
50
51function getSelectedIndex(dropdown) {
52	var select = $(dropdown);
53	
54	return select.selectedIndex;
55}
56
57function updateAmount(transactionNumber, extension) {
58	var selectedIndex = $('years' + transactionNumber).selectedIndex;
59	var priceToUpdate = $('amount' + transactionNumber);
60	var priceList = document.getElementsByName('_price' + extension + transactionNumber);
61	
62	priceToUpdate.value = formatCurrency(priceList[selectedIndex].value);
63	
64	// update services (if any)
65	var services = document.getElementsByName('serviceyears' + transactionNumber);
66	if (services.length > 0)
67		updateServicesYearsAndAmount(transactionNumber, selectedIndex, services);
68	
69	updateTotal(services.length);
70}
71
72function updateAmount2(transactionNumber, extension, transType) {
73	var selectedIndex = $('years' + transactionNumber).selectedIndex;
74	var priceToUpdate = $('amount' + transactionNumber);
75	var priceList = document.getElementsByName('_price' + extension + transType + transactionNumber);
76	
77	priceToUpdate.value = formatCurrency(priceList[selectedIndex].value);
78	
79	// update services (if any)
80	var services = document.getElementsByName('serviceyears' + transactionNumber);	
81	if (services.length > 0)
82		updateServicesYearsAndAmount2(transactionNumber, selectedIndex, services, extension, transType);
83			
84	updateTotal(services.length);
85}
86
87function updateServicesYearsAndAmount(transactionNumber, selectedIndex, services) {
88	var priceToUpdate;
89	var unitPrice;
90	
91	for (i = 0; i < services.length; i++) {
92		// divide current amount by current selected years to get unit amount
93		priceToUpdate = $('serviceamount' + transactionNumber + i);
94		unitPrice = priceToUpdate.value / services[i].options[services[i].selectedIndex].value;
95		
96		// update year
97		services[i].selectedIndex = selectedIndex;
98			
99		// isNaN check for FREE(zero) value
100		if (!isNaN(priceToUpdate.value)) {
101			// update price
102			priceToUpdate.value = formatCurrency(unitPrice * services[i].options[services[i].selectedIndex].value);
103		}
104	}
105}
106
107function updateServicesYearsAndAmount2(transactionNumber, selectedIndex, services, extension, transType) {
108	var priceToUpdate;
109	var unitPrice;
110	var serviceName;
111	
112	for (i = 0; i < services.length; i++) {
113		// divide current amount by current selected years to get unit amount
114		priceToUpdate = $('serviceamount' + transactionNumber + i);
115		serviceName = $('servicename' + transactionNumber + i).value;
116		unitPrice = priceToUpdate.value / services[i].options[services[i].selectedIndex].value;
117		
118		// update year
119		services[i].selectedIndex = selectedIndex;
120			
121		// isNaN check for FREE(zero) value
122		if (!isNaN(priceToUpdate.value)) {
123			if(serviceName.toLowerCase() == 'whois privacy') {
124				var servicePriceList = document.getElementsByName('_whoisprice' + extension + transType + transactionNumber);
125				priceToUpdate.value = formatCurrency(servicePriceList[selectedIndex].value);
126			} else {
127				// update price
128				priceToUpdate.value = formatCurrency(unitPrice * services[i].options[services[i].selectedIndex].value);
129			}
130		}
131	}
132}
133
134function updateTotal(services) {
135	var count = 0;
136	var serviceCount = 0;
137	var total = 0;
138	var service;
139	
140	while ($('amount' + count)) {
141		total += Number($('amount' + count).value);		
142		var services = document.getElementsByName('serviceyears' + count);	
143			
144		if (services.length > 0) {			
145			// services for each transaction (one domain)	
146			
147			while (service = $('serviceamount' + count + serviceCount)) {					
148				// isNaN check for FREE(zero) value
149				if (!isNaN(service.value))
150					total += Number($('serviceamount' + count + serviceCount).value);
151					
152				serviceCount++;
153			}
154			serviceCount = 0;
155		}
156		count++;
157	}
158	$('total').value = formatCurrency(total);
159}
160
161function formatCurrency(amount) {
162	var i = parseFloat(amount);
163	if(isNaN(i)) 
164		i = 0.00; 
165	
166	var minus = '';
167	if(i < 0)
168		minus = '-'; 
169	
170	i = Math.abs(i);
171	i = parseInt((i + .005) * 100);
172	i = i / 100;
173	s = new String(i);
174	
175	if(s.indexOf('.') < 0)
176		s += '.00'; 
177	
178	if(s.indexOf('.') == (s.length - 2))
179		s += '0'; 
180
181	s = minus + s;
182	return s;
183}
184
185function hideDiv(div) {
186	if ($(div)) 
187		$(div).style.visibility = 'hidden';
188}
189
190function showDiv(div) {
191	if ($(div)) 
192		$(div).style.visibility = 'visible';
193}
194
195function selectRadioButton(radio, value) {
196	var radioObj = document.getElementsByName(radio);
197	radioObj[value].checked = true;
198}
199
200function postAjaxFormRequest(elemID,formID,url,lang)
201{
202	var newurl=encodeURI(url);
203	
204	if (lang.toLowerCase() == "cn")
205		new Element.replace(elemID,"<div id=\'message\' class=\'messageDiv\'><img src=\"/images/searching.gif\" height=16 width=16>Saving CN....</div>");
206	else if (lang.toLowerCase() == "zho")
207		new Element.replace(elemID,"<div id=\'message\' class=\'messageDiv\'><img src=\"/images/searching.gif\" height=16 width=16>Saving ZHO....</div>");
208	else	
209		new Element.replace(elemID,"<div id=\'message\' class=\'messageDiv\'><img src=\"/images/searching.gif\" height=16 width=16>Saving....</div>");
210	
211	var myAjax = new Ajax.Updater(
212    { 
213    	success: elemID
214    }, 
215       newurl, 
216    { 
217        method: 'post',
218        postBody : Form.serialize(formID),
219		on404 : function(t) { alert ('Error 404 Page not found ' + t.statusText);},
220		on500 : function(t) { alert ('Error 500 Server error ' + t.statusText);},
221        evalScripts: true
222    });
223}
224
225function postAjaxContactFormRequest(elemID,formID,url,lang,displayDom)
226{
227	var newurl=encodeURI(url);
228    var specialChars = ["[", "\\", "/", "]", "<", ">", "%", "*"];
229    var checkPhoneFax = /^\+[0-9]{1,3}\.[0-9]{1,14}$/;
230    var checkEmptyField= new RegExp("^(\\s)*$");
231    var checkEmail = "!#$%&'*~/=?^`{}|(),:;<>[\\\"]";
232	var contactType = "";
233    var companyName = "";
234    var firstName = "";
235    var lastName = "";
236    var address1 = "";
237    var city = "";
238    var labelState = "";
239    var state = "";
240    var zip = "";
241    var labelFax = "";
242    var fax = "";
243    var phone = "";
244    var email = "";
245	var failureMsg = "";
246	var elementHTML = "<div id=\'message\' class=\'messageDiv\' >";
247	
248	if (lang.toLowerCase() == "cn")
249		new Element.replace(elemID,"<div id=\'message\' class=\'messageDiv\'><img src=\"/images/searching.gif\" height=16 width=16>Saving CN....</div>");
250	else if (lang.toLowerCase() == "zho")
251		new Element.replace(elemID,"<div id=\'message\' class=\'messageDiv\'><img src=\"/images/searching.gif\" height=16 width=16>Saving ZHO....</div>");
252	else	
253		new Element.replace(elemID,"<div id=\'message\' class=\'messageDiv\'><img src=\"/images/searching.gif\" height=16 width=16>Saving....</div>");
254	
255	for(var i = 0; i < 4;i++){
256		companyName = document.forms[formID].elements["Company"][i].value;
257		firstName = document.forms[formID].elements["Fname"][i].value;
258		lastName = document.forms[formID].elements["Lname"][i].value;
259		address1 = document.forms[formID].elements["Addr1"][i].value;
260		city = document.forms[formID].elements["City"][i].value;
261		zip = document.forms[formID].elements["Zip"][i].value;
262		labelState = document.getElementById(formID).elements["State"][i].parentElement.outerText;
263		state = document.forms[formID].elements["State"][i].value;
264        if (document.forms[formID].elements["Phone2"][i].value!=null && document.forms[formID].elements["Phone2"][i].value!=(""))
265            phone = "+".concat(document.forms[formID].elements["Phone"][i].value).concat(".").concat(document.forms[formID].elements["Phone2"][i].value);
266        else
267            phone = document.forms[formID].elements["Phone"][i].value;
268        	
269        labelFax = document.getElementById(formID).elements["Fax"][i].parentElement.outerText;
270        if (document.forms[formID].elements["Fax"][i].value!=null && document.forms[formID].elements["Fax2"][i].value!=(""))
271            fax = "+".concat(document.forms[formID].elements["Fax"][i].value).concat(".").concat(document.forms[formID].elements["Fax2"][i].value);
272        else
273            fax = document.forms[formID].elements["Fax"][i].value;
274		email = document.forms[formID].elements["Email"][i].value;
275
276		if (i == 0) {
277			contactType = "Registrant";
278		} else if (i == 1) {
279			contactType = "Administrative";
280		} else if (i == 2) {
281			contactType = "Technical";
282		} else if (i == 3) {
283			contactType = "Billing";
284		}
285
286		if (companyName == null || checkEmptyField.test(companyName)) {
287			failureMsg = contactType + " \u201COrganization Name\u201D is a mandatory field.";
288			elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
289							+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
290							+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
291							+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
292							+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
293							+	"</svg>"
294							+ "</span>"
295							+ failureMsg 
296							+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
297							+ "</div>";
298	    	return new Element.replace(elemID,elementHTML);
299		} else if (firstName == null || checkEmptyField.test(firstName)) {
300			failureMsg = contactType + " \u201CFirst Name\u201D is a mandatory field.";
301			elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
302							+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
303							+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
304							+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
305							+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
306							+	"</svg>"
307							+ "</span>"
308							+ failureMsg 
309							+ "</div>";
310			return new Element.replace(elemID,elementHTML);
311		} else if (lastName == null || checkEmptyField.test(lastName)) {
312			failureMsg = contactType + " \u201CLast Name\u201D is a mandatory field.";
313			elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
314							+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
315							+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
316							+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
317							+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
318							+	"</svg>"
319							+ "</span>"
320							+ failureMsg 
321							+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
322							+ "</div>";
323			return new Element.replace(elemID,elementHTML);
324		} else if (address1 == null || checkEmptyField.test(address1)) {
325			failureMsg = contactType + " \u201CAddress 1\u201D is a mandatory field.";
326			elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
327							+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
328							+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
329							+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
330							+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
331							+	"</svg>"
332							+ "</span>"
333							+ failureMsg 
334							+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
335							+ "</div>";
336			return new Element.replace(elemID,elementHTML);
337		} else if (city == null || checkEmptyField.test(city)) {
338			failureMsg = contactType + " \u201CCity\u201D is a mandatory field.";
339			elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
340							+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
341							+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
342							+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
343							+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
344							+	"</svg>"
345							+ "</span>"
346							+ failureMsg 
347							+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
348							+ "</div>";
349			return new Element.replace(elemID,elementHTML);
350		} else if (zip == null || checkEmptyField.test(zip)) {
351			failureMsg = contactType + " \u201CZip\u201D is a mandatory field.";
352			elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
353							+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
354							+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
355							+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
356							+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
357							+	"</svg>"
358							+ "</span>"
359							+ failureMsg 
360							+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
361							+ "</div>";
362			return new Element.replace(elemID,elementHTML);
363		} else if (typeof labelState !== 'undefined') {
364			if (labelState.indexOf("*") != -1) {
365				if (state == null || checkEmptyField.test(state)) {
366					failureMsg = contactType + " \u201CState\u201D is a mandatory field.";
367					elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
368									+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
369									+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
370									+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
371									+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
372									+	"</svg>"
373									+ "</span>"
374									+ failureMsg 
375									+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
376									+ "</div>";
377					return new Element.replace(elemID,elementHTML);
378				}
379			}
380		} else if (phone == null || checkEmptyField.test(phone)) {
381			failureMsg = contactType + " \u201CPhone\u201D is a mandatory field.";
382			elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
383							+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
384							+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
385							+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
386							+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
387							+	"</svg>"
388							+ "</span>"
389							+ failureMsg 
390							+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
391							+ "</div>";
392			return new Element.replace(elemID,elementHTML);
393		} else if (typeof labelFax !== 'undefined') {
394			if (labelFax.indexOf("*") != -1) {
395				if (fax == null || checkEmptyField.test(fax)) {
396					failureMsg = contactType + " \u201CFax\u201D is a mandatory field.";
397					elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
398									+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
399									+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
400									+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
401									+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708
401L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
402									+	"</svg>"
403									+ "</span>"
404									+ failureMsg 
405									+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
406									+ "</div>";
407					return new Element.replace(elemID,elementHTML);
408				}
409			}
410		} else if (email == null || checkEmptyField.test(email)) {
411			failureMsg = contactType + " \u201CEmail\u201D is a mandatory field.";
412			elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
413							+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
414							+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
415							+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
416							+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
417							+	"</svg>"
418							+ "</span>"
419							+ failureMsg 
420							+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
421							+ "</div>";
422			return new Element.replace(elemID,elementHTML);
423		}
424		
425		for (var s = 0; s < specialChars.length; s++) {
426			if (companyName.indexOf(specialChars[s]) != -1) {
427				failureMsg = "Invalid " + contactType + " \u201COrganization Name\u201D. Special character \u201C"+ specialChars[s] +"\u201D is not allowed";
428				elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
429								+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
430								+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
431								+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
432								+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
433								+	"</svg>"
434								+ "</span>"
435								+ failureMsg 
436								+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
437								+ "</div>";
438				return new Element.replace(elemID,elementHTML);
439			}
440			else if (firstName.indexOf(specialChars[s]) != -1) {
441				failureMsg = "Invalid " + contactType + " \u201CFirst Name\u201D. Special character \u201C"+ specialChars[s] +"\u201D is not allowed";
442				elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
443								+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
444								+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
445								+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
446								+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
447								+	"</svg>"
448								+ "</span>"
449								+ failureMsg 
450								+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
451								+ "</div>";
452				return new Element.replace(elemID,elementHTML);
453			}
454			else if (lastName.indexOf(specialChars[s]) != -1) {
455				failureMsg = "Invalid " + contactType + " \u201CLast Name\u201D. Special character \u201C"+ specialChars[s] +"\u201D is not allowed";
456				elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
457								+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
458								+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
459								+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
460								+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
461								+	"</svg>"
462								+ "</span>"
463								+ failureMsg 
464								+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
465								+ "</div>";
466				return new Element.replace(elemID,elementHTML);
467			}
468			else if (address1.indexOf(specialChars[s]) != -1) {
469				failureMsg = "Invalid " + contactType + " \u201CAddress 1\u201D. Special character \u201C"+ specialChars[s] +"\u201D is not allowed";
470				elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
471								+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
472								+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
473								+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
474								+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
475								+	"</svg>"
476								+ "</span>"
477								+ failureMsg 
478								+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
479								+ "</div>";
480				return new Element.replace(elemID,elementHTML);
481			}
482			else if (city.indexOf(specialChars[s]) != -1) {
483				failureMsg = "Invalid " + contactType + " \u201CCity\u201D. Special character \u201C"+ specialChars[s] +"\u201D is not allowed";
484				elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
485								+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
486								+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
487								+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
488								+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
489								+	"</svg>"
490								+ "</span>"
491								+ failureMsg 
492								+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
493								+ "</div>";
494				return new Element.replace(elemID,elementHTML);
495			}
496			else if (zip.indexOf(specialChars[s]) != -1) {
497				failureMsg = "Invalid " + contactType + " \u201CZip\u201D. Special character \u201C"+ specialChars[s] +"\u201D is not allowed";
498				elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
499								+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
500								+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
501								+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
502								+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708
502L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
503								+	"</svg>"
504								+ "</span>"
505								+ failureMsg 
506								+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
507								+ "</div>";
508				return new Element.replace(elemID,elementHTML);
509			}
510			else if (state.indexOf(specialChars[s]) != -1) {
511				failureMsg = "Invalid " + contactType + " \u201CState\u201D. Special character \u201C"+ specialChars[s] +"\u201D is not allowed";
512				elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
513								+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
514								+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
515								+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
516								+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
517								+	"</svg>"
518								+ "</span>"
519								+ failureMsg 
520								+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
521								+ "</div>";
522				return new Element.replace(elemID,elementHTML);
523			}
524			else if (!checkPhoneFax.test(phone)) {
525				failureMsg = "Invalid " + contactType + " \u201CPhone\u201D. Alphabets and special characters are not allowed";
526				elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
527								+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
528								+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
529								+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
530								+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
531								+	"</svg>"
532								+ "</span>"
533								+ failureMsg 
534								+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
535								+ "</div>";
536				return new Element.replace(elemID,elementHTML);
537			}
538			else if (!checkPhoneFax.test(fax)) {
539				if (!checkEmptyField.test(fax)) {
540					failureMsg = "Invalid " + contactType + " \u201CFax\u201D. Alphabets and special characters are not allowed";
541					elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
542									+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
543									+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
544									+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
545									+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
546									+	"</svg>"
547									+ "</span>"
548									+ failureMsg 
549									+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
550									+ "</div>";
551					return new Element.replace(elemID,elementHTML);
552				}
553			}
554		}
555		for (var s = 0; s < checkEmail.length; s++) {
556			if (email.indexOf(checkEmail[s]) != -1) {
557				failureMsg = "Invalid " + contactType + " \u201CEmail\u201D. Special character \u201C"+ checkEmail[s] +"\u201D is not allowed";
558				elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
559								+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
560								+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
561								+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
562								+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
563								+	"</svg>"
564								+ "</span>"
565								+ failureMsg 
566								+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
567								+ "</div>";
568				return new Element.replace(elemID,elementHTML);
569			}
570		}
571	}
572	var err = '';
573	var myAjax = new Ajax.Request(
574       newurl, 
575    { 
576        method: 'post',
577        postBody : Form.serialize(formID),
578		on404 : function(t) { err = 'true';},
579		on500 : function(t) { alert ('Error 500 Server error ' + t.statusText);},
580        evalScripts: true,
581        onComplete: function(response){
582        	 if(err !== 'true') {
583
584	        	var responseMessage = response.responseText;
585	        	var lines = responseMessage.split('<br>');
586	        	var successMsg = '';
587	        	var failureMsg = '';
588	        	var currentMsg = '';
589	      
590	        	for (var i = 0; i < lines.length;i++){
591	        		console.log("S " + currentMsg);
592	        		// has domain name
593	        		if (lines[i].indexOf(":") != -1){
594	        			// append
595	        			if (currentMsg !== ''){
596	        				if (currentMsg.indexOf("The contact information has been updated") != -1){
597	        					successMsg = successMsg + currentMsg.replace("The contact information has been updated","Your request has been completed successfully.") + '<br>';
598	        				} else if (currentMsg.indexOf("Contact saved!") != -1) {
599	        					successMsg = successMsg + currentMsg.replace("Contact saved!","Your request has been completed successfully.") + '<br>';
600	        				} else {
601	        					failureMsg = failureMsg + currentMsg + '<br>';
602	        				}
603	        				currentMsg = '';
604	        			} 
605	        			if (displayDom == false){
606	        				currentMsg = lines[i].replace(/^\s+|\s+$/g,'')
607	        				currentMsg = currentMsg.substring(currentMsg.indexOf(":")+1) + ' ';
608	        			} else {
609	        				currentMsg = lines[i].replace(/^\s+|\s+$/g,'');
610	        			}
611	        		} 
612	        		// message is related to previous domain name
613	        		else {
614	        			currentMsg = currentMsg + ' ' + lines[i].replace(/^\s+|\s+$/g,'');
615	        		}
616	        	}
617	        	if (currentMsg !== ''){
618					if (currentMsg.indexOf("The contact information has been updated") != -1){
619						successMsg = successMsg + currentMsg.replace("The contact information has been updated","Your request has been completed successfully.");
620					} else if (currentMsg.indexOf("Contact saved!") != -1) {
621						successMsg = successMsg + currentMsg.replace("Contact saved!","Your request has been completed successfully.") + '<br>';
622					} else {
623						failureMsg = failureMsg + currentMsg;
624					}
625					currentMsg = '';
626				} 
627	        
628	        	var elementHTML = "<div id=\'message\' class=\'messageDiv\' >";
629	        	if (successMsg !== ''){
630	        		elementHTML = elementHTML + "<div class=\'alert alert-success alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>" 
631	        						+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
632									+ "<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-check-circle\' viewBox=\'0 0 16 16\'>"
633									+ "<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
634									+ "<path d=\'M10.97 4.97a.235.235 0 0 0-.02.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05z\'/>"
635									+ "</svg>"
636									+ "</span>"
637									+ successMsg
638									+ "</div>";
639	        	}
640	        	if (failureMsg !== ''){
641	        		elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
642									+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
643									+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
644									+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
645									+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
646									+	"</svg>"
647									+ "</span>"
648									+ failureMsg 
649									+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
650									+ "</div>";
651	        	}
652	        	elementHTML = elementHTML + "</div>"
653	        	
654	        	new Element.replace(elemID,elementHTML);
655	        	
656	        } else {
657                var elementHTML = "";
658                elementHTML = elementHTML + "<div class=\'alert alert-error alert-dismissible fade show\' role=\'alert\' id=\'emptyFieldAlert\' style=\'width:100%; display: flex; text-align: left;\'>"
659								+ "<span style=\'padding-top: 3px; margin-right: 10px;\'>"
660								+	"<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' fill=\'currentColor\' class=\'bi bi-x-circle\' viewBox=\'0 0 16 16\'>"
661								+	"<path d=\'M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\'/>"
662								+	 "<path d=\'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\'/>"
663								+	"</svg>"
664								+ "</span>"
665								+ "Session timeout. Please refresh the page."
666								+ "<button type=\'button\' class=\'btn-close\' data-bs-dismiss=\'alert\' aria-label=\'Close\'></button>"
667								+ "</div>";
668                new Element.replace(elemID,elementHTML);
669        }
670        } 
671    });
672}
673
674function setEditValue(itemId) {
675	$('edit').value = itemId;
676}
677
678function changeFormAction(form, action) {
679	form.action = action;
680}
681
682function submit_bulkaction() {
683	if(typeof document.domainListingForm == "undefined"){
684		var r = confirm("For Bulk Actions, please select minimum of 2 domain names and maximum of 20 domain names.");
685		   if(r == true) {
686			   window.location.replace("/wam/index.html");
687		   }
688		   else {
689		   }
690	}
691}

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.