				// check multi checkboxes based on the name passed in.
				function CheckMultiple(name) 
				{
					theFrm = document.frmSS;
					for (var i=0; i < theFrm.length; i++) 
					{
						fldObj = theFrm.elements[i];
						var fieldnamecheck=fldObj.name.indexOf(name);
						if (fieldnamecheck != -1) {
							if (fldObj.checked) {
								return true;
							}
						}
					}
					return false;
				}


				function CheckSS()
				{
					theFrm = document.frmSS;

					hasDot = theFrm.Email.value.indexOf(".");
					hasAt = theFrm.Email.value.indexOf("@");
					
					if (hasDot == -1 || hasAt == -1)
					{
						alert("Please enter a valid email address.");
						theFrm.Email.focus();
						theFrm.Email.select();
						return false;
					}

					
									valcheck = document.getElementById("Fields[7]");
									if (valcheck.value == "") {
										alert("Please enter a value for the 'Nome' field.");
										valcheck.focus();
										valcheck.select();
										return false;
									} else {
										var minsize_7 = 0;
										var maxsize_7 = 100;
										var fieldlength = 0;
										fieldlength = valcheck.value.length;
										if (fieldlength < minsize_7) {
											alert("Inserisci un valore valido per 'Nome' lungo almeno " + minsize_7 + " caratteri");
											valcheck.focus();
											return false;
										}
										if (fieldlength > maxsize_7) {
											alert("Inserisci un valore valido per 'Nome' non più lungo di " + maxsize_7 + " caratteri");
											valcheck.focus();
											return false;
										}
									}
								
									valcheck = document.getElementById("Fields[6]");
									if (valcheck.value == "") {
										alert("Please enter a value for the 'Cognome' field.");
										valcheck.focus();
										valcheck.select();
										return false;
									} else {
										var minsize_6 = 0;
										var maxsize_6 = 100;
										var fieldlength = 0;
										fieldlength = valcheck.value.length;
										if (fieldlength < minsize_6) {
											alert("Inserisci un valore valido per 'Cognome' lungo almeno " + minsize_6 + " caratteri");
											valcheck.focus();
											return false;
										}
										if (fieldlength > maxsize_6) {
											alert("Inserisci un valore valido per 'Cognome' non più lungo di " + maxsize_6 + " caratteri");
											valcheck.focus();
											return false;
										}
									}
								
									multicheck = CheckMultiple("Fields[4]");
									if (!multicheck) {
										alert("Please choose one of the items for the 'A quali attività è interessato' field.");
										return false;
									}
								
									multicheck = CheckMultiple("Fields[5]");
									if (!multicheck) {
										alert("Please choose one of the items for the 'In che area geografica risiede' field.");
										return false;
									}
								
					return true;
				}
