function verifyModify() {
	var oform;
	oform=document.getElementById('frmModify');
	
	if (!oform.conditions.checked) {
		alert('You must accept the conditions to register');
		return false;
	}
	if (IsEmpty(oform.name)) { return false; }
	if (IsEmpty(oform.login)) { return false; }
	if (IsEmpty(oform.pass)) { return false; }
	if ( oform.codigo.value=='' ) {
		alert('You must inform the Security Code.');
		oform.codigo.focus();
		return false;
	}
	
	if ( (oform.professional_email.value=='') && (oform.private_email.value=='')) {
		alert('You need to inform an email address.');
		oform.professional_email.focus();
		return false;
	}
	
	if ( (oform.country.selectedIndex<0) ) {
		alert('You need to inform your country!');
		oform.country.focus();
		return false;
	}
	return true;
}

function IsEmpty(pField) {
	if (pField.value=='') {
		alert('Must inform a value!');
		pField.focus();
		return true;
	}
	return false;
} 

function checkMemberPhoto() {
	var vFile, vExt, bOk;
	var ofrm;
	
	ofrm=document.forms['modifyfoto'];
	if (!ofrm){ return false; }

	bOk=false;
	vFile=ofrm.imgfile.value;
	vFile=vFile.split('.');
	if (vFile.length > 0) {
		vExt=vFile[vFile.length-1];
		if (vExt.toLowerCase()=='jpg' || vExt.toLowerCase()=='jpeg') {
			bOk=true;
		}
	}
	if (!bOk) {
		alert('Image must be a jpg!');
		return false;
	}
	
	return true;
}
