function linkSelect(param){
	if (param.indexOf('.pdf')>-1) window.open("../pdf/magazine/" + param,"_blank");
	}

// check multi checkboxes based on the name passed in.
function CheckMultiple(name) 
{
	theFrm = document.frmIscriviti;
	for (var i=0; i < theFrm.length; i++) 
	alert(i);
	{
		fldObj = theFrm.elements[i];
		var fieldnamecheck=fldObj.name.indexOf(name);
		if (fieldnamecheck != -1) {
			if (fldObj.checked) {
				return true;
			}
		}
	}
	return false;
}


function CheckIscrizione() { 
	theFrm = document.frmIscriviti;
	
	hasNome = theFrm.elements["Fields[1]"].value;
	hasCogonome = theFrm.elements["Fields[5]"].value;
	hasDot = theFrm.Email.value.indexOf(".");
	hasAt = theFrm.Email.value.indexOf("@");
	if (!hasNome) {
		alert ("Il campo Nome \u00E8 obbligatorio.");
		return false;
	}
	if (!hasCogonome) {
		alert ("Il campo Cognome \u00E8 obbligatorio.");
		return false;
	}	
	if (hasDot == -1 || hasAt == -1) {
		alert("L'indirizzo email non \u00E8 valido.");
		return false;
	}
	return true;
}
function CheckCancellaForm() {
	theFrm = document.frmCancella; 
	hasDot = theFrm.Email.value.indexOf(".");
	hasAt = theFrm.Email.value.indexOf("@");
	if (hasDot == -1 || hasAt == -1) {
		alert("L'indirizzo email non \u00E8 valido.");
		theFrm.email.focus();
		theFrm.email.select();
		return false;
	}
	return true;
}

