PageSourceSearch

https://www.bonaberi.com/javascript/common.js

js bonaberi.com collected 2026-10-02 11:46:17 UTC 2,118 bytes, 100 lines download raw bytes

1/**
2 * DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
3 */
4
5function echeck(str) {
6
7		var at="@"
8		var dot="."
9		var lat=str.indexOf(at)
10		var lstr=str.length
11		var ldot=str.indexOf(dot)
12		if (str.indexOf(at)==-1){		   
13		   return false
14		}
15
16		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
17
18		   return false
19		}
20
21		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
22		    return false
23		}
24
25		 if (str.indexOf(at,(lat+1))!=-1){
26		    return false
27		 }
28
29		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
30		    return false
31		 }
32
33		 if (str.indexOf(dot,(lat+2))==-1){
34		    return false
35		 }
36		
37		 if (str.indexOf(" ")!=-1){
38		    return false
39		 }
40
41 		 return true					
42	}
43	
44function isChecked(form, name){
45		var elements = form.elements;
46		for (i = 0; i < elements.length; i++){
47				var element = elements[i];
48				if ((element.name == name) && (element.checked))
49					return true;
50		}
51		return false;
52}
53
54function initAJAX(){
55	try{// Firefox, Opera 8.0+, Safari
56    	return new XMLHttpRequest();
57    }
58  catch (e){
59    try{// Internet Explorer
60      return new ActiveXObject("Msxml2.XMLHTTP");
61    }
62    catch (e){
63      try{
64        return new ActiveXObject("Microsoft.XMLHTTP");
65      }
66      catch (e){
67        alert("Your browser does not support AJAX!");
68        return false;
69      }
70     }
71    }
72  }
73  
74
75
76function newsletter(){
77	if (!echeck(document.gform.nemail.value)){
78		alert("Veuillez saisir un e-mail valide");
79		document.gform.nemail.focus();
80		return;
81	}
82	
83	document.gform.action = "newsletter.php";
84	document.gform.method = "get";
85	document.gform.submit();
86}
87
88	function search(){
89		document.gform.action = "search.php";
90		document.gform.method = "get";
91		document.gform.submit();
92	}
93	
94	function gsearch(){
95		document.searchform.action = "http://www.google.fr/custom";
96		document.searchform.method = "get";
97		document.searchform.target = '_top';
98		document.searchform.submit();
99	}
100

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.