
function isEmpty(str)
// Check for empty 
{
			return ((str == null) || (str.length == 0));
}

function isCheckChar(str)
//check for character
{
			var i;
			for (i=0; i<str.length; i++){   
            var c = str.charAt(i);
            if (((c>="a")&&(c<="z")) || ((c>="A")&&(c<="Z"))){ return true};
			}
			return false;
}

function isDigitLength(str)
//check for Digit length
{
			if(str != "")
			{
			var i=str.length;
			if((i!=4)){return true;}
			}
			return false;
		    
}

function isCheckDigit(str)
//check for value from 0-9 digits 
{
			var i;
			for (i=0; i<str.length; i++)
			{   
            var c1 = str.charAt(i);
            if((c1>="0")||(c1<="9")) {return true;}
            }
            return false;
    
}

function isCommaChar(str)
//check for comma
{
			var i;
			for (i=0; i<str.length; i++){   
            var c1 = str.charAt(i);
            if (((c1 == " ") || (c1=="~") || (c1=="`") || (c1=="!") || (c1=="{") || (c1=="}") || (c1==";")|| (c1==":") || (c1=="'") || (c1=="<") || (c1==">") || (c1=="?") || (c1=="/")  || (c1=="@") || (c1=="#") || (c1=="$") || (c1=="%") || (c1=="^") || (c1=="&") || (c1=="*") || (c1=="(")|| (c1=="+") ||(c1=="=") || (c1=="|")|| (c1=="]")|| (c1=="[")||(c1=="-"))) {return true;}
            }
            return false;
    
}

function isHyphnChar(str)
//check for Hyphen
{             
           
			var i;
			for (i=0; i<str.length; i++){   
            var c1 = str.charAt(i);
            if (((c1 == " ") || (c1=="~") || (c1=="`") || (c1=="!") || (c1=="{") || (c1=="}") || (c1==";")|| (c1==":") || (c1=="'") || (c1=="<") || (c1==">") || (c1=="?") || (c1=="/")  || (c1=="@") || (c1=="#") || (c1=="$") || (c1=="%") || (c1=="^") || (c1=="&") || (c1=="*") || (c1=="(")|| (c1=="+") ||(c1=="=") || (c1=="|")|| (c1=="]")|| (c1=="["))) {return true;}
            }
            return false;
    
}

function isSpecialChar(str)
//check for special characters
{
			var i;
			for (i=0; i<str.length; i++){   
            var c1 = str.charAt(i);
            if (((c1 == " ") || (c1=="~") || (c1=="`") || (c1=="!") ||(c1==",")|| (c1=="{") || (c1=="}") || (c1==";")|| (c1==":") || (c1=="'") || (c1=="<") || (c1==">") || (c1=="?") || (c1=="/")  || (c1=="@") || (c1=="#") || (c1=="$") || (c1=="%") || (c1=="^") || (c1=="&") || (c1=="*") || (c1=="(")|| (c1=="+") ||(c1=="=") || (c1=="|")|| (c1=="]")|| (c1=="[")||(c1=="-"))) {return true;}
            }
            return false;
}                

function isLength(str,strMin,strMax)
// Check for empty 
{       
			var i=str.length;
			return ((i <= strMin ) || (i >= strMax));
       
}

function isVolumePercentage(str)
// Check for empty 
{      
			var i=str;
			if((i<0)||(i>100)){return true;}
			return false;
}

function isWhitespace(str)
//check for white spaces
 {
			var i;
			for (i = 0; i < str.length; i++)
			{   
            var c = str.charAt(i);
            if((c == " ")){return true;}
			}
			return false;
 }
 
function isYearLength(str)
//check for valid Year(four digit)
 {
	
	 return((str.length < 4))
		
 }

function isYearValid(str)
//check for valid Year
 {
	var strAbs=Math.abs(str);
	
     if (isLeadWhitespace(str)){ return true;}
	 if (isNaN(str)){ return true;}
	 if (isYearLength(str)){ return true;}
	
 }

function isLeadWhitespace (str)
//check for white spaces
 {
			var i;
            var c = str.charAt(0);
            return ((c == " "));
 }
 
function isContactAdded(obj,strPrompt)
		{
			if(obj.length < 2)
				{
					alert("You need to add a Contact before "+strPrompt);
					obj.focus();
					return false;
				}
			else return true;	
		} 
			

function CheckConfirmDelete()
//confirmation of delete
	{
			var status;
			var con=confirm("Are you sure you want to delete?");
			if(con==true){status=true;return(status);}
			else
			return false;
	}	
function ConfirmDeletion(strPrompt)	
	{
		var strStatus
		strStatus=confirm("Are you sure you want to delete this "+strPrompt+"?");
		
		if (strStatus==true)
			{
				return true;
			}
		else
			{
				return false;
			}
			
	}	
	
function isEmail (str)
//-------------email validation----------
{			
			// is str whitespace?
			//if (isWhitespace(str)) return false;
         	// there must be >= 1 character before @, so we
			// start looking at character position 1 
			// (i.e. second character)
			var i = 1;
			var strLength = str.length;

			// look for @
			while ((i < strLength) && (str.charAt(i) != "@"))
			{ i++ }

			if ((i >= strLength) || (str.charAt(i) != "@")) return false;
			else i += 2;

			// look for .
			while ((i < strLength) && (str.charAt(i) != "."))
			{ i++ }

			// there must be at least one character after the .
			if ((i >= strLength - 1) || (str.charAt(i) != ".")) return false;
			else return true;
}


function isPasswordSame(first,second)
//check for password reenter value
		{
      var j,k;
      var lnt;        
      if(first.length > second.length)
				{
                lnt=first.length;
                }
      else
				{
                lnt=second.length;
				}               
                for (j = 0; j < lnt; j++)
                {   
                if(first.charAt(j) !=second.charAt(j)){return true;}
                }
                
       return false;
}

function checkDateFields(objMI,objDI,objYI)
{ 
		var menu_selection1="";
		var menu_selection2="";
		var menu_selection3="";
		var myindex1=objDI.value;
		var myindex2=objMI.value;
		var myindex3=objYI.value;
		var Returnval
		Returnval=0;
		if( (myindex1!=0 ) &&  (myindex2!=0) && (myindex3!=0) )
		{
			menu_selection1=objDI.value;
			menu_selection2=objMI.value;
			menu_selection3=objYI.value;
			if((myindex2==2) && (menu_selection1>28)){Returnval=1;return Returnval;}		
			if(((myindex2==4) || (myindex2==6) ||  (myindex2==9) ||  (myindex2==11)) && (menu_selection1>30)){Returnval=2;return Returnval}
		}//nikitha
		else
		{
			 if( (myindex1!=0 ) ||  (myindex2!=0) || (myindex3!=0) )	{ Returnval=3; return Returnval;}
			 if( (myindex1==0 ) &&  (myindex2==0) && (myindex3==0) )	{ Returnval=4; return Returnval;}
		}
}

function checkTimeFields(objHH,objAMPM)
{ 
		var myindex1=objHH.selectedIndex;
		var myindex2=objAMPM.selectedIndex;
		
		var Returnval
		
		Returnval=0;
		
		if( (myindex1!=0 ) &&  (myindex2!=0) )
		{
			
		}
		else
		{
			 if( (myindex1!=0 ) ||  (myindex2!=0) )	{ Returnval=1; return Returnval;}
			 if( (myindex1==0 ) &&  (myindex2==0) )	{ Returnval=2; return Returnval;}
		}
}


function isFieldEmpty(objFrom,objTo)
{ 
		var menu_selection1="";
		var menu_selection2="";
		
		var myindex1=objFrom.value;
		var myindex2=objTo.value;
		
		
		if( (myindex1!=0 ) &&  (myindex2!=0))
			{
			menu_selection1=objFrom.value;
			menu_selection2=objTo.value;
			}
			else
			{	
			return( (myindex1!=0 ) ||  (myindex2!=0) )
			}
			
}

function isFieldFromToEmpty(ObjFromMonth,ObjFromDay,ObjFromYear,ObjToMonth,ObjToDay,ObjToYear)
{
				if((ObjFromMonth.value!=0) || (ObjFromDay.value!=0) || (ObjFromYear.value!=0) || (ObjToMonth.value!=0) || (ObjToDay.value!=0) || (ObjToYear.value!=0))
				{
				if((ObjFromMonth.value!=0) && (ObjFromDay.value!=0) && (ObjFromYear.value!=0) && (ObjToMonth.value!=0) && (ObjToDay.value!=0) && (ObjToYear.value!=0))return false;
				else return true;
				}
				else return false;
}
		
