function checkOnlyNumber(field,evt) 
{  
    var charCode;
    if(navigator.appName=="Microsoft Internet Explorer")
        charCode=evt.keyCode;
    else
        charCode=evt.charCode;    
        
    
       //allow apostrophe, comma and spaces as we are going for globalization
       if(charCode == 44 || charCode == 32 || charCode == 39)
       {
             return true;
       }           

     //Only numeric caracter 
     //Key code 46 = .     
    if(charCode == 46)
    {
        if(field.value.indexOf('.') == -1)
        {
            return true;
        }
        else
        {
            return false;
        }
    }    
    else if(charCode > 31 && (charCode < 48 || charCode > 57))
    {
        return false;
    }    
      
    //Check navigation, tab keys in Fire Fox
    if(charCode == 0)
    {        
        return true;
    } 
    
    return true;
}

function checkOnlyInteger(field,evt) 
{  
    var charCode;
    if(navigator.appName=="Microsoft Internet Explorer")
        charCode=evt.keyCode;
    else
        charCode=evt.charCode;           
        
   //allow apostrophe, comma and spaces as we are going for globalization
   if(charCode == 44 || charCode == 32 || charCode == 39 || charCode==46) //code for a ","
   {
         return true;
   }
     //Only numeric caracter 
    if(charCode > 31 && (charCode < 48 || charCode > 57))
    {
        return false;
    }    
      
    //Check navigation, tab keys in Fire Fox
    if(charCode == 0)
    {        
        return true;
    } 
    
    return true;
}

