/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


function onlyInteger(elem) {
    
    var result = true;
    var value = event.which;
    
    if (value < 48 || value > 57) {
        result = false;
    }
    
    return result;
}

function imageShow(element,img){
        var file = event.target.files[0];
        if(file.type.match(/image.*/)) {
            var imgInp = element;
            var blah = document.getElementById(img);
              const [file] = imgInp.files
              if (file) {
                    blah.src = URL.createObjectURL(file)
              }
      }
}