function checkUserId (str,String,emptyOk)
{ 
          		if((trim(str.value).length >0 )||(emptyOk==true))
				{
          		if (isEmpty(trim(str.value))) { alert("Please enter a "+String); str.focus();return false;}
                if (isSpecialChar(trim(str.value))){ alert(String+" Should not contain special characters"); str.focus();return false;}
                if (isWhitespace(trim(str.value))){ alert(String+" name cannot contain spaces"); str.focus();return false;}
                if (trim(str.value).length<8){ alert(String+" Should be Minimum of 8 characters"); str.focus();return false;}
				return true;
				}
				else return true;
 }
        
        
function checkPassword(str1,str,String,emptyOk)
 {  
				if((trim(str1.value).length >0 )||(trim(str.value).length >0 )||(emptyOk==true))
				{
				if (trim(str1.value).length < 1 ){ alert("Please enter the User Name"); str1.focus(); return false;}
				if (isEmpty(trim(str.value))) { alert("Please enter the Password"); str.focus(); return false;}
				if (isSpecialChar(trim(str.value))){ alert("Password cannot have special characters"); str.focus();return false;}
				if (isWhitespace(trim(str.value))){ alert("Password cannot contain spaces"); str.focus();return false;}
				if (trim(str.value).length<5){ alert("Password Should have Minimum of 5 characters"); str.focus();return false;}
				return true;
				}
				else return true;
}
		
		
function checkPasswordReenter(str,str1,String,emptyOk)
{
                 
                if((trim(str.value).length >0 )||(trim(str1.value).length >0 )||(emptyOk==true))
				{
				if (trim(str.value).length < 1 ){ alert("Please enter the Password"); str.focus(); return false;}
				if (isEmpty(trim(str.value))) { alert("Please enter a "+String); str.focus();return false;}
                if (isEmpty(str1.value)) { alert("Please confirm the "+String); str1.focus();return false;}
                if (isSpecialChar(trim(str.value))){ alert(String+" cannot have special characters"); str.focus();return false;}
				if (isWhitespace(trim(str.value))){ alert(String+" cannot contain spaces"); str.focus();return false;}
				if (trim(str.value).length<3){ alert(String+" Should have Minimum of 3 characters"); str.focus();return false;}
				if (isPasswordSame(trim(str.value),str1.value)) { alert(String+" you re-entered does not match. Please enter your password again");str1.focus(); return false;}
                return true;
                }
                else return true;
}
        
		
function checkEmail(str,emptyOk)
{
				if((trim(str.value).length >0 )||(emptyOk==true))
				{
				if (isLeadWhitespace(trim(str.value))){ alert("Email cannot start with a space"); str.focus();return false;}
				if (isWhitespace(trim(str.value))){ alert("Email cannot contain spaces"); str.focus();return false;}
				if ((isEmpty(trim(str.value)))) 
				{
				alert("Please enter an Email address");
				str.focus();
				return false;
				} 
				else if (!isEmail(trim(str.value), false))
				{
				alert("Email is invalid");
				str.focus();
				return false;
				} 
				return true;
				}
				else return true;
}
//Function for removing trailing spaces
function trim(argvalue)
	{
		var tmpstr = ltrim(argvalue);

		return rtrim(tmpstr);

	}
function ltrim(argvalue)
	{

		while (1)
			{
				if (argvalue.substring(0, 1) != " ")
				break;
				argvalue = argvalue.substring(1, argvalue.length);
			}

			return argvalue;
	}
		
function rtrim(argvalue)
	{

	  while (1)
		 {
			if (argvalue.substring(argvalue.length - 1, argvalue.length) != " ")
			break;
			argvalue = argvalue.substring(0, argvalue.length - 1);
		 }

		return argvalue;
	}
					
function checkInputs(str,String,emptyOk)
	{   
													
			if((trim(str.value).length >0 )||(emptyOk==true))
			{
				if (isEmpty(trim(str.value))) { alert("Please enter "+String); str.focus(); return false;}
				if (isLeadWhitespace(trim(str.value))){ alert(String+" cannot start with a space"); str.focus();return false;}
				return true;
			}
				else return true;
	}
	
function checkLocations(str,str1,str2,String,emptyOk)
	{   var temp = trim(str1.value);
		var temp1 = trim(str.value);
		var arrTemp;
		var i=0;
		arrTemp= temp.split("|") 
										
			if (str2.value == "")
			{
				if((trim(str.value).length >0 )||(emptyOk==true))
				{
					if (isEmpty(trim(str.value))) { alert("Please enter "+String); str.focus(); return false;}
					if (isLeadWhitespace(trim(str.value))){ alert(String+" cannot start with a space"); str.focus();return false;}
					
					while(i< arrTemp.length)
					{
						if (arrTemp[i].toUpperCase()== temp1.toUpperCase()){alert("Already added"); str.focus();return false}
						i++;
					}
					
					return true;
				}
					else return true;
			}
	}	
		
		
function checkCountry(theField,cboField,emptyOk)
{
				if((theField.value >0 )||(emptyOk==true))
				{
				if(theField=="Country"){alert("Please select Country.");cboField.focus();return false;}
				return true;
				}
				else return true;;
}
		
		
function checkState(str,String,emptyOk)
{   
				if((trim(str.value).length >0 )||(emptyOk==true))
				{
				if (isEmpty(trim(str.value))) { alert("Please enter "+String+".If you do not have a Province/State, please enter '--'"); str.focus(); return false;}
				if (isLeadWhitespace(trim(str.value))){ alert(String+" cannot start with a space"); str.focus();return false;}
                return true;
				}
				else return true;
}
function checkPostal(str,String,emptyOk)
{   
				if((trim(str.value).length >0 )||(emptyOk==true))
				{
				if (isEmpty(trim(str.value))) { alert("Please enter "+String+".If you do not have a Postal Code, please enter '--'"); str.focus(); return false;}
				if (isLeadWhitespace(trim(str.value))){ alert(String+" cannot start with a space"); str.focus();return false;}
                return true;
				}
				else return true;
}
			
				
function checkZip(str,str1,String,emptyOk) 
{ 
				if((trim(str.value).length >0 )||(str1.value.length >0 )||(emptyOk==true))
				{
				if (isLeadWhitespace(trim(str.value))){ alert("From field of "+String+" cannot start with a space"); str.focus();return false;}
				if (isSpecialChar(trim(str.value))){ alert("From field of "+String+" cannot have special characters"); str.focus();return false;}
				if (isLeadWhitespace(str1.value)){ alert("To field of "+String+" cannot start with a space"); str1.focus();return false;}
				if (isSpecialChar(str1.value)){ alert("To field of "+String+" cannot have special characters"); str1.focus();return false;}
				if (isFieldEmpty(str,str1)){alert("Please enter both the FROM and TO for the "+String);str.focus();return false;}
				return true;
				}
				else return true;
}
		
function checkDateold(objMI,objDI,objYI,String,emptyOk)
{      
				
				if((objMI.value > 0 )||(objDI.value > 0)||(objYI.value > 0)||(emptyOk==true))
				{
				Returnval=checkDateFields(objMI,objDI,objYI)
				if (Returnval == 3){alert("Please Select All Three Month,Day and Year of the "+String);objMI.focus();return false;}
				if (Returnval == 1){alert(" Day did not Come in Selected Month");objMI.focus();return false;}
				if (Returnval == 2){alert("There are 30 days for the Month chosen");objDI.focus();return false;}
				if (Returnval == 4){alert("Please select the "+String );objMI.focus();return false;}
				return true;
				}
				else return true;
}

		
function checkStartTime(objHH,objAMPM,String,emptyOk)
	{
				if((objHH.selectedIndex > 0 )||(objAMPM.selectedIndex > 0)||(emptyOk==true))
				{
					Returnval=checkTimeFields(objHH,objAMPM)
					if (Returnval == 1){alert("Please Select Hours and Am/Pm of "+String);objHH.focus();return false;}
					if (Returnval == 2){alert("Please select the "+String );objHH.focus();return false;}
					return true;
			    }
			    else return true;
	}
		
function checkVolume(str,String,emptyOk)
{   
				if((trim(str.value).length > 0 )||(emptyOk==true))
				{
				if (isEmpty(trim(str.value))) { alert("Please enter the "+String+" Volume"); str.focus(); return false;}
				if (isLeadWhitespace(trim(str.value))){ alert(String+" cannot start with a space"); str.focus();return false;}
				if (isCheckChar(trim(str.value))){ alert(String+" volume cannot have any characters "); str.focus(); return false;}
                if (isCommaChar(trim(str.value))){ alert(String+" Should not have any special characters other than ,"); str.focus(); return false;}
				if (!isCheckDigit(trim(str.value))){ alert("Please enter the "+String+" volume in digits between 0-9 "); str.focus(); return false;}
				return true;
				}
				else return true;
}
		
function checkYearFounded(str,String,emptyOk)
	{   
				if((trim(str.value).length > 0 )||(emptyOk==true))
				{
					var dtDate;
					var CurrentYear;
					
					dtDate=new Date();
					CurrentYear=dtDate.getFullYear();
					
					if (isYearValid(trim(str.value))){ alert("Please enter valid "+String); str.focus(); return false;}
					if (parseInt(trim(str.value)) > parseInt(CurrentYear))
	 					{
	 						alert(String+" should not be greater than current year");
	 						str.focus();
	 						return false;
	 					} 
	 				else return true;	
	 				
									
				}
				else return true;
	}	
	

function checkPhone(str,String,emptyOk)
{   
			    if((trim(str.value).length >0 )||(emptyOk==true))
				{
			    if (isEmpty(trim(str.value))) { alert("Please enter the " +String); str.focus(); return false;}
			    if (isLeadWhitespace(trim(str.value))){ alert(String+" cannot start with a space"); str.focus();return false;}
				if (isSpecialChar(trim(str.value))){ alert(String+ " cannot have special characters"); str.focus();return false;}
				if (isCheckChar(trim(str.value))){ alert(String+ " cannot have any characters "); str.focus(); return false;}
                if (!isCheckDigit(trim(str.value))){ alert("Please enter the "+String+" in digits between 0-9"); str.focus(); return false;}
			    return true;
			    }
			    else return true;
}
					
function checkMemberSinceDate(str,String,emptyOk)
{   
				if((trim(str.value).length >0 )||(emptyOk==true))
				{
				if (isEmpty(trim(str.value))) { alert("Please enter the "+String+ " since date"); str.focus(); return false;}
				if (isLeadWhitespace(trim(str.value))){ alert(String+" cannot start with a space"); str.focus();return false;}
				if (isSpecialChar(trim(str.value))){ alert(String+ "  cannot have special characters"); str.focus();return false;}
				if (isCheckChar(trim(str.value))){ alert(String+ "  cannot have any characters "); str.focus(); return false;}
               	if (!isCheckDigit(trim(str.value))){ alert("Please enter the "+String+ " in digits between 0-9"); str.focus(); return false;}
				return true;
			    }
			    else return true;
}
function checkMemberSince(str,str1,String,emptyOk) 
{ 
								
				if((trim(str.value).length >0 )||(str1.value.length >0 )||(emptyOk==true))
				{
				if (isCheckChar(trim(str.value))){ alert(String+"Should be a numeric value "); str.focus(); return false;}
				if (isLeadWhitespace(trim(str.value))){ alert(String+" cannot start with a space"); str.focus();return false;}
				if (isSpecialChar(trim(str.value))){ alert("From field of "+String+" cannot have special characters"); str.focus();return false;}
				if (isDigitLength(trim(str.value))) { alert(String+" must of the format YYYY"); str.focus(); return false;}
				if (isCheckChar(str1.value)){ alert(String+"Should be a numeric value ");str1.focus(); return false;}
				if (isLeadWhitespace(str1.value)){ alert(String+" cannot start with a space"); str1.focus();return false;}
				if (isSpecialChar(str1.value)){ alert("To field of "+String+" cannot have special characters"); str1.focus();return false;}
				if (isDigitLength(str1.value)) { alert(String+" must of the format YYYY");str1.focus(); return false;}
				if (isFieldEmpty(str,str1)){alert("Please enter both the FROM and TO for the "+String+" field");str.focus();return false;}
				return true;
			    }
			    else return true;
}
function checkFounded(str,str1,String,emptyOk)
{ 
         
				if((trim(str.value).length >0 )||(str1.value.length >0 )||(emptyOk==true))
				{
				if (isCheckChar(trim(str.value))){ alert(String+"Should be a numeric value "); str.focus(); return false;}
				if (isLeadWhitespace(trim(str.value))){ alert(String+" cannot start with a space"); str.focus();return false;}
				if (isSpecialChar(trim(str.value))){ alert("From field of "+String+" cannot have special characters"); str.focus();return false;}
				if (isDigitLength(trim(str.value))) { alert(String+" must of the format YYYY"); str.focus(); return false;}
				if (isCheckChar(str1.value)){ alert(String+"Should be a numeric value ");str1.focus(); return false;}
				if (isLeadWhitespace(str1.value)){ alert(String+" cannot start with a space"); str1.focus();return false;}
				if (isSpecialChar(str1.value)){ alert("To field of "+String+" cannot have special characters"); str1.focus();return false;}
				if (isDigitLength(str1.value)) { alert(String+" must of the format YYYY");str1.focus(); return false;}
				if (isFieldEmpty(str,str1)){alert("Please enter both the FROM and TO for the "+String+" field");str.focus();return false;}
				return true;
			    }
			    else return true;
}
			
function checkExpImpSum(ImpVol,PrevImpVol,ExpVol,PrevExpVol)
	{
				var CurrentImpVol  = ImpVol.value;
				var PreviousImpVol = PrevImpVol.value;
				var CurrentExpVol  = ExpVol.value;
				var PreviousExpVol = PrevExpVol.value;
				
				var sumImpVol=(parseInt(CurrentImpVol) + parseInt(PreviousImpVol));
				var sumExpVol=(parseInt(CurrentExpVol) + parseInt(PreviousExpVol));
				
				if (sumImpVol > 100)
					{
						alert("Current Import Volume : "+PreviousImpVol+"\nSum of Import Volume Percentage should not be more than 100");
						ImpVol.focus();
						return false;
					}
				
				if (sumExpVol > 100)
					{
						alert("Current Export Volume : "+PreviousExpVol+"\nSum of Export Volume Percentage should not be more than 100");
						ExpVol.focus();
						return false;
					}
				else return true;	
	}	

function checkVolPercent(str,String,emptyOk)
{   
				if((trim(str.value).length >0 )||(emptyOk==true))
				{
				if (isEmpty(trim(str.value))) { alert("Please enter the "+String+" volume percentage"); str.focus(); return false;}
				if (isSpecialChar(trim(str.value))){ alert(String+" Volume  cannot have special characters"); str.focus();return false;}
				if (isLeadWhitespace(trim(str.value))){ alert(String+" cannot start with a space"); str.focus();return false;}
				if (isCheckChar(trim(str.value))){ alert(String+" volume Percent cannot have any characters "); str.focus(); return false;}
               	if (isVolumePercentage(trim(str.value))){ alert("The "+String+" volume percentage should be greater than 100 and less than 0"); str.focus(); return false;}
				 return true;
			    }
			    else return true;
}
		
	

		
function checkBusiOppDatePosted(StrFromMonth,StrFromDay,StrFromYear,StrToMonth,StrToDay,StrToYear,String,emptyOk)
{
				if((StrFromMonth.value > 0 )||(StrFromDay.value > 0)||(StrFromYear.value > 0)||(emptyOk==true))
				{
					if (isFieldFromToEmpty(StrFromMonth,StrFromDay,StrFromYear,StrToMonth,StrToDay,StrToYear)){alert("Please enter both the FROM and TO for the Year Posted field");return false;}
					return true;
			    }
			    else return true;
}
		
		



function isValueSelected(strObj,strPrompt,emptyOk)	
{
		
		if((strObj.value >0 )||(emptyOk==true))
		{
			if (strObj.options.selectedIndex==0)
			{
				alert("Please select a "+strPrompt);
				strObj.focus();
				return false;
			}
			return true;
		}	
		else return true;	
}	


function checkDate(objMI,objDI,objYI,String,emptyOk)
{      
				
		if((objMI.value > 0 )||(objDI.value > 0)||(objYI.value > 0)||(emptyOk==true))
		{
			if( (objMI.value ==0 ) ||  (objDI.value==0) || (objYI.value==0) )
			{
				alert("Please Select All Three Month,Day and Year for "+String);
				objMI.focus();
				return false;
			}
			var dateval=(objMI.value + "/" + objDI.value + "/" + objYI.value);	
			var dtDate=new Date(objMI.value + "/" + objDI.value + "/" + objYI.value);
			var dtCompare=new Date( objMI.value + '/' + '1' + '/' + '0');
		
			var strDate=dtDate.toString();
			var strCompare=dtCompare.toString();
		
			var myDate_array = strDate.split(' ' );
			var myDate_array1 = strCompare.split(' ' );
		
		
			
			if ( myDate_array[1] != myDate_array1[1]) {alert( '"' + dateval+ '" is not a valid date.' );objMI.focus();return false;}
			 
		}
			return true;
			
	 }
							





