MediaWiki:Vector.js

function columnAreaImage{ var divFooter; if (document.getElementById ) { divFooter= document.getElementById("footer"); } else if (document.all ) { divFooter= document.all["footer"]; } else { return; } var newdiv = document.createElement('div'); newdiv.setAttribute('id', 'columnAreaImage'); var footHeight = (divFooter.offsetHeight)+(divFooter.offsetTop); if(footHeight > 900) {   newdiv.style.top = footHeight - 408+"px"; } else {   return; }

newdiv.style.backgroundImage = "url(/images/a/aa/VectorSidebarInfosphere.png)"; newdiv.style.backgroundPosition = "bottom left"; newdiv.style.backgroundRepeat = "no-repeat"; newdiv.style.position = "absolute"; newdiv.style.left = "0px"; newdiv.style.width = "377px"; newdiv.style.height = "408px"; newdiv.style.zIndex = "-1" document.body.appendChild(newdiv); } addOnloadHook(columnAreaImage);

function randomiseMainPics{ if(wgTitle == "Main Page") {   var rand = Math.random; if(rand>0.6666) {     var mainRightBox = getElementbyClass(document.getElementsByTagName("td"), "mainRightBox"); mainRightBox[0].style.backgroundImage = "url(/images/4/45/VectorMainRightLeela.png)"; }   else if(rand>0.3333) {     var mainRightBox = getElementbyClass(document.getElementsByTagName("td"), "mainRightBox"); mainRightBox[0].style.backgroundImage = "url(/images/0/03/VectorMainRightProf.png)"; }   rand = Math.random; if(rand>0.6666) {     var mainBottomBox = getElementbyClass(document.getElementsByTagName("td"), "mainBottomBox"); mainBottomBox[0].style.backgroundImage = "url(/images/5/57/VectorMainBottomHedonism.png)"; }   else if(rand>0.3333) {     var mainBottomBox = getElementbyClass(document.getElementsByTagName("td"), "mainBottomBox"); mainBottomBox[0].style.backgroundImage = "url(/images/a/aa/VectorMainBottomHermes.png)"; }   rand = Math.random; if(rand>0.6666) {     var mainLeftBox = getElementbyClass(document.getElementsByTagName("td"), "mainLeftBox"); mainLeftBox[0].style.backgroundImage = "url(/images/0/0b/VectorMainLeftZoidberg.png)"; }   else if(rand>0.3333) {     var mainLeftBox = getElementbyClass(document.getElementsByTagName("td"), "mainLeftBox"); mainLeftBox[0].style.backgroundImage = "url(/images/0/0b/VectorMainLeftAmy.png)"; } } } addOnloadHook(randomiseMainPics);