function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if ((charCode >=48 && charCode <=57 )|| (charCode == 46 )||(charCode == 10 )||(charCode == 13 )|| (charCode == 8)||(charCode == 32)||(charCode == 45))
        {
	       return true; 
        }
         else
          {
	         alert("Please Enter Only Numbers");
            return false;
        }
        
    }


function logvalidation()
{
	
	var roll=document.getElementById("roll").value;
	var pass=document.getElementById("pass").value;

// validation for roll number
	 if(roll=="")
	 {
		//alert("hai");
		alert("Please enter the roll number");
		document.frm.roll.focus();
		document.frm.roll.select();
		return false;
		
	}

	else if(roll!="")
	{
		var invalids = "!#$%^&*()-=[]{}`~,'<>/?;:\|@._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
		for(i=0; i<invalids.length; i++) 
		{
			if(roll.indexOf(invalids.charAt(i)) >= 0 )
			{
				alert("Roll number should be in numbers");
				
				document.frm.roll.value="";
				document.frm.roll.focus();
				document.frm.roll.select();
				return false;
				
			}
			
		}
	}
	
	else if(roll.length>4)
		{
		
		alert("Enter only 4 digits");
		document.frm.roll.value="";
		document.frm.roll.focus();
		document.frm.roll.select();
		 return false;
		 
		}
	

	

if(pass==""){
		alert("Please enter the Password");

		
		document.frm.pass.focus();
		document.frm.pass.select();
		return false;
		
	}
	if(pass.length<5){

		alert("The password should be enter 6 or more characters");
		document.frm.pass.value="";
		document.frm.pass.focus();
		document.frm.pass.select();
		return false;
		
	}
	



return true;
document.frm.submit();
}



function forgotval()
{
	
	var roll=document.getElementById("roll").value;
	

// validation for roll number
	 if(roll=="")
	 {
		
		alert("Please enter the roll number");
		document.frm.roll.focus();
		document.frm.roll.select();
		return false;
		
	}

	else if(roll!="")
	{
		var invalids = "!#$%^&*()-=[]{}`~,'<>/?;:\|@._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
		for(i=0; i<invalids.length; i++) 
		{
			if(roll.indexOf(invalids.charAt(i)) >= 0 )
			{
				alert("Roll number should be in numbers");
				
				document.frm.roll.value="";
				document.frm.roll.focus();
				document.frm.roll.select();
				return false;
				
			}
			
		}
	}
	
	else if(roll.length>4)
		{
		
		alert("Enter only 4 digits");
		document.frm.roll.value="";
		document.frm.roll.focus();
		document.frm.roll.select();
		 return false;
		 
		}
	

	


	



return true;
document.frm.submit();
}
//Limiting Character validation   
function limitlength(obj, length)
{
	var maxlength=length
	if (obj.value.length>maxlength)
	{
	obj.value=obj.value.substring(0, maxlength)
	alert ("Please enter only "+maxlength+" characters");
     }
}  