###User Defined Function###
_IEHeadInsertEventScript

###Description###
Inserts a Javascript into the Head of the document.

###Syntax###
#include <IE.au3>
_IEHeadInsertEventScript ( ByRef $o_object, $s_htmlFor, $s_event, $s_script )


###Parameters###
@@ParamTable@@
$o_object
	Object variable of an InternetExplorer.Application, Window or Frame object
$s_htmlFor
	The HTML element for event monitoring (e.g. "document", "window" or an element ID)
$s_event
	The event to monitor (e.g. "onclick" or "oncontextmenu")
$s_script
	Javascript string to be executed
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	1.
Failure:	0 and sets the @error flag to non-zero.
@error:	2 ($_IEStatus_COMError) - COM Error in Object reference
	3 ($_IEStatus_InvalidDataType) - Invalid Data Type
@extended:	Contains invalid parameter number
@@End@@


###Remarks###
Using <a href="../functions/ObjEvent.htm">ObjEvent()</a>, AutoIt is able to be notified of events via COM, but it manages them asynchronously (rather than synchronously as they are handled in the browser context).
This routine allows you to inject code that is managed inside the browser context.

Note that elements that do not have an ID assigned can still be used by obtaining their "uniqueID" property with <a href="_IEPropertyGet.htm">_IEPropertyGet()</a>


###Related###
_IEDocInsertHTML, _IEPropertyGet, _IEDocInsertText


###Example###
@@IncludeExample@@
