﻿// ********************************************************
// File      : AmtFrameworkSupport.js                     *
// Date      : 27-10-2008                                 *
// Copyright : Asysco Software BV (http://www.asysco.com) *
// Product   : Asysco Migration Technology                *
// ********************************************************
// JScript File

// Constructor AmtFrameworkSupport


function AmtFrameworkSupportBase () {
 this._allowBackSpace = false;
}

AmtFrameworkSupportBase.prototype = {
  get_allowBackSpace : function () {
    return this._allowBackSpace;
  },
  
  set_allowBackSpace : function (value) {
    this._allowBackSpace = (value == 'true');
  },
  
  NoBackspaceForBackButton : function(sender, e) {
  /// <summary>
  /// Prevents keying the backspace button, depending on the property _allowBackSpace
  /// </summary>
    if (this._allowBackSpace) {
      return true;
    }  
    var keycode;
    if (window.event) {
      keycode = window.event.keyCode;
    } else if (e) {
      keycode = e.which;
    } else {
      return true;
    }
    if (keycode == 8) {
      return false;
    } else {
     return true;
    }
  }
 }

var AmtFrameworkSupport = new AmtFrameworkSupportBase();
