/* JavaScript Document

THIS FILE IS FOR DISTRIBUTING UPDATES TO THE FRAMWORK ON OLDER VERSIONS.
**PUT EVERYTHING HERE and then your life will be easier when you copy/paste

then, just place this line in your admin/index.php page: (update the relative URL of course)
<script type="text/javascript" src="../includes/fw_updates.js"></script>


*/




addLoadEvent(disable_bksp);













/* DISABLE BACKSPACE KEY */

function disable_bksp() {
	if (typeof window.event != 'undefined') {
      document.onkeydown = function() {
            if (event.srcElement.tagName.toUpperCase() != 'INPUT' && event.srcElement.tagName.toUpperCase() != 'TEXTAREA')
                  return (event.keyCode != 8);
      } 
	} else {
	      document.onkeypress = function(e) {
            if (e.target.nodeName.toUpperCase() != 'INPUT' && e.target.nodeName.toUpperCase() != 'TEXTAREA')
                  return (e.keyCode != 8);
		  }
    }
}
















/* ------------------- */
/*  UTILITY FUNCTIONS  */
/* ------------------- */


function addLoadEvent(func) {	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}
}
