'use strict';
var myscript=document.createElement('script');
myscript.innerHTML='function moveElement(element) {\n'+
'scr_w=window.innerWidth;\n'+
'scr_h=window.innerHeight;\n'+
'changeCoordinate(element,"left",random(0,scr_w-30));\n'+
'changeCoordinate(element,"top",random(0,scr_h-30));\n'+
'}\n'+
'function changeCoordinate(element,coor,newc) {\n'+
'var stylestr=element.getAttribute("style");\n'+
'var begin=stylestr.indexOf(coor);\n'+
'var locstr=stylestr.substr(begin);\n'+
'var end=locstr.indexOf(";");\n'+
'locstr=locstr.substring(0,end);\n'+
'stylestr=stylestr.replace(locstr,coor+": "+newc+"px");\n'+
'element.setAttribute("style",stylestr);\n'+
'}\n'+
'function random(min,max) {\n'+
'return Math.floor(Math.random() * (max - min + 1)) + min;\n'+
'}';
document.body.insertBefore(myscript,document.body.firstChild);
var myfly=document.createElement('img');
myfly.setAttribute('src','http://i.imgur.com/yWDqRfA.png');
myfly.setAttribute('style','z-index: 100; width: 30px; height: 30px; position: fixed; left:10px; top:10px;');
myfly.setAttribute('onmouseover','moveElement(this)');
document.body.insertBefore(myfly,document.body.firstChild);