//alumni login

function alumnilogin()
{ 
 	if(isBlank(document.form2.username.value))
  	{
   	alert("Please Enter a valid Username !");
   	return false; 
  	}  
  	if(isBlank(document.form2.password.value)) 
  	{
   	alert("Please Enter a valid Password !");
   	return false; 
  	}  
  	//aamain.php in that used fun 
        document.form2.action="aamain.php?page=alumniloginpost";
        document.form2.submit();
} 
//-------------------------------
//edit personal profile
function editalumnipersonaldetail()
{	
	
	var ext = document.form1.MemberPhoto.value;
  if(isBlank(document.form1.FirstName.value))
  {
		alert("Please Enter FirstName");
		return false;
	} 
  if(isBlank(document.form1.LastName.value))
  {
		alert("Please Enter LastName");
		return false; 
	}
	if(isBlank(document.form1.AddressHome.value))
  {
		alert("Please Enter Home-Address");
		return false; 
	}
if(!(ext)==false){
	  if(ext.indexOf(".") != ext.lastIndexOf("."))
	  {
	  	   alert('News Image File Name invalid');
			document.form1.MemberPhoto.focus();
	    	return false; 
	  }
	  ext = ext.substring(ext.length-3,ext.length);
	  ext = ext.toLowerCase();
	  if((ext != 'peg') && (ext !='gif') && (ext != 'jpg') && (ext != 'png'))
	   {
	  	   alert('You selected a .'+ext+ 
	          ' file; please select a .jpeg or .jpg or gif file instead!');
			
		//	alert('You have not selected .jpeg or .jpg or gif file instead!');

			document.form1.MemberPhoto.focus();
	    	return false;
	     }
		}	
	
	
	document.form1.action="alumnimain.php?page=alumineditpersonalpost";
	document.form1.submit();
}
//-------------------------
//edit alumni course
function alumineditcourse()
{

	if(document.form1.branchid.options[form1.branchid.selectedIndex].value==0) 
				{
					alert("Please select valid Course & Branch");
				return false;  					
				} 
	if(document.form1.yearofpassing.options[form1.yearofpassing.selectedIndex].value==0) 
				{
					alert("Please select valid Year");
				return false;  					
				}
	if(document.form1.university.options[form1.university.selectedIndex].value==0) 
				{
					alert("Please select valid University");
				return false;  					
				}
	document.form1.action="alumnimain.php?page=alumineditcoursepost";
	document.form1.submit();
}
//---------------------
//alumni other college details
function alumniaddothercollege()
{
	if(isBlank(document.form1.CourseName.value))
  {
		alert("Please Enter Course Name");
		return false; 
	}
	if(isBlank(document.form1.BranchName.value))
  {
		alert("Please Enter Branch Name");
		return false; 
	}
	if(isBlank(document.form1.UniversityName.value))
  {
		alert("Please Enter University Name");
		return false; 
	}
	if(isBlank(document.form1.Specilization.value))
  {
		alert("Please Enter Specialization");
		return false; 
	}
	if(document.form1.YearOfPassing.options[form1.YearOfPassing.selectedIndex].value==0) 
				{
					alert("Please select valid Year");
				return false;  					
				}	
	document.form1.action="alumnimain.php?page=alumniaddothercollegepost";
	document.form1.submit();
}
//-----------
//edit other clg details
function alumnieditothercollege()
{
	if(isBlank(document.form1.CourseName.value))
  {
		alert("Please Enter Course Name");
		return false; 
	}
	if(isBlank(document.form1.BranchName.value))
  {
		alert("Please Enter Branch Name");
		return false; 
	}
	if(isBlank(document.form1.UniversityName.value))
  {
		alert("Please Enter University Name");
		return false; 
	}
	if(isBlank(document.form1.Specilization.value))
  {
		alert("Please Enter Specialization");
		return false; 
	}
	if(document.form1.YearOfPassing.options[form1.YearOfPassing.selectedIndex].value==0) 
				{
					alert("Please select valid Year");
				return false;  					
				}	
	document.form1.action="alumnimain.php?page=alumnieditothercollegepost";
	document.form1.submit();
}
//-----------------
function alumniaddemployment()
{ 
 if(isBlank(document.addemploymentform.WorkingFor.value))
  {
   alert("Please Enter a valid Organization !");
   return false; 
  }
   if(isBlank(document.addemploymentform.Designation.value))
        {
                alert("Please Enter a valid Designation  !");
                return false;
        }  
   if(document.addemploymentform.WorkedFromDate.value>document.addemploymentform.WorkedToDate.value)
        {
                alert("The  From Date Must be Less Than To Date!");
                return false;
        }
        document.addemploymentform.action="alumnimain.php?page=alumniaddemploymentpost";
        document.addemploymentform.submit();
}
//-----------------------------
function alumnieditemployment()
{ 
 if(isBlank(document.form1.WorkingFor.value))
  {
   alert("Please Enter a valid Organization !");
   return false; 
  }
   if(isBlank(document.form1.Designation.value))
        {
                alert("Please Enter a valid Designation  !");
                return false;
        }  
   if(document.form1.WorkedFromDate.value>document.form1.WorkedToDate.value)
        {
                alert("The  From Date Must be Less Than To Date!");
                return false;
        }
        document.form1.action="alumnimain.php?page=alumnieditemploymentpost";
        document.form1.submit();
}
//---------------------------------------
//add alumni course

function alumniaddmembcourse()
{

	if(document.form1.branchid.options[form1.branchid.selectedIndex].value==0) 
				{
					alert("Please select valid Course & Branch");
				return false;  					
				} 
	if(document.form1.yearofpassing.options[form1.yearofpassing.selectedIndex].value==0) 
				{
					alert("Please select valid Year");
				return false;  					
				}
	if(document.form1.university.options[form1.university.selectedIndex].value==0) 
				{
					alert("Please select valid University");
				return false;  					
				}
	document.form1.action="alumnimain.php?page=aluminaddmembcoursepost";
	document.form1.submit();
}
//------------------
// add achievement 
function alumniaddachievement()
{ 
 	if(isBlank(document.achievement.AchievementTitle.value))
  	{
   	alert("Please Enter a valid Achievement Title !");
   	return false; 
  	}   
        document.achievement.action="alumnimain.php?page=alumniaddachievementpost";
        document.achievement.submit();
}
// edit achievement 
function alumnieditachievement()
{ 
 	if(isBlank(document.form1.AchievementTitle.value))
  	{
   	alert("Please Enter a valid Achievement Title !");
   	return false; 
  	}   
        document.form1.action="alumnimain.php?page=alumnieditachievementpost";
        document.form1.submit();
}
//change pwd
function changepwd()   
{        				 
				if(isBlank(document.f1.Password.value))  
				{ 
					alert("Please enter valid Password"); 
					return false;
				}		
				if(isBlank(document.f1.NewPassword.value))  
				{
					alert("Please enter valid NewPassword");
					return false;   
				}	 
				alert("Are you sure you want to change your Password");
		document.f1.action="alumnimain.php?page=alumnichangepasswordpost"; 
		document.f1.submit(); 
	}	
//----------------------------------------
//search alumni 
function aluminsearchmembersdisp()
  {
  document.searchbycourse.action="alumnimain.php?page=searchalumni";
  document.searchbycourse.submit();
  }
function alumnisearchmembers() 
 {		
     document.searchbycourse.action="alumnimain.php?page=searchalumnipost";
  	  document.searchbycourse.submit();
 }
//-----------------------------------------------
//search emp
function	searchalumniemp() 
{	       
		
			if(isBlank(document.form1.SearchWorkingFor.value)&&isBlank(document.form1.SearchCity.value))
		 	{
					alert("Please enter valid WorkingFor or City ");  
					return false; 
				}			
			document.form1.action="alumnimain.php?page=alumniemployeementpost";       
			document.form1.submit();			
} 
