User:Headquarter8302/common.js

//

// Up-down (function {   "use strict";    document.onmousemove = handleMouseMove;    function handleMouseMove(event) {      var dot, eventDoc, doc, body, screenX, screenY;      event = event || window.event; // IE-ism      // If pageX/Y aren't available and clientX/Y      // are, calculate pageX/Y - logic taken from jQuery			// Calculate pageX/Y if missing and clientX/Y available      if (event.screenX == null && event.clientX != null) {        eventDoc = (event.target && event.target.ownerDocument) || document;        doc = eventDoc.documentElement;        body = eventDoc.body;        event.screenX = event.clientX +          (doc && doc.scrollLeft || body && body.scrollLeft || 0) -          (doc && doc.clientLeft || body && body.clientLeft || 0);        event.screenY = event.clientY +          (doc && doc.scrollTop  || body && body.scrollTop  || 0) -          (doc && doc.clientTop  || body && body.clientTop  || 0 ); }     var element = document.getElementById("3d-div"); if (element) { element.style.height = event.screenY + "px"; element.style.width = event.screenX + "px"; }   }  });