function CheckValidity_inregistrare() {	
// alert();
	 if ((document.inregistrare.form_email.value.indexOf('@yahoo.') <=0))
				{
					alert('Se accepta numai email-uri de yahoo');
					document.inregistrare.form_email.focus();			
					return false;
				}

	if(document.inregistrare.form_sex[0].checked==false && document.inregistrare.form_sex[1].checked==false)
	{
		alert('Completati sexul');
//		document.inregistrare.form_sex.focus();	
		return false;
	 }	


	if(document.inregistrare.form_nume.value=='')
	{
		alert('Completati numele');
		document.inregistrare.form_nume.focus();			
		return false;
	 }	

if(document.inregistrare.form_prenume.value=='')
	{
		alert('Completati prenumele');
		document.inregistrare.form_prenume.focus();			
		return false;
	 }	

	if(document.inregistrare.form_nickname.value=='')
	{
		alert('Trebuie sa alegeti un nickname');
		document.inregistrare.form_nickname.focus();			
		return false;
	 }	

	if(document.inregistrare.form_email.value=='')
	{
		alert('Completati email-ul');
		document.inregistrare.form_email.focus();			
		return false;
	 }	
	 


	if(document.inregistrare.form_parola.value=='')
	{
		alert('Alegeti o parola');
		document.inregistrare.form_parola.focus();			
		return false;
	 }	
	if(document.inregistrare.form_parola.value!=document.inregistrare.formx_parola.value)
	{
		alert('Completati ambele parole');
		document.inregistrare.formx_parola.focus();			
		return false;
	 }	

 return true;
}		//End of JS Validation Function

function update_mail(care) {
	var y=care.split("@");
	var x=document.getElementById("form_ymsg");
	x.value = y[0];
}