// LightBoxDialog.js
// Javascript Behaviour for the LightBoxDialog Control
// Copyright (c) by Matthias Hertel, http://www.mathertel.de
// This work is licensed under a BSD style license. See http://www.mathertel.de/License.aspx
// ----- 
// 22.08.2006 22:06:25 created by Matthias Hertel
// 16.09.2006 context on event-methods is now set to the bound object.
// 28.12.2007 documentation and minor changes

jcl.LightBoxDialogBehavior = {
/// <summary>Implementation of a control that simulates modal dialogs by using a LightBox.</summary>
/// <example>
/// A page that uses this control ist available at:<br />
/// <a href="http://www.mathertel.de/AjaxEngine/S04_VisualEffects/LightBoxDemo.aspx">
/// http://www.mathertel.de/AjaxEngine/S04_VisualEffects/LightBoxDemo.aspx</a></example>

init: function() {
  /// <summary>Initialize the control.</summary>
},

onkeydown: function(evt) {
  /// <summary>Handle the keydown event and close the dialog when pressing the escape key.</summary>

  evt = evt || window.event;
  if (evt.keyCode == 27) {
    jcl.LightBoxBehavior.hide();
  } // if
} // onkeypress

} // jcl.LightBoxDialogBehavior

