// --------- Brent Farris --------- \\ //           jFarris  1.0           \\  
var fadeAmount = 0; var fadeSpeed = 0; var duration = 0; var children = new Array();  function jfImgFade(parentId, fadeAmount, fadeSpeed, duration) { this.children = document.getElementById(parentId).getElementsByTagName("div");  if (fadeAmount == "large") this.fadeAmount = 0.5; else if (fadeAmount == "medium") this.fadeAmount = 0.25; else if (fadeAmount == "small") this.fadeAmount = 0.25; else if (fadeAmount == "subtle") this.fadeAmount = 0.025; else this.fadeAmount = fadeAmount;  if (fadeSpeed == "fast") this.fadeSpeed = 15; else if (fadeSpeed == "mid") this.fadeSpeed = 30; else if (fadeSpeed == "slow") this.fadeSpeed = 50; else if (fadeSpeed == "crawl") this.fadeSpeed = 100; else { var breakDown = 1 / fadeAmount; this.fadeSpeed = fadeSpeed / breakDown;  }  if (duration == "long") this.duration = 10000; else if (duration == "medium") this.duration = 2000; else if (duration == "short") this.duration = 2000; else if (duration == "tiny") this.duration = 500; else this.duration = duration;  setTimeout("nxtimg(0, -1)", 100); } function nxtimg(imgid, imgid2) { if (children[imgid].style.opacity < 1) { var opa = children[imgid].style.opacity; var op = parseFloat(opa); op += fadeAmount; var fop = op * 10; children[imgid].style.opacity = op; children[imgid].style.filter = '“alpha(opacity=' + fop + ')”';  if (imgid2 != -1) { var opa2 = children[imgid2].style.opacity; var op2 = parseFloat(opa2); op2 -= fadeAmount; var fop2 = op2 * 10; children[imgid2].style.opacity = op2; children[imgid2].style.filter = '“alpha(opacity=' + fop2 + ')”'; }  setTimeout("nxtimg("+ imgid +", "+ imgid2 +")", fadeSpeed);  } else { imgid += 1; imgid2 += 1;  if (imgid == children.length) imgid = 0; if (imgid2 == children.length) imgid2 = 0;  setTimeout("nxtimg("+ imgid +", "+ imgid2 +")", duration); } }
