<!--
function validateForm()
{

			//assign classes to class
			this.checkText = checkText1;
			this.checkNumber = checkNumber1;
			this.checkDate = checkDate1;
			this.checkEmail = checkEmail1;
			this.CheckLeapYear = CheckLeapYear1;
			
			
	////Function Definations
	
			function checkText1(varElement)
				{
				 varElement=document.getElementById(varElement);
				
					if(varElement.value=="")
						{
							alert('importent field should not be blank');
							 varElement.focus();
							return false;
						}
					else
						return true;
				}
			
			function checkNumber1(varElement)
				{
					varElement=document.getElementById(varElement);
					
					if(varElement.value=="")
						{
							alert('Number should be entered');
							 varElement.focus();
							return false;
					  }
					  else
					  {
								re=/[0-9]+/
								//if(!re.test(varElement.value))
								if(isNaN(varElement.value))
								{
								 alert('Invalid Number');
								 varElement.focus();
				 				 return false;
								}
							else
								return true;
						}
				}
			
			function checkDate1(varElement,varFormat1)
				{
					varElement=document.getElementById(varElement);
					
					//alert(varElement.value);
					if(varElement.value=="")
					 {
					  alert("date is empty");
					  ////varElement.focus();
					 	return false;
					}
				else
					{
								txtDate=varElement.value;
								//txtFormat=varElement.getAttribute('format')
								
								txtFormat=varFormat1;
								dateSeperator=" ";
								if(txtFormat.indexOf("-")!=-1)
								  dateSeperator=txtFormat.substring(txtFormat.indexOf("-"),txtFormat.indexOf("-")+1);
								 else
								 	if(txtFormat.indexOf("/"))
								    dateSeperator=txtFormat.substring(txtFormat.indexOf("/"),txtFormat.indexOf("/")+1);
								   
								 arrFormat= txtFormat.split(dateSeperator);
								 arrDate=txtDate.split(dateSeperator);
								 
								flag1=true;
								for(i=0;i<arrFormat.length;i++)
								 {
									 if(arrFormat[i]=="dd")
									 if(arrDate[i]>31)
									   {
									   	flag1=false;
									    break;
								     }
								   if(arrFormat[i]=="mm")
									   if(arrDate[i]>12)
									   {
									    flag1=false;
									    break;
								     }
						 			 
						 			 if(arrFormat[i].length!=arrDate[i].length)
								    if(arrDate[i]>10 )
									   { 
									    flag1=false;
									    break;
								     }
								 }
							
								if(!flag1)
								 {
								 	alert("Invalid Date");
								 	////varElement.focus();
								}
								
								return flag1;
						}			 
				}
			
			function checkEmail1(varElement)
				{
					//alert(varElement.value);
					varElement=document.getElementById(varElement);
					if(varElement.value=="")
						{
							alert('E-mail id should be entered');
							varElement.focus();
							return false;
					  }
					  else
					  {
								re=/[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)*@([A-Z0-9a-z][A-Z0-9a-z-]*[A-Z0-9a-z]\.)+([A-Za-z]{2,4})/
								if(!re.test(varElement.value))
								{
								 alert('Invalid Email ID');
								 ////varElement.focus();
				 				 return false;
								}
							else
								return true;
						}
				}
				
				
		  function CheckLeapYear1(day_sel,month_sel,year_sel)
			  {
			  	
			   var aDaysNum = Array( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 );
			   /*var id_cut   = id.substr( 6, id.length-6 );
			   var day_sel   = document.getElementById( 'fld_d_' + id_cut );
			   var month_sel = document.getElementById( 'fld_m_' + id_cut );
			   var year_sel  = document.getElementById( 'fld_y_' + id_cut );
			   */
			
			   if ( typeof(day_sel)=='object' && day_sel!=null )
			    if ( typeof(month_sel)=='object' && month_sel!=null )
			     if ( typeof(year_sel)=='object' && year_sel!=null )
			     {
			        if ( month_sel.selectedIndex==1 )
			        {
			          if ( year_sel.value % 400==0 || (year_sel.value % 100!=0 && year_sel.value % 4==0) ) aDaysNum[1] = 29;
			        }
			        var day_sel_ix = day_sel.selectedIndex;
			        day_sel.options.length = 0;
			
			        for ( i=1; i<=aDaysNum[month_sel.selectedIndex]; i++ )
			        {
			           if ( document.createElement )
			           {
			              var newOpt = document.createElement( "OPTION" );
			              newOpt.text = i;
			              newOpt.value = i;
			              ( day_sel.options.add ) ? day_sel.options.add(newOpt) : day_sel.add(newOpt, null);
			           }
			           else
			           {
			              day_sel.options[i-1] = new Option( i, i, false, false );
			           }
			        }
			        if ( day_sel.options.length < (day_sel_ix+1) )
			           day_sel.selectedIndex = day_sel.options.length-1;
			        else day_sel.selectedIndex = day_sel_ix;
			     }
			   }

}
-->