//WhereAbout, 2001 07 03, as//----------------------------------------------------------------------// basic settingsvar visible,hidden,windowHeight,windowWidth,vScroll,eventListener;window.onerror=null;if (!document.getElementById && document.all) {document.getElementById = IEgetElementByID;}visible = 'visible';hidden = 'hidden';eventListener = {getElementBySelector : function (selector) {var selectedElements,selectorParts,documentElements,documentElementsLength,i;selectedElements = new Array();if (selector.match(/.+[\.#]/)) {selectorParts = selector.split(/[\.#]/);documentElements = document.getElementsByTagName(selectorParts[0]);documentElementsLength = documentElements.length;if (selector.indexOf('#') > 0) {selector = selectorParts[1];for (i=0;i < documentElementsLength;i++) {if (documentElements[i].Id == selector) {selectedElements.push(documentElements[i]);}}}else {selector = selectorParts[1];for (i=0;i < documentElementsLength;i++) {if (documentElements[i].className.indexOf(selector) > -1) {selectedElements.push(documentElements[i]);}}}}else if (selector.charAt(0) == '#') {selectedElements[0] = document.getElementById(selector.substr(1));}else if (selector.charAt(0) == '.') {documentElements = document.getElementsByTagName('*');selector = selector.substr(1);for (i=0;i < documentElements.length;i++) {if (documentElements[i].className.indexOf(selector) > -1) {selectedElements.push(documentElements[i]);}}}else {selector = (selector) ? selector : '*';selectedElements = document.getElementsByTagName(selector);}return selectedElements;},attachBehaviour : function (selector,eventName,callbackFunction) {var selectedElements,actionFunction,i;selectedElements = this.getElementBySelector(selector);if (selectedElements) {actionFunction = function (event) {eventListener.event = (event) ? event : window.event;eventListener.target = (eventListener.event.target) ? eventListener.event.target : eventListener.event.srcElement;if (!eval(callbackFunction)) {eventListener.event.returnValue = false;}else {eventListener.event.returnValue = true;}};for (i=0;i< selectedElements.length;i++) {if (selectedElements[i].addEventListener) {selectedElements[i].addEventListener(eventName,actionFunction,false);}else {try {selectedElements[i].attachEvent('on' + eventName,actionFunction);}catch(e) {eval('selectedElements[' + i + '].on' + eventName + '=' + actionFunction);}}}}}}function IEgetElementByID(ID) {return document.all[ID];}function NSgetElementByID(ID) {return NSfindElementByID(document,ID);}function NSfindElementByID(theCurrentLayer,ID) {if (theCurrentLayer.id == ID) { return theCurrentLayer;}var theLayerCount = theCurrentLayer.layers.length;for (var i = 0; i < theLayerCount; i++) { var theLayer = NSfindElementByID(theCurrentLayer.layers[i],ID); if (theLayer != null) {  return theLayer; }}return null;}// show Layerfunction showLAYER(LAYERname) {theLAYER=document.getElementById(LAYERname); theLAYER.style.visibility=visible;}// hide Layerfunction hideLAYER(LAYERname) {theLAYER=document.getElementById(LAYERname); theLAYER.style.visibility=hidden;}//----------------------------------------------------------------------// functions for LABEL on links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()", 600);}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;}theActiveLabel.moveLabel(mouseX+12,mouseY+4);}}function getMouseUp(e) {if(theActiveLabel){clearTimeout(theLabelDelay);theActiveLabel.LayerStyle.visibility=hidden;theActiveLabel.visibility=false;theActiveLabel=false;}}//----------------------------------------------------------------------// write layerfunction writeLAYER(theLAYER,theLAYERtext) { theLAYER.innerHTML=theLAYERtext;}//----------------------------------------------------------------------// functions for rolloversfunction ImageSwitch(theImage,theOnImage,theOffImage) {this.Image=theImage;this.OnImage=new Image();this.OnImage.src=theOnImage;this.OffImage=new Image();this.OffImage.src=theOffImage;this.OnStatus=false;this.switchImage=switchImage;}function switchImage() {if (this.OnStatus) { this.Image.src=this.OffImage.src; this.OnStatus=false;}else { this.Image.src=this.OnImage.src; this.OnStatus=true;}}//----------------------------------------------------------------------// WhereAbout specificfunction setVARIABLES() {theDATElayer=document.getElementById('DATElayer');theNOTElayer=document.getElementById('NOTElayer');theSLIDE=new Image(); theIconImage=document['PICT']; theMapImage=document['MAPimage']; thePrevImage=document['previousIMAGE']; theCurrentImage=document['currentIMAGE']; theNextImage=document['nextIMAGE'];}//----------------------------------------------------------------------// functions for slide showfunction showSLIDES(theDIRECTION) {if (theDIRECTION=="NEXT") { theCOUNTER-=1; if (theCOUNTER <0) {  theCOUNTER=theIDlist.length-1; }}else { theCOUNTER+=1; if (theCOUNTER>(theIDlist.length-1)) {  theCOUNTER=0; }}theIMAGEID=theIDlist[theCOUNTER];theNOTEtext=theNOTElist[theCOUNTER];//for search functiontheKEYWORDS=theKEYWORDlist[theCOUNTER].split(",");if (theKEYWORDS !="") { theKEYWORDS="<form action=\"query.php\" method=\"post\"><select name=\"a\"><option label=\"More...\" value=\"0\">More...</option><option value=\"NULL\"></option><option>" + theKEYWORDS.join("<option>") + "<option value=\"NULL\"></option><option label=\"same Time\" value=\"T\">same Time</option><option label=\"same Location\" value=\"L\">same Location</option></select> <input type=\"hidden\" name=\"n\" value=\"" + theIMAGEID + ".JPG" + "\"></form>";}//theKEYWORDS="";if (theIMAGEID=="Pblank") { theTIME=""; theDATE="<B>continue clicking</B><BR>to restart the loop!"; theSLIDE.src="blank.GIF"; theMapImage.src=theSLIDE.src; thePrevImage.src=theSLIDE.src; theCurrentImage.src=theSLIDE.src; theNextImage.src=theSLIDE.src;}else { theDATE=theIMAGEID.substring(1,3)+"."+theIMAGEID.substring(3,5)+"."+theIMAGEID.substring(5,7); theTIME=theIMAGEID.substring(7,9)+":"+theIMAGEID.substring(9,11); theSLIDE.src=(theIMAGEID.substring(1,theIMAGEID.length)+".GIF"); theMapImage.src=theSLIDE.src; //current image theSLIDE.src=(theIMAGEID+".JPG"); theCurrentImage.src=theSLIDE.src; //previous image theIMAGEID=theIDlist[theCOUNTER+1]; theSLIDE.src=(theIMAGEID+".JPG"); thePrevImage.src=theSLIDE.src; //next image theIMAGEID=theIDlist[theCOUNTER-1]; if ((theCOUNTER-1)<0) {  theSLIDE.src="blank.GIF"; } else {  theSLIDE.src=(theIMAGEID+".JPG"); } theNextImage.src=theSLIDE.src; // note text with search function theNOTEtext="<P CLASS=\"EP156\">" + theNOTEtext + "</P>" + theKEYWORDS +"<BR><BR><P CLASS=\"EP156\"><BR><BR><BR><BR><B>map:</B> &copy; <A HREF=\"http://www.mapion.co.jp/\">mapion</A>, <A HREF=\"http://www.toppan.co.jp/\">Toppan</A><BR>1997-1999</P>";  //theNOTEtext="<P CLASS=\"EP156\">" + theNOTEtext + "<BR><BR><BR><BR><BR><BR><B>map:</B> &copy; <A HREF=\"http://www.mapion.co.jp/\">mapion</A>, <A HREF=\"http://www.toppan.co.jp/\">Toppan</A><BR>1997-1999</P>";}theDATEtext=("<P CLASS=\"E\">"+theDATE+"<BR><B>"+theTIME+"</B></P>");writeLAYER(theDATElayer,theDATEtext);writeLAYER(theNOTElayer,theNOTEtext);eventListener.attachBehaviour('select','change','checkEmptySelection()');}function selectSLIDE(theMAXhour) {		if ((extractHOUR(theIDlist[theCOUNTER]))<12) {			theMAXhour+=12;		}		for (counter=1;counter<3;counter++) {			thePASThour=findSLIDE(theMAXhour);			if (thePASThour>=theMAXhour||thePASThour<(theMAXhour-3)) {				// no slide available in initial scope				if (theMAXhour>12) {					theMAXhour-=12;				}				else {					theMAXhour+=12;				}			}			else {				break			}		}		if (thePASThour<theMAXhour&&thePASThour>=(theMAXhour-3)) {			// slide available			theCOUNTER=(INDEX-1);			alert(theCOUNTER);			showSLIDES('PREVIOUS')		}}function findSLIDE(theMAXhour) {for (INDEX=0; INDEX<theIDlist.length-1; INDEX++) { thePASThour=(extractHOUR(theIDlist[INDEX])); if (thePASThour<theMAXhour&&thePASThour>=(theMAXhour-3)) {  break }}return thePASThour;}function extractHOUR(theTIMESTAMP) {return(eval(theTIMESTAMP.substring(7,9)));}function reset() {theCOUNTER=-1;showSLIDES('PREVIOUS')}//----------------------------------------------------------------------// functions for external windowsfunction displayEXTERNALmap(theMAPurl) {if (!theMAPurl) {theMAPurl = theURLlist[theCOUNTER];}displayEXTERNAL(theMAPurl,'MAP','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=480,height=480');}function displayEXTERNAL(theLINK,theWINDOW,thePARAMETER) {externalWINDOW=window.open(theLINK,theWINDOW,thePARAMETER);externalWINDOW.focus();}//----------------------------------------------------------------------// functions for a popUP menu with title line followed by dividerfunction checkEmptySelection() {if (eventListener.target.value == 'NULL' | eventListener.target.value.charAt(0) == '0') {eventListener.target.selectedIndex = 0;}else {eventListener.target.form.submit();}return true;}