function fnValidate()
	{

	var name=document.univercity_cash_form.name.value;
	if(name=="")
	{
		alert ("Enter Student Name");
		name='';
		document.univercity_cash_form.name.focus();
		return false;
	}

	var emal=document.univercity_cash_form.student_email.value;
	if(emal != "")
	{
		var reg = /^[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+(\.[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+)*@(([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){1,63}\.)+([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){2,63}$/;
		if(!reg.test( emal ))
		{
			alert("Please enter valid Email \n (must be user@yourschool\".edu\")");
			emal='';
			document.univercity_cash_form.student_email.focus();	
			return false;
		}
		else
		{

			//var my_car="Ferrari";
			var length=emal.length;
			var char1=emal.charAt(length-3);
			var char2=emal.charAt(length-2);
			var char3=emal.charAt(length-1);
			var last3char=char1+char2+char3;
			if(last3char!="edu")
			{
				alert("Please enter valid Email \n (must be user@yourschool\".edu\")");
				emal='';
				document.univercity_cash_form.student_email.focus();	
				return false;
			}
		}
			
	}
	else
	{
 		alert("Please enter valid Email");
		emal='';
		document.univercity_cash_form.student_email.focus();	
		return false;
	}	
	//Radio button validations

	// set var radio_choice to false
	/*var radio_choice = false;

	// Loop from zero to the one minus the number of radio button selections
	for (counter = 0; counter < univercity_cash_form.type.length; counter++)
	{
	// If a radio button has been selected it will return true
	// (If not it will return false)
	if (univercity_cash_form.type[counter].checked)
	radio_choice = true; 
	}

	if (!radio_choice)
	{
	// If there were no selections made display an alert box 
	alert("Please select Preferred Method of Payment .")
	return (false);
	}*/
	if((!document.univercity_cash_form.type[0].checked) && (!document.univercity_cash_form.type[1].checked) && (!document.univercity_cash_form.type[2].checked))
	{
		alert("Please select Preferred Method of Payment .")
		return (false);
	}
	//return (true);
	if(document.univercity_cash_form.type[0].checked)
	{
		var payment_id=document.univercity_cash_form.payment_id.value;
		if(payment_id != "")
		{
			var reg = /^[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+(\.[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+)*@(([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){1,63}\.)+([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){2,63}$/;
			if(!reg.test( payment_id ))
			{
				alert("Please enter valid Paypal address ");
				payment_id='';
				document.univercity_cash_form.payment_id.focus();	
				return false;
			}
			
				
		}
		else
		{
			alert("Please enter valid Paypal address");
			payment_id='';
			document.univercity_cash_form.payment_id.focus();	
			return false;
		}	
	}
	if(document.univercity_cash_form.type[1].checked)
	{
		var payment_id1=document.univercity_cash_form.payment_id1.value;
		if(payment_id1 != "")
		{
			var reg = /^[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+(\.[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+)*@(([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){1,63}\.)+([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){2,63}$/;
			if(!reg.test( payment_id1 ))
			{
				alert("Please enter valid iTunes e-Gift Card address");
				payment_id1='';
				document.univercity_cash_form.payment_id1.focus();	
				return false;
			}
			
				
		}
		else
		{
			alert("Please enter valid iTunes e-Gift Card address");
			payment_id1='';
			document.univercity_cash_form.payment_id1.focus();	
			return false;
		}	
	}

	if(document.univercity_cash_form.type[2].checked)
	{
		var firstname=document.univercity_cash_form.fname.value;
		if(firstname=="")
		{
			alert ("Enter first Name");
			firstname='';
			document.univercity_cash_form.fname.focus();
			return false;
		}
		var lastname=document.univercity_cash_form.lname.value;
		if(lastname=="")
		{
			alert ("Enter Last Name");
			lastname='';
			document.univercity_cash_form.lname.focus();
			return false;
		}
		var address=document.univercity_cash_form.address.value;
		if(address=="")
		{
			alert ("Enter Address");
			address='';
			document.univercity_cash_form.address.focus();
			return false;
		}
		var city=document.univercity_cash_form.city.value;
		if(city=="")
		{
			alert ("Enter City Name");
			city='';
			document.univercity_cash_form.city.focus();
			return false;
		}
		var state=document.univercity_cash_form.state.value;
		if(state=="")
		{
			alert ("Enter State Name");
			state='';
			document.univercity_cash_form.state.focus();
			return false;
		}
		var country=document.univercity_cash_form.country.value;
		if(country=="")
		{
			alert ("Enter Country Name");
			country='';
			document.univercity_cash_form.country.focus();
			return false;
		}
		var zip=document.univercity_cash_form.zip.value;
		if(zip=="")
		{
			alert ("Enter Pin code");
			zip='';
			document.univercity_cash_form.zip.focus();
			return false;
		}
	}

    //Email regular expressions-- to be codded
	

//college validations  
	var college=document.univercity_cash_form.collage.value;
	if(college=="")
	{
		alert ("Enter Univecity/College Name");
		college='';
		document.univercity_cash_form.collage.focus();
		return false;
	}
	

//Select Validations
	//var reffer=document.univercity_cash_form.reffered.value;
	if ( document.univercity_cash_form.reffered.selectedIndex == 0 )
    {
        alert ( "Please select How did you hear about University-Cash?" );
		document.univercity_cash_form.reffered.focus();
        return false;
    }
	if ( document.univercity_cash_form.reffered.selectedIndex == 1 )
    {
		var friend_id=document.univercity_cash_form.friend_id.value;
		if(friend_id=="" )
		{
			alert ("Enter Friend id");
			friend_id='';
			document.univercity_cash_form.friend_id.focus();
			return false;
		}
		
    }
	
//Email regular expressions-- to be codded
	var emal=document.univercity_cash_form.reffer_email1.value;
	if(emal != "")
	{
		var reg = /^[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+(\.[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+)*@(([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){1,63}\.)+([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){2,63}$/;
		if(!reg.test( emal ))
		{
			alert("Please enter valid Referred Email1");
			emal='';
			document.univercity_cash_form.reffer_email1.focus();	
			return false;
		}
		
		
	}
	/*else
	{
 		alert("Please enter valid Referred Email1");
		emal='';
		document.univercity_cash_form.reffer_email1.focus();	
		return false;
	}	*/




//Email regular expressions-- to be codded
	var emal2=document.univercity_cash_form.reffer_email2.value;
	if(emal2 != "")
	{
		var reg = /^[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+(\.[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+)*@(([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){1,63}\.)+([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){2,63}$/;
		if(!reg.test( emal2 ))
		{
			alert("Please enter valid Referred Email2");
			emal2='';
			document.univercity_cash_form.reffer_email2.focus();	
			return false;
		}
			
		
	}
	/*else
	{
 		alert("Please enter valid Referred Email2");
		emal2='';
		document.univercity_cash_form.reffer_email2.focus();	
		return false;
	}	*/



//Email regular expressions-- to be codded
	var emal3=document.univercity_cash_form.reffer_email3.value;
	if(emal3 != "")
	{
		var reg = /^[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+(\.[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+)*@(([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){1,63}\.)+([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){2,63}$/;
		if(!reg.test( emal3 ))
		{
			alert("Please enter valid Referred Email3");
			emal3='';
			document.univercity_cash_form.reffer_email3.focus();	
			return false;
		}
		
	}
	/*else
	{
 		alert("Please enter valid Referred Email3");
		emal3='';
		document.univercity_cash_form.reffer_email3.focus();	
		return false;
	}	*/

//Email regular expressions-- to be codded
	var emal4=document.univercity_cash_form.reffer_email4.value;
	if(emal4 != "")
	{
		var reg = /^[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+(\.[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+)*@(([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){1,63}\.)+([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){2,63}$/;
		if(!reg.test( emal4 ))
		{
			alert("Please enter valid Referred Email4");
			emal4='';
			document.univercity_cash_form.reffer_email4.focus();	
			return false;
		}
		
		
	}
	/*else
	{
 		alert("Please enter valid Referred Email4");
		emal4='';
		document.univercity_cash_form.reffer_email4.focus();	
		return false;
	}	*/



//Email regular expressions-- to be codded
	var emal5=document.univercity_cash_form.reffer_email5.value;
	if(emal5 != "")
	{
		var reg = /^[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+(\.[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+)*@(([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){1,63}\.)+([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9]+)?){2,63}$/;
		if(!reg.test( emal5 ))
		{
			alert("Please enter valid Referred Email5");
			emal5='';
			document.univercity_cash_form.reffer_email5.focus();	
			return false;
		}
		
		
	}
	/*else
	{
 		alert("Please enter valid Referred Email5");
		emal5='';
		document.univercity_cash_form.reffer_email5.focus();	
		return false;
	}	*/

}