function invokeEnter(e,fform,ajaxevent,container) {
	if (e.keyCode==13) {
		invoke(fform,ajaxevent,container);
	}
}

          /*
           * Function that uses Prototype to invoke an action of a form. Slurps the values
           * from the form using prototype's 'Form.serialize()' method, and then submits
           * them to the server using prototype's 'Ajax.Updater' which transmits the request
           * and then renders the resposne text into the named container.
           *
           * @param form reference to the form object being submitted
           * @param event the name of the event to be triggered, or null
           * @param container the name of the HTML container to insert the result into
           */
          function invoke(fform, event, container) {
          		form = "";
          		if (fform.tagName=="FORM") {
          			form = fform;
          		}
          		else {
          			form = document.getElementById(fform);
          		}

				__xss_aleatory_sh = new Date();
              var params = Form.serialize(form);
              	params += '&__xss_aleatory_sh='+__xss_aleatory_sh;
              	_url = form.action;
              if (event != null) params = event + '&' + params;
              containerObject = document.getElementById(container);
              if (containerObject!=null && containerObject!=undefined) {
              		tmp = containerObject.innerHTML;
              		containerObject.innerHTML = "<DIV loading></DIV>"+containerObject.innerHTML;
					window.setTimeout("loadingScreen('"+container+"')",1000);
              	}
              new Ajax.Updater(container, _url, {method:'post', postBody:params});
          }


          /*
           * Function that uses Prototype to invoke an action of a form. Slurps the values
           * from the form using prototype's 'Form.serialize()' method, and then submits
           * them to the server using prototype's 'Ajax.Updater' which transmits the request
           * and then renders the resposne text into the named container.
           *
           * @param url URL to invoke
           * @param event the name of the event to be triggered, or null
           * @param container the name of the HTML container to insert the result into
           */
          function invokeURL(url, event, container) {
				params = "";
				if (event!=null) params+=event;
				if (params!="") params+="&";
				params+=+'__xss_aleatory_sh='+new Date();
              containerObject = document.getElementById(container);
              if (containerObject!=null && containerObject!=undefined) {
              		tmp = containerObject.innerHTML;
              		containerObject.innerHTML = "<DIV loading></DIV>"+containerObject.innerHTML;
					window.setTimeout("loadingScreen('"+container+"')",1000);
              	}
              new Ajax.Updater(container,
              			url,
              			{method:'post', postBody:params}
              			);
          }


			function loadingScreen(container) {
				tcontainer = document.getElementById(container);
				if ( tcontainer.innerHTML.indexOf("<DIV loading>")>-1 ) {
					tcontainer.innerHTML="<div class='loading'>loading... please wait.</div>"+tcontainer.innerHTML;
					}
			}

          /*
           * Returns the first DIV object containing parameter object.
           *
           */
          function thisDiv(obj) {
        	  	current = obj;
    	      	type = current.tagName;
	          	while (type!="DIV" && type!="BODY" && current!=null) {
          			current = current.parentNode;
          			if (current!=null)
        	  		type = current.tagName;
    	      	}
    	      	if (type=="DIV") {
		          	return current;
		        }
		        return null;
          }

          /**
           * returns the first FORM object containint the parameter object
           */
          function thisForm(obj) {
        	  	current = obj;
    	      	type = current.tagName;
	          	while (type!="FORM" && type!="BODY" && current!=null) {
          			current = current.parentNode;
          			if (current!=null)
        	  		type = current.tagName;
    	      	}
    	      	if (type=="FORM") {
		          	return current;
		        }
		        return null;
          }


          /**
           *
           */
          function setFormAction(frm,actn) {
          		frm.action = "/LearnIT/"+actn;
          }