﻿// JScript File

//******************* Tutosship Enrolment***********************************************
	function CalculateTutorial()
             { 
            
                var reg=document.getElementById("txt_DateEnrol").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var curYear=mydate.getFullYear();
				if(reg_array[2]>curYear )
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_DateEnrol.value="";
				     document.all.txt_DateEnrol.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]>curMonth )
			         {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_DateEnrol.value="";
				     document.all.txt_DateEnrol.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]==curMonth && reg_array[0]>curDay)
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_DateEnrol.value="";
				     document.all.txt_DateEnrol.focus();
				     return false;
				     }
				
			   }
			
			
//************************ Exemptions Application Form ********************************* 			 
			
			function CalculateExeptionCareer()
			{ 
			   if(document.all.txt_CareerDate1)
			   {
			    var reg=document.getElementById("txt_CareerDate1").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var curYear=mydate.getFullYear();
				if(reg_array[2]>curYear )
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				      document.all.txt_CareerDate1.value="";
				      document.all.txt_CareerDate1.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]>curMonth )
			         {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate1.value="";
				     document.all.txt_CareerDate1.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]==curMonth && reg_array[0]>curDay)
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate1.value="";
				     document.all.txt_CareerDate1.focus();
				     return false;
				     }
				}
								
				
			if(document.all.txt_CareerDate2)
			    {
			    var reg=document.getElementById("txt_CareerDate2").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var curYear=mydate.getFullYear();
				if(reg_array[2]>curYear )
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate2.value="";
				     document.all.txt_CareerDate2.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]>curMonth )
			         {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate2.value="";
				     document.all.txt_CareerDate2.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]==curMonth && reg_array[0]>curDay)
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate2.value="";
				     document.all.txt_CareerDate2.focus();
				     return false;
				     }
			    }
			
			 
			if(document.all.txt_CareerDate3)
			   {
			    var reg=document.getElementById("txt_CareerDate3").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var curYear=mydate.getFullYear();
				if(reg_array[2]>curYear )
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate3.value="";
				     document.all.txt_CareerDate3.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]>curMonth )
			         {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate3.value="";
				     document.all.txt_CareerDate3.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]==curMonth && reg_array[0]>curDay)
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate3.value="";
				     document.all.txt_CareerDate3.focus();
				     return false;
				     }
			   }
			
			
			if(document.all.txt_CareerDate4)
			   {
			    var reg=document.getElementById("txt_CareerDate4").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var curYear=mydate.getFullYear();
				if(reg_array[2]>curYear )
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate4.value="";
				     document.all.txt_CareerDate4.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]>curMonth )
			         {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate4.value="";
				     document.all.txt_CareerDate4.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]==curMonth && reg_array[0]>curDay)
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate4.value="";
				     document.all.txt_CareerDate4.focus();
				     return false;
				     }
		         }  
		       
		       if(document.all.txt_CareerDate5)
			   {
			    var reg=document.getElementById("txt_CareerDate5").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var curYear=mydate.getFullYear();
				if(reg_array[2]>curYear )
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate5.value="";
				     document.all.txt_CareerDate4.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]>curMonth )
			         {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate5.value="";
				     document.all.txt_CareerDate4.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]==curMonth && reg_array[0]>curDay)
				     {
				     alert("Please Select Date Lesser or Equal to the current Date.");
				     document.all.txt_CareerDate5.value="";
				     document.all.txt_CareerDate4.focus();
				     return false;
				     }
		         }
		   }			
		   
		 //  *************************** Maritime World Explained Booking Form*******************************
		 
		 
		 function CalculateMWEcourse()
             { 
               
				     
                var reg=document.getElementById("txt_CourseDate").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var curYear=mydate.getFullYear();
				if(reg_array[2]< curYear )
				     {
				     alert("Please Select Date Greater than or Equal to the current Date.");				    
				     document.all.txt_CourseDate.value="";
				     document.all.txt_CourseDate.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]<curMonth )
			         {
				     alert("Please Select Date Greater than or Equal to the current Date.");				   
				     document.all.txt_CourseDate.value="";
				     document.all.txt_CourseDate.focus();
				     return false;
				     }
				else if(reg_array[2]==curYear && reg_array[1]==curMonth && reg_array[0]<curDay)
				     {
				     alert("Please Select Date Greater than or Equal to the current Date.");				     
				     document.all.txt_CourseDate.value="";
				     document.all.txt_CourseDate.focus();
				     return false;
				     }
					
							
			}  
			
			//**************************************** Understanding Shipping ********************
			
			 function CalculateShipping()
             { 
                var reg=document.getElementById("txt_DOE").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var day1=mydate.getDate();
				var month1=mydate.getMonth()+1;
				var year1=mydate.getFullYear();
				if(reg_array[2]>year1 )
				   {
				    alert("Please Select Date Lesser or Equal to the current Date.");
				    document.all.txt_DOE.value="";
				    document.all.txt_DOE.focus();
				   }
				else if(reg_array[2]==year1 && reg_array[1]>month1 )
				    {
					alert("Please Select Date Lesser or Equal to the current Date.");
					document.all.txt_DOE.value="";
				    document.all.txt_DOE.focus();
					}
				else if(reg_array[2]==year1 && reg_array[1]==month1 && reg_array[0]>day1)
				    {
					alert("Please Select Date Lesser or Equal to the current Date.");
					document.all.txt_DOE.value="";
				    document.all.txt_DOE.focus();
					}
							
			}  
		
		//****************************Business Of Shipping*********************************************
		
		 function CalculateShippingBooking()
             { 
                var reg=document.getElementById("txt_DateCourse").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var day1=mydate.getDate();
				var month1=mydate.getMonth()+1;
				var year1=mydate.getFullYear();
				if(reg_array[2]<year1 )
				   {
				    alert("Please Select Date Greater than or Equal to the current Date.");
				    document.all.txt_DateCourse.value="";
				    document.all.txt_DateCourse.focus();
				    }
				else if(reg_array[2]==year1 && reg_array[1]<month1 )
				    {
					alert("Please Select Date Greater than or Equal to the current Date.");
					document.all.txt_DateCourse.value="";
				    document.all.txt_DateCourse.focus();
					}
				else if(reg_array[2]==year1 && reg_array[1]==month1 && reg_array[0]<day1)
				    {
					alert("Please Select Date Greater than or Equal to the current Date.");
					document.all.txt_DateCourse.value="";
				    document.all.txt_DateCourse.focus();
					}
			  }
		//******************************Liners Trades Booking Form**************************
		
			  function CalculateLiner()
             { 
                var reg=document.getElementById("txt_CourseDate").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var day1=mydate.getDate();
				var month1=mydate.getMonth()+1;
				var year1=mydate.getFullYear();
				if(reg_array[2]<year1 )
				    {
				    alert("Please Select Date Greater than or Equal to the current Date.");
				    document.all.txt_CourseDate.value="";
				    document.all.txt_CourseDate.focus();
				    }
				else if(reg_array[2]==year1 && reg_array[1]<month1 )
				    {
					alert("Please Select Date Greater than or Equal to the current Date.");
					document.all.txt_CourseDate.value="";
				    document.all.txt_CourseDate.focus();
					}
				else if(reg_array[2]==year1 && reg_array[1]==month1 && reg_array[0]<day1)
				    {
					alert("Please Select Date Greater than or Equal to the current Date.");
					document.all.txt_CourseDate.value="";
				    document.all.txt_CourseDate.focus();
					}
			  }
		//****************************** Port Agency Booking Form *******************
		
			   function CalculatePort()
             { 
                var reg=document.getElementById("txt_DateCourse").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var day1=mydate.getDate();
				var month1=mydate.getMonth()+1;
				var year1=mydate.getFullYear();
				if(reg_array[2]<year1 )
				    {
				    alert("Please Select Date Greater than or Equal to the current Date.");
				    document.all.txt_DateCourse.value="";
				    document.all.txt_DateCourse.focus();
				    }
				else if(reg_array[2]==year1 && reg_array[1]<month1 )
				    {
					alert("Please Select Date Greater than or Equal to the current Date.");
					document.all.txt_DateCourse.value="";
				    document.all.txt_DateCourse.focus();
					}
				else if(reg_array[2]==year1 && reg_array[1]==month1 && reg_array[0]<day1)
				    {
					alert("Please Select Date Greater than or Equal to the current Date.");
					document.all.txt_DateCourse.value="";
				    document.all.txt_DateCourse.focus();
					}
			  }
	//**********************************Affliate Member Application*********************************		  
	
	
			   function CalculateAffliate()
             { 
                var reg=document.getElementById("txt_EnrolDate").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var day1=mydate.getDate();
				var month1=mydate.getMonth()+1;
				var year1=mydate.getFullYear();
				if(reg_array[2]>year1 )
				    {
				    alert("Please Select Date Lesser or Equal to the current Date.");
				    document.all.txt_EnrolDate.value="";
				    document.all.txt_EnrolDate.focus();
				    }
				else if(reg_array[2]==year1 && reg_array[1]>month1 )
				    {
					alert("Please Select Date Lesser or Equal to the current Date.");
					document.all.txt_EnrolDate.value="";
				    document.all.txt_EnrolDate.focus();
					}
				else if(reg_array[2]==year1 && reg_array[1]==month1 && reg_array[0]>day1)
				    {
					alert("Please Select Date Lesser or Equal to the current Date.");
					document.all.txt_EnrolDate.value="";
				    document.all.txt_EnrolDate.focus();
					}
			  }
			  
			  
			  
			  //************************ Retired Member Application ************************************
			  
			 
			    function CalculateRetired()
               { 
                var reg=document.getElementById("txt_DateElection").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var day1=mydate.getDate();
				var month1=mydate.getMonth()+1;
				var year1=mydate.getFullYear();
				if(reg_array[2]>year1 )
				   {
				    alert("Please Select Date Lesser or Equal to the current Date.");
				    document.all.txt_DateElection.value="";
				    document.all.txt_DateElection.focus();
				    } 
				else if(reg_array[2]==year1 && reg_array[1]>month1 )
				    {
					alert("Please Select Date Lesser or Equal to the current Date.");
				    document.all.txt_DateElection.value="";
				    document.all.txt_DateElection.focus();
				    }
				else if(reg_array[2]==year1 && reg_array[1]==month1 && reg_array[0]>day1)
				    {
					alert("Please Select Date Lesser or Equal to the current Date.");
					document.all.txt_DateElection.value="";
				    document.all.txt_DateElection.focus();
					}
				     
			  }
		//********************** Life Member Application ******************************************	  
		
		    function CalculateLife()
             { 
                var reg=document.getElementById("txt_DateMembership").value;
				var reg_array=reg.split("/");				
				var reg_pat=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regres=reg.match(reg_pat);
				var mydate = new Date();
				var day1=mydate.getDate();
				var month1=mydate.getMonth()+1;
				var year1=mydate.getFullYear();
				if(reg_array[2]>year1 )
				   {
				    alert("Please Select Date Lesser or Equal to the current Date.");
				    document.all.txt_DateMembership.value="";
				    document.all.txt_DateMembership.focus();
				    }
				else if(reg_array[2]==year1 && reg_array[1]>month1 )
				    {
					alert("Please Select Date Lesser or Equal to the current Date.");
					document.all.txt_DateMembership.value="";
				    document.all.txt_DateMembership.focus();
				    }
				else if(reg_array[2]==year1 && reg_array[1]==month1 && reg_array[0]>day1)
				    {
					alert("Please Select Date Lesser or Equal to the current Date.");
					document.all.txt_DateMembership.value="";
				    document.all.txt_DateMembership.focus();
				    }
			  }
			  
	//************************** Election Member Application ********************************************
	
	function CalculateElectionMemApplication()
	{
	     if(document.all.txt_ExpDoj1)
	     {
	         if(document.all.txt_ExpDoj1.value!="")
	          {
	            var regJoin=document.getElementById("txt_ExpDoj1").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj1.value="";
				document.all.txt_ExpDoj1.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj1.value="";
				document.all.txt_ExpDoj1.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj1.value="";
				document.all.txt_ExpDoj1.focus();
				return false;
				}
	          
	          }	     
	     }
	     
	     if(document.all.txt_ExpDoj2)
	     {
	         if(document.all.txt_ExpDoj2.value!="")
	          {
	            var regJoin=document.getElementById("txt_ExpDoj2").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj2.value="";
				document.all.txt_ExpDoj2.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj2.value="";
				document.all.txt_ExpDoj2.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj2.value="";
				document.all.txt_ExpDoj2.focus();
				return false;
				}
	          
	          }	     
	     }
	     
	   if(document.all.txt_ExpDoj3)
	     {
	         if(document.all.txt_ExpDoj3.value!="")
	          {
	            var regJoin=document.getElementById("txt_ExpDoj3").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj3.value="";
				document.all.txt_ExpDoj3.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj3.value="";
				document.all.txt_ExpDoj3.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj3.value="";
				document.all.txt_ExpDoj3.focus();
				return false;
				}
	          
	          }	     
	     }  
	     
	   if(document.all.txt_ExpDoj4)
	     {
	         if(document.all.txt_ExpDoj4.value!="")
	          {
	            var regJoin=document.getElementById("txt_ExpDoj4").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj4.value="";
				document.all.txt_ExpDoj4.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj4.value="";
				document.all.txt_ExpDoj4.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj4.value="";
				document.all.txt_ExpDoj4.focus();
				return false;
				}
	          
	          }	     
	     }  
     if(document.all.txt_ExpDoj5)
	     {
	         if(document.all.txt_ExpDoj5.value!="")
	          {
	            var regJoin=document.getElementById("txt_ExpDoj5").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj5.value="";
				document.all.txt_ExpDoj5.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj5.value="";
				document.all.txt_ExpDoj5.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_ExpDoj5.value="";
				document.all.txt_ExpDoj5.focus();
				return false;
				}
	          
	          }	     
	     }	  
	     
	     
	 if(document.all.txt_ExpDol1)
	 {
	   if(document.all.txt_ExpDol1.value!="") 
	     {
	         var regLeave=document.getElementById("txt_ExpDol1").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol1.value="";
				document.all.txt_ExpDol1.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol1.value="";
				document.all.txt_ExpDol1.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol1.value="";
				document.all.txt_ExpDol1.focus();
				return false;
				}
	     
	     }   
	 }    
	 
	 
 if(document.all.txt_ExpDol2)
	 {
	   if(document.all.txt_ExpDol2.value!="") 
	     {
	         var regLeave=document.getElementById("txt_ExpDol2").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol2.value="";
				document.all.txt_ExpDol2.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol2.value="";
				document.all.txt_ExpDol2.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol2.value="";
				document.all.txt_ExpDol2.focus();
				return false;
				}
	     
	     }   
	 }	      
	    
   if(document.all.txt_ExpDol3)
	 {
	   if(document.all.txt_ExpDol3.value!="") 
	     {
	         var regLeave=document.getElementById("txt_ExpDol3").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol3.value="";
				document.all.txt_ExpDol3.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol3.value="";
				document.all.txt_ExpDol3.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol3.value="";
				document.all.txt_ExpDol3.focus();
				return false;
				}
	     
	     }   
	 }	
	 
	 if(document.all.txt_ExpDol4)
	 {
	   if(document.all.txt_ExpDol4.value!="") 
	     {
	         var regLeave=document.getElementById("txt_ExpDol4").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol4.value="";
				document.all.txt_ExpDol4.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol4.value="";
				document.all.txt_ExpDol4.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol4.value="";
				document.all.txt_ExpDol4.focus();
				return false;
				}
	     
	     }   
	 }
	 
 if(document.all.txt_ExpDol5)
	 {
	   if(document.all.txt_ExpDol5.value!="") 
	     {
	         var regLeave=document.getElementById("txt_ExpDol5").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol5.value="";
				document.all.txt_ExpDol5.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol5.value="";
				document.all.txt_ExpDol5.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_ExpDol5.value="";
				document.all.txt_ExpDol5.focus();
				return false;
				}
	     
	     }   
	 }  
	 
 if((document.all.txt_ExpDoj1) && (document.all.txt_ExpDol1))
	  {
	            var regJoin=document.getElementById("txt_ExpDoj1").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_ExpDol1").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
	          if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				 document.all.txt_ExpDol1.value="";
				 document.all.txt_ExpDol1.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_ExpDol1.value="";
				 document.all.txt_ExpDol1.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_ExpDol1.value="";
				 document.all.txt_ExpDol1.focus();
				return false;	    
                 } 
       }    
       
 if((document.all.txt_ExpDoj2) && (document.all.txt_ExpDol2))
	  {
	            var regJoin=document.getElementById("txt_ExpDoj2").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_ExpDol2").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
	          if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				  document.all.txt_ExpDol2.value="";
				 document.all.txt_ExpDol2.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_ExpDol2.value="";
				 document.all.txt_ExpDol2.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_ExpDol2.value="";
				 document.all.txt_ExpDol2.focus();
				return false;	    
                 } 
       }    
       
    if((document.all.txt_ExpDoj3) && (document.all.txt_ExpDol3))
	  {
	            var regJoin=document.getElementById("txt_ExpDoj3").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_ExpDol3").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
	          if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				 document.all.txt_ExpDol3.value="";
				 document.all.txt_ExpDol3.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_ExpDol3.value="";
				 document.all.txt_ExpDol3.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_ExpDol3.value="";
				 document.all.txt_ExpDol3.focus();
				return false;	    
                 } 
       }                               
	
	if((document.all.txt_ExpDoj4) && (document.all.txt_ExpDol4))
	  {
	            var regJoin=document.getElementById("txt_ExpDoj4").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_ExpDol4").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
	          if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				 document.all.txt_ExpDol4.value="";
				 document.all.txt_ExpDol4.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_ExpDol4.value="";
				 document.all.txt_ExpDol4.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_ExpDol4.value="";
				 document.all.txt_ExpDol4.focus();
				return false;	    
                 } 
       }   
       
    if((document.all.txt_ExpDoj5) && (document.all.txt_ExpDol5))
	  {
	            var regJoin=document.getElementById("txt_ExpDoj5").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_ExpDol5").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
	          if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				 document.all.txt_ExpDol5.value="";
				 document.all.txt_ExpDol5.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_ExpDol5.value="";
				 document.all.txt_ExpDol5.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_ExpDol5.value="";
				 document.all.txt_ExpDol5.focus();
				return false;	    
                 } 
       }            
    
                
} //Election Member Application


         
         
         //************************** Promotion To Fellowship Form ********************************************
         
            		  
    function CalculateElectionPromotionFellow()
	    {
	     
	  if((document.getElementById("txt_Doj1").value) && (document.getElementById("txt_Dol1").value)) 
	        {
	             var regJoin=document.getElementById("txt_Doj1").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_Dol1").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_Doj1.value="";
				 document.all.txt_Doj1.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_Doj1.value="";
				 document.all.txt_Doj1.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_Doj1.value="";
				 document.all.txt_Doj1.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol1.value="";
				 document.all.txt_Dol1.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol1.value="";
				 document.all.txt_Dol1.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol1.value="";
				 document.all.txt_Dol1.focus();
				return false;
				}
				else				
				if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				 document.all.txt_Dol1.value="";
				 document.all.txt_Dol1.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_Dol1.value="";
				 document.all.txt_Dol1.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_Dol1.value="";
				 document.all.txt_Dol1.focus();
				return false;	    
                 }
	    
              }	 
              
         if((document.getElementById("txt_Doj2").value) && (document.getElementById("txt_Dol2").value)) 
	        {
	             var regJoin=document.getElementById("txt_Doj2").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_Dol2").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_Doj2.value="";
				 document.all.txt_Doj2.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_Doj2.value="";
				 document.all.txt_Doj2.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_Doj2.value="";
				 document.all.txt_Doj2.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol2.value="";
				 document.all.txt_Dol2.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol2.value="";
				 document.all.txt_Dol2.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol2.value="";
				 document.all.txt_Dol2.focus();
				return false;
				}
				else				
				if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				 document.all.txt_Dol2.value="";
				 document.all.txt_Dol2.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				 document.all.txt_Dol2.value="";
				 document.all.txt_Dol2.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_Dol2.value="";
				 document.all.txt_Dol2.focus();
				return false;	    
                 }
              }
             
          if((document.getElementById("txt_Doj3").value) && (document.getElementById("txt_Dol3").value)) 
	         {
	            var regJoin=document.getElementById("txt_Doj3").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_Dol3").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_Doj3.value="";
				 document.all.txt_Doj3.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_Doj3.value="";
				 document.all.txt_Doj3.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				 document.all.txt_Doj3.value="";
				 document.all.txt_Doj3.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				 document.all.txt_Dol3.value="";
				 document.all.txt_Dol3.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol3.value="";
				 document.all.txt_Dol3.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol3.value="";
				 document.all.txt_Dol3.focus();
				return false;
				}
				else				
				if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				document.all.txt_Dol3.value="";
				 document.all.txt_Dol3.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_Dol3.value="";
				 document.all.txt_Dol3.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_Dol3.value="";
				 document.all.txt_Dol3.focus();
				return false;	    
                 }
              }	 
              
         if((document.getElementById("txt_Doj4").value) && (document.getElementById("txt_Dol4").value)) 
	         {
	            var regJoin=document.getElementById("txt_Doj4").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_Dol4").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				 document.all.txt_Doj4.value="";
				 document.all.txt_Doj4.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				 document.all.txt_Doj4.value="";
				 document.all.txt_Doj4.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				 document.all.txt_Doj4.value="";
				 document.all.txt_Doj4.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				 document.all.txt_Dol4.value="";
				 document.all.txt_Dol4.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol4.value="";
				 document.all.txt_Dol4.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol4.value="";
				 document.all.txt_Dol4.focus();
				return false;
				}
				else				
				if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				document.all.txt_Dol4.value="";
				 document.all.txt_Dol4.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_Dol4.value="";
				 document.all.txt_Dol4.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_Dol4.value="";
				 document.all.txt_Dol4.focus();
				return false;	    
                 }
              }	 
              
          if((document.getElementById("txt_Doj5").value) && (document.getElementById("txt_Dol5").value)) 
	         {
	            var regJoin=document.getElementById("txt_Doj5").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_Dol5").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_Doj5.value="";
				 document.all.txt_Doj5.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_Doj5.value="";
				 document.all.txt_Doj5.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_Doj5.value="";
				 document.all.txt_Doj5.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol5.value="";
				 document.all.txt_Dol5.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol5.value="";
				 document.all.txt_Dol5.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_Dol5.value="";
				 document.all.txt_Dol5.focus();
				return false;
				}
				else				
				if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				 document.all.txt_Dol5.value="";
				 document.all.txt_Dol5.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_Dol5.value="";
				 document.all.txt_Dol5.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_Dol5.value="";
				 document.all.txt_Dol5.focus();
				return false;	    
                 }
              }	
            
       }       
       
       
    // ********************** Form-Approval Of The Submission Of A Dissertation *********************************
        
        function CalculateApprovalSumbDissertation()
	    {
	     
	     if((document.getElementById("txt_CareerDoj1").value) && (document.getElementById("txt_CareerDol1").value)) 
	        {
	             var regJoin=document.getElementById("txt_CareerDoj1").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_CareerDol1").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj1.value="";
				document.all.txt_CareerDoj1.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj1.value="";
				document.all.txt_CareerDoj1.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj1.value="";
				document.all.txt_CareerDoj1.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol1.value="";
				document.all.txt_CareerDol1.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol1.value="";
				document.all.txt_CareerDol1.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol1.value="";
				document.all.txt_CareerDol1.focus();
				return false;
				}
				else				
				if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				 document.all.txt_CareerDol1.value="";
				 document.all.txt_CareerDol1.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_CareerDol1.value="";
				document.all.txt_CareerDol1.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_CareerDol1.value="";
				document.all.txt_CareerDol1.focus();
				return false;	    
                 }
              }	 
              
         if((document.getElementById("txt_CareerDoj2").value) && (document.getElementById("txt_CareerDol2").value)) 
	        {
	             var regJoin=document.getElementById("txt_CareerDoj2").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_CareerDol2").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj2.value="";
				document.all.txt_CareerDoj2.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj2.value="";
				document.all.txt_CareerDoj2.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj2.value="";
				document.all.txt_CareerDoj2.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol2.value="";
				document.all.txt_CareerDol2.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol2.value="";
				document.all.txt_CareerDol2.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol2.value="";
				document.all.txt_CareerDol2.focus();
				return false;
				}
				else				
				if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				document.all.txt_CareerDol2.value="";
				document.all.txt_CareerDol2.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_CareerDol2.value="";
				document.all.txt_CareerDol2.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_CareerDol2.value="";
				document.all.txt_CareerDol2.focus();
				return false;	    
                 }
              }
             
          if((document.getElementById("txt_CareerDoj3").value) && (document.getElementById("txt_CareerDol3").value)) 
	         {
	             var regJoin=document.getElementById("txt_CareerDoj3").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_CareerDol3").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj3.value="";
				document.all.txt_CareerDoj3.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj3.value="";
				document.all.txt_CareerDoj3.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj3.value="";
				document.all.txt_CareerDoj3.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol3.value="";
				document.all.txt_CareerDol3.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol3.value="";
				document.all.txt_CareerDol3.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol3.value="";
				document.all.txt_CareerDol3.focus();
				return false;
				}
				else				
				if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				document.all.txt_CareerDol3.value="";
				document.all.txt_CareerDol3.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_CareerDol3.value="";
				document.all.txt_CareerDol3.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_CareerDol3.value="";
				document.all.txt_CareerDol3.focus();
				return false;	    
                 }
              }	 
              
         if((document.getElementById("txt_CareerDoj4").value) && (document.getElementById("txt_CareerDol4").value)) 
	         {
	               var regJoin=document.getElementById("txt_CareerDoj4").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_CareerDol4").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj4.value="";
				document.all.txt_CareerDoj4.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj4.value="";
				document.all.txt_CareerDoj4.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj4.value="";
				document.all.txt_CareerDoj4.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol4.value="";
				document.all.txt_CareerDol4.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol4.value="";
				document.all.txt_CareerDol4.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol4.value="";
				document.all.txt_CareerDol4.focus();
				return false;
				}
				else				
				if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				 document.all.txt_CareerDol4.value="";
				document.all.txt_CareerDol4.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_CareerDol4.value="";
				document.all.txt_CareerDol4.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_CareerDol4.value="";
				document.all.txt_CareerDol4.focus();
				return false;	    
                 }
	    
              }	 
              
          if((document.getElementById("txt_CareerDoj5").value) && (document.getElementById("txt_CareerDol5").value)) 
	         {
	              var regJoin=document.getElementById("txt_CareerDoj5").value;
				var reg_arrayJoin=regJoin.split("/");				
				var reg_patJoin=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresJoin=regJoin.match(reg_patJoin);
				
				var regLeave=document.getElementById("txt_CareerDol5").value;
				var reg_arrayLeave=regLeave.split("/");				
				var reg_patLeave=/^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/;
				var regresLeave=regLeave.match(reg_patLeave);
				var mydate = new Date();
				var curDay=mydate.getDate();
				var curMonth=mydate.getMonth()+1;
				var CurYear=mydate.getFullYear();
				if(reg_arrayJoin[2]>CurYear)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj5.value="";
				document.all.txt_CareerDoj5.focus();
				return false;
				}
				else 
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]>curMonth)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj5.value="";
				document.all.txt_CareerDoj5.focus();
				return false;
				}
				else
				if(reg_arrayJoin[2]==CurYear && reg_arrayJoin[1]==curMonth && reg_arrayJoin[0]>curDay)
				{
				alert("Date of Joining should be Lesser than Current Date");
				document.all.txt_CareerDoj5.value="";
				document.all.txt_CareerDoj5.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]>CurYear)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol5.value="";
				document.all.txt_CareerDol5.focus();
				return false;
				}
				else				
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]>curMonth)
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol5.value="";
				document.all.txt_CareerDol5.focus();
				return false;
				}
				else
				if(reg_arrayLeave[2]==CurYear && reg_arrayLeave[1]==curMonth && reg_arrayLeave[0]>curDay )
				{
				alert("Date of Leaving should be Lesser than Current Date");
				document.all.txt_CareerDol5.value="";
				document.all.txt_CareerDol5.focus();
				return false;
				}
				else				
				if(reg_arrayJoin[2]>reg_arrayLeave[2])
				{
				 alert("Date of Leaving should be Greater than Date of Joining");
				document.all.txt_CareerDol5.value="";
				document.all.txt_CareerDol5.focus();
				 return false;
				 }
				 else 
				 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]>reg_arrayLeave[1]))
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_CareerDol5.value="";
				document.all.txt_CareerDol5.focus();
				return false;	    
                 }
                 else
                 if((reg_arrayJoin[2]==reg_arrayLeave[2]) && (reg_arrayJoin[1]==reg_arrayLeave[1]) && reg_arrayJoin[0]>reg_arrayLeave[0] )
				 {
				alert("Date of Leaving should be Greater than Date of Joining"); 
				document.all.txt_CareerDol5.value="";
				document.all.txt_CareerDol5.focus();
				return false;	    
                 }
	    
              }	
              
         }     