var fotoflowInterval = null; var fotoflowNewValue = 0; function imgScrollLeft(autoScroll) { var which = $('fotoflowImgContainer'); if (fotoflowNewValue < 0) { if (!autoScroll) { fotoflowNewValue += 300; } if (fotoflowNewValue == 0) { $('fotoflowScrollLeft').style.display = "none"; } $('fotoflowScrollRight').style.display = "block"; which.style.zIndex = 100; $('resultListRow' + ((-fotoflowNewValue / 300) + 2)).className = "carrow"; $('resultListRow' + ((-fotoflowNewValue / 300) + 1)).className = "carrow fotoflowSelected"; } if (fotoflowInterval != null) { clearInterval(fotoflowInterval); fotoflowInterval = null; } fotoflowInterval = setInterval(function () { var curValue = parseInt(which.style.marginLeft); if (isNaN(curValue)) { curValue = 0; } if (curValue < 0) { curValue += 25; if (curValue >= fotoflowNewValue) { curValue = fotoflowNewValue; clearInterval(fotoflowInterval); fotoflowInterval = null; which.style.zIndex = 1; } which.style.marginLeft = curValue + "px"; $('fotoflow_' + ((-fotoflowNewValue / 300) + 2) + '_pic').style.width = (170 + ((130 / 300) * (300 + (curValue - fotoflowNewValue)))) + "px"; $('fotoflow_' + ((-fotoflowNewValue / 300) + 2) + '_pic').style.marginTop = (54 - ((54 / 300) * (300 + (curValue - fotoflowNewValue)))) + "px"; setOpacity($('fotoflow_' + ((-fotoflowNewValue / 300) + 2) + '_text'), (1 / 300) * (curValue - fotoflowNewValue) + 1); $('fotoflow_' + ((-fotoflowNewValue / 300) + 2) + '_text').style.display = (((1 / 300) * (curValue - fotoflowNewValue) + 1) == 0 ? "none" : "block"); $('fotoflow_' + ((-fotoflowNewValue / 300) + 3) + '_pic').style.width = (300 - ((130 / 300) * (300 + (curValue - fotoflowNewValue)))) + "px"; $('fotoflow_' + ((-fotoflowNewValue / 300) + 3) + '_pic').style.marginTop = ((54 / 300) * (300 + (curValue - fotoflowNewValue))) + "px"; setOpacity($('fotoflow_' + ((-fotoflowNewValue / 300) + 3) + '_text'), (-1 / 300) * (curValue - fotoflowNewValue)); $('fotoflow_' + ((-fotoflowNewValue / 300) + 3) + '_text').style.display = ((-1 / 300) * (curValue - fotoflowNewValue) == 0 ? "none" : "block"); } }, 20); } function imgScrollRight(max, autoScroll) { var which = $('fotoflowImgContainer'); if (fotoflowNewValue > -(((max + 1) - 2) * 300)) { if (!autoScroll) { fotoflowNewValue -= 300; } if (fotoflowNewValue == -((max - 1) * 300)) { $('fotoflowScrollRight').style.display = "none"; } $('fotoflowScrollLeft').style.display = "block"; which.style.zIndex = 100; $('resultListRow' + (-fotoflowNewValue / 300)).className = "carrow"; $('resultListRow' + ((-fotoflowNewValue / 300) + 1)).className = "carrow fotoflowSelected"; } if (fotoflowInterval != null) { clearInterval(fotoflowInterval); fotoflowInterval = null; } fotoflowInterval = setInterval(function () { var curValue = parseInt(which.style.marginLeft); if (isNaN(curValue)) { curValue = 0; } if (curValue > -(((max + 1) - 2) * 300)) { curValue -= 25; if (curValue <= fotoflowNewValue) { curValue = fotoflowNewValue; clearInterval(fotoflowInterval); fotoflowInterval = null; which.style.zIndex = 1; } which.style.marginLeft = curValue + "px"; $('fotoflow_' + ((-fotoflowNewValue / 300) + 1) + '_pic').style.width = (300 - ((130 / 300) * (300 + (fotoflowNewValue - curValue)))) + "px"; $('fotoflow_' + ((-fotoflowNewValue / 300) + 1) + '_pic').style.marginTop = ((54 / 300) * (300 + (fotoflowNewValue - curValue))) + "px"; setOpacity($('fotoflow_' + ((-fotoflowNewValue / 300) + 1) + '_text'), (-1 / 300) * (fotoflowNewValue - curValue)); $('fotoflow_' + ((-fotoflowNewValue / 300) + 1) + '_text').style.display = ((-1 / 300) * (fotoflowNewValue - curValue) == 0 ? "none" : "block"); $('fotoflow_' + ((-fotoflowNewValue / 300) + 2) + '_pic').style.width = (170 + ((130 / 300) * (300 + (fotoflowNewValue - curValue)))) + "px"; $('fotoflow_' + ((-fotoflowNewValue / 300) + 2) + '_pic').style.marginTop = (54 - ((54 / 300) * (300 + (fotoflowNewValue - curValue)))) + "px"; $('fotoflow_' + ((-fotoflowNewValue / 300) + 2) + '_text').style.display = "block"; setOpacity($('fotoflow_' + ((-fotoflowNewValue / 300) + 2) + '_text'), (1 / 300) * (fotoflowNewValue - curValue) + 1); $('fotoflow_' + ((-fotoflowNewValue / 300) + 2) + '_text').style.display = (((1 / 300) * (fotoflowNewValue - curValue) + 1) == 0 ? "none" : "block"); } }, 20); } function fotoflowTo(img, max) { /* var which = $('fotoflowImgContainer'); if (fotoflowInterval != null) { clearInterval(fotoflowInterval); fotoflowInterval = null; } var curValue = parseInt(which.style.marginLeft); if (isNaN(curValue)) { curValue = 0; } fotoflowNewValue = -(img - 1) * 300; if (curValue < fotoflowNewValue) { imgScrollLeft(true); } else if (curValue > fotoflowNewValue) { imgScrollRight(max, true); } */ return; }