// Attaches an Event Listener to a valid document event type
	function attachEventListener(target, eventType, functionRef, capture){if(typeof target.addEventListener!="undefined"){target.addEventListener(eventType,functionRef,capture);}else if(typeof target.attachEvent!="undefined"){target.attachEvent("on"+eventType,functionRef);window.attachEvent("onunload",function(e){removeListeners(target,eventType,functionRef,capture);});}else{return false;}return true;}
	function removeListeners(target, eventType, functionRef, capture){if(typeof target.removeEventListener!="undefined"){target.removeEventListener(eventType,functionRef,capture);}else if(typeof target.detachEvent!="undefined"){target.detachEvent("on"+eventType,functionRef);}else{return false;}return true;}
// Generic GetHTML Object Functions
	function getObj(oId){var d=document,i,el;el=d.getElementById?d.getElementById(oId):d.all?d.all[oId]?d[oId]:d[oId]:null;if(!el){if(d.forms.length>0){for(i=0; !el && i<d.forms.length; i++){el=d.forms[i][oId];}}}return el;}

// Create Instance of a Flash Object inside an HTML container object via script. Bypasses "Click to Activate Control" message in IE
// Usage: <script type="text/javascript">var oFlash=new insertFlashObject(['oContainerId','id','url','w','h','wmode']);</script>
// Notes: 'wmode' is an optional override and is not required when creating a new insertFlashObject call...simply end the array after 'h'...example: var oFlash=new insertFlashObject(['oContainerId','id','url','w','h']);
	function insertFlashObject(args){var oContainerId=args[0],id=args[1],url=args[2],w=args[3],h=args[4],wmode=args[5]?args[5]:'transparent';if(oContainerId.length>0)var oFlashContainer=getObj(oContainerId);if(oFlashContainer&&url){var oStartTag  = '<object type="application/x-shockwave-flash" id="'+id+'" data="'+url+'" width="'+w+'" height="'+h+'">';var strParams  = '<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+url+'" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="scale" value="exactfit" /><param name="autoStart" value="true" /><param name="WMode" value="'+wmode+'" />';var oEndTag = '</object>';oFlashContainer.innerHTML=oStartTag+strParams+oEndTag;}}
