if (!(document.attachEvent)) {
    window.addEventListener("keypress", handleKeyPress, true);
   }
   
   function handleKeyPress(event) {
   	var flash = document.getElementById("flashcontent");
       if (flash && flash.handleKeyPress) {
       	var text = "";
       	if (event.charCode) {
       		text = String.fromCharCode(event.charCode);
       	}
           var flashEvent = {
           	text: text,
           	ctrlKey: event.ctrlKey,
           	altKey: event.altKey,
           	shiftKey: event.shiftKey
              }	           
           flash.handleKeyPress(flashEvent);
       }
   }	    
      
function getUserAgent()
{
	return navigator.userAgent;
}

function getUserLanguage()
{
	return navigator.userLanguage || navigator.language;
}		