var scannerSession;
...
function createSessionCallback(theScannerSession, status) {
if (status.get_status() !== ImageGear.Web.Isis.ImGearIsisStatus.Completed) {
alert(status.get_statusMessage());
}
// Store the scanner session.
scannerSession = theScannerSession;
}
var scannerService = new ImageGear.Web.Isis.ImGearIsisScannerService();
scannerService.createSession({ applicationName: "ImageGear ISIS Application", destroyExistingSession: true, locale: "en-us", idleTimeoutMinutes: 0, callback: createSessionCallback });