window.addEventListener('mousemove', event => { var x = event.clientX; var y = event.clientY; var move = document.getElementsByClassName("workthumb"); for (i = 0; i < move.length; i++) { move[i].style.left = x+'px'; move[i].style.top = y+'px'; } }); var background = document.getElementById("background"); background.addEventListener("change", function() { if(background.value == "white"){ document.body.style.background = "#ffffff"; } else if (background.value == "black"){ document.body.style.background = "#000000"; } else if (background.value == "red"){ document.body.style.background = "#ff0000"; } else if (background.value == "green"){ document.body.style.background = "#00ff00"; } else if (background.value == "blue"){ document.body.style.background = "#0000ff"; }else if (background.value == "windowsxp"){ document.body.style.backgroundImage = "url('/static/images/windowsxp.jpeg')"; }else if (background.value == "osxgalaxy"){ document.body.style.backgroundImage = "url('/static/images/osxgalaxy.jpeg')"; }else if (background.value == "ubuntu1010"){ document.body.style.backgroundImage = "url('/static/images/ubuntu1010.jpeg')"; }else if (background.value == "windows98"){ document.body.style.backgroundImage = "url('/static/images/windows98.jpeg')"; }else if (background.value == "windows10"){ document.body.style.backgroundImage = "url('/static/images/windows10.jpeg')"; } }); var foregroundimg = document.getElementById("foregroundimg"); var foreground = document.getElementById("foreground"); foreground.addEventListener("change", function() { if(foreground.value == "malevich"){ foregroundimg.removeAttribute("width"); foregroundimg.setAttribute('height', '100%'); foregroundimg.src = "/static/images/malevich.png"; } else if (foreground.value == "bruegel"){ foregroundimg.removeAttribute("height"); foregroundimg.setAttribute('width', '100%'); foregroundimg.src = "/static/images/bruegel.png"; } else if (foreground.value == "luegt"){ foregroundimg.removeAttribute("height"); foregroundimg.setAttribute('width', '100%'); foregroundimg.src = "/static/images/luegt.png"; } else if (foreground.value == "metzger"){ foregroundimg.removeAttribute("height"); foregroundimg.setAttribute('width', '100%'); foregroundimg.src = "/static/images/metzger.png"; } else if (foreground.value == "grupaTOK"){ foregroundimg.removeAttribute("height"); foregroundimg.setAttribute('width', '100%'); foregroundimg.src = "/static/images/grupaTOK.png"; }else if (foreground.value == "steiger"){ foregroundimg.removeAttribute("height"); foregroundimg.setAttribute('width', '97%'); foregroundimg.src = "/static/images/steiger.png"; } else if (foreground.value == "social"){ foregroundimg.removeAttribute("height"); foregroundimg.setAttribute('width', '100%'); foregroundimg.src = "/static/images/social.png"; } else if (foreground.value == "flynt" ){ foregroundimg.removeAttribute("height"); foregroundimg.setAttribute('width', '100%'); foregroundimg.src = "/static/images/flynt.png"; } else if (foreground.value == "none"){ foregroundimg.src = " "; } });