//IIDj Summer Academy 2003, as 2003 06//ALBUM//----------------------------------------------------------------------function getSlides() {theIndex = 0;theImageCount = ImageList.length;}function showSlides(theImageName,theDirection) {if (theDirection == 1) {theIndex++;}else if (theDirection == -1) {theIndex--;}else {showNewSlideGroup(theDirection);}theIndex = checkIndex(theIndex,theImageCount);document.getElementsByName('DIARY')[0].src=ImageFolderPath+ImageList[theIndex];}function showNewSlideGroup(theDirection) {var theRegEx = /[^\d]*/;var theCurrentImagePrefix = theRegEx.exec(ImageList[theIndex])[0];if (theDirection == 'N') {// next group of imagesif (theIndex == ImageList.length - 1) {theIndex = 0;}else {theIndex++;var ImageListEnd = ImageList.slice(theIndex,ImageList.length);var L = ImageListEnd.length;for (var i=0;i<L;i++) {if (theCurrentImagePrefix != theRegEx.exec(ImageListEnd[i])[0]) {theIndex += (i);break;}}if (i == L) {theIndex = 0;}}}else {theIndex--;var theRunningImagePrefix = theCurrentImagePrefix// previous group of imagesif (theIndex < 0) {getFromEnd(theRegEx);}else {var ImageListEnd = ImageList.slice(0,theIndex + 1);var L = ImageListEnd.length - 1;var theNewFlag = false;for (var i=L;i>-1;i--) {if (theRunningImagePrefix != theRegEx.exec(ImageListEnd[i])[0]) {if (theNewFlag) {break;}else {theRunningImagePrefix = theRegEx.exec(ImageListEnd[i]);theNewFlag = true;}}}if (theRunningImagePrefix == theCurrentImagePrefix) {getFromEnd(theRegEx);}else {theIndex = i + 1;}}}}function getFromEnd(theRegEx) {var L = ImageList.length - 1;var theRunningImagePrefix = theRegEx.exec(ImageList[L]);for (var i=L-1;i>-1;i--) {if (theRunningImagePrefix != theRegEx.exec(ImageList[i])[0]) {theIndex = i + 1;break;}}if (i < 0) {theIndex = 0;}}function checkIndex(theIndex,theImageCount){if (theIndex == theImageCount){return 0;}else if (theIndex < 0){return theImageCount - 1;}return theIndex}//----------------------------------------------------------------------function initLinkLabel(){document.onmouseup=getMouseUp;theActiveLabel=false;}function LinkLabel(theLabelName) {this.Name=theLabelName;this.Layer=document.getElementById(this.Name);this.Text="";this.visibility=false;this.LayerStyle=this.Layer.style;this.showLabel=showLabel;this.hideLabel=hideLabel;this.moveLabel=moveLabel;return this;}function showLabel(theTITLE) {theActiveLabel = this;this.visibility=true;this.Layer.innerHTML=(theTITLE+"");theLabelDelay=setTimeout("this.activateLABEL()", 100);}function hideLabel() {getMouseUp();}function activateLABEL() {if (theActiveLabel.visibility) {theActiveLabel.LayerStyle.visibility=visible;}}function moveLabel(theLeft,theTop) {this.LayerStyle.left=theLeft+"px";this.LayerStyle.top=theTop + "px";}function getMouseMove(e) {if (theActiveLabel) {if (e.x) {mouseX=event.x;mouseY=event.y;}else if (e.pageX){mouseX=e.pageX;mouseY=e.pageY;}//if (IE5) {//mouseX=mouseX+document.body.scrollLeft;//mouseY=mouseY+document.body.scrollTop;//}theActiveLabel.moveLabel(mouseX+12,mouseY+4);}}function getMouseUp(e) {if(theActiveLabel){clearTimeout(theLabelDelay);theActiveLabel.LayerStyle.visibility=hidden;theActiveLabel.visibility=false;theActiveLabel=false;}}