function mousemove(id,over){ colors = Array("white","#85000f") document.getElementById(id).style.backgroundColor = colors[over]; document.getElementById(id).style.color = colors[1-over]; } function year(yearNumber, filePath ){ this.yearNumber = yearNumber; this.filePath = filePath; } function flip(change){ temp = new Array(); temp[0] = nowBrowsing[0]; temp[1] = nowBrowsing[1]; nowBrowsing[1] += change; if (nowBrowsing[1] >= galleryContents[nowBrowsing[0]].filePath.length){ nowBrowsing[0] ++; nowBrowsing[1] = 0; } else if(nowBrowsing[1] < 0){ nowBrowsing[0] --; try{ nowBrowsing[1] = galleryContents[nowBrowsing[0]].filePath.length -1; } catch(err){} } if (nowBrowsing[0] < 0 || nowBrowsing[0] >= galleryContents.length){ nowBrowsing = temp; return; } setCookie("nowBrowsing_0",nowBrowsing[0].toString(),7); setCookie("nowBrowsing_1",nowBrowsing[1].toString(),7); displayImage(); } function displayImage(){ document.getElementById('pictureSlot').innerHTML = "" document.getElementById("displayYear").innerHTML = galleryContents[nowBrowsing[0]].yearNumber.toString(); document.getElementById("maxPic").innerHTML = galleryContents[nowBrowsing[0]].filePath.length; document.getElementById("thisPic").innerHTML = nowBrowsing[1]+1; } function adjustSize(){ thisImg = document.getElementById("objectPic") var width = thisImg.width; var height = thisImg.height; var ratio = height / width; width = 650 height = 650 * ratio thisImg.width = width; thisImg.height = height; thisImg.style.display = 'inline'; } function loading(){ numberOfDots ++; if(numberOfDots == 4){ numberOfDots = 0 } loadingText = "loading" for(i = 0; i < numberOfDots; i++){ loadingText += "."; } document.getElementById("loading").innerHTML = loadingText } numberOfDots = 0 nowBrowsing = Array(0,0)