1 <HTML> 2 <SCRIPT LANGUAGE="JavaScript"> 3 <!-- 4 5 // Preload arrow images into an array 6 7 pic = new Array; 8 pic[0] = new Image(); 9 pic[0].src = "arnull.gif"; 10 pic[1] = new Image(); 11 pic[1].src = "ardown.gif"; 12 pic[2] = new Image(); 13 pic[2].src = "arup.gif"; 14 pic[3] = new Image(); 15 pic[3].src = "arleft.gif"; 16 pic[4] = new Image(); 17 pic[4].src = "arright.gif"; 18 19 var oldgrid = "A1"; 20 var isNetscape; 21 isNetscape = (navigator.appName == "Netscape"); 22 23 // Define object with building name, grid location, type of arrow, and description text 24 25 function Bldg(name,grid,arrow,desc) { 26 this.name = name; 27 this.grid = grid; 28 this.arrow = arrow; 29 this.desc = desc; 30 } 31 32 mapdat = new Array; 33 mapdat[0] = new Bldg(" -Select Building","A1",0,"); 34 mapdat[1] = new Bldg('50 Mooreland',"E7",3,"Home to Career Services, Alumni Office, and College Relations."); 35 mapdat[2] = new Bldg('Althouse Science Hall',"I2",1, "Science building."); 36 mapdat[3] = new Bldg('Bosler Hall',"K4",3,"Home to language departments, education, and instructional media."); 37 mapdat[4] = new Bldg('Holland Union Building',"H5",2,"The 'HUB' includes the bookstore, dining hall, and theatre."); 38 mapdat[5] = new Bldg('Schlechter Auditorium',"E3",4,"The ATS Auditorium hosts a variety of public events."); 39 mapdat[6] = new Bldg('South College',"L8",2, "Home to Computer Services."); 40 mapdat[7] = new Bldg('Waidner Admissions House',"I6",4,"Parking for visitors can be found in the rear."); 41 mapdat[8] = new Bldg('Waidner-Spahr Library',"F5",2,"The Waidner addition was completed in 1998."); 42 mapdat[9] = new Bldg('Weiss Center',"L5",1,"Home of music and art programs, Recital Hall, and the Trout Gallery."); 43 44 function BlankWin() { 45 return "<HTML><BODY BGCOLOR='White'></BODY></HTML>" 46 } 47 48 // Function that clears old arrow and places new one 49 50 function ShowBldg() { 51 window.maptop.document.images[oldgrid].src = pic[0].src; 52 dsub = window.mapform.document.listbldg.bldg.selectedIndex; 53 bsub = window.mapform.document.listbldg.bldg.options[dsub].value; 54 bldgpick = mapdat[bsub]; 55 if (isNetscape) {window.mapdesc.location = "blank.html"} 56 else {window.mapdesc.location = "javascript:BlankWin()";} 57 with (bldgpick) { 58 window.mapdesc.document.open(); 59 window.mapdesc.document.write("<HTML><BODY BGCOLOR='#FFFFFF'> <DL>"); 60 window.mapdesc.document.write("<FONT FACE='Arial, Helvetica,sans-serif'><DT> <B> " + name + " - </B>"); 61 window.mapdesc.document.write("<DD><FONT SIZE='-1'> " + desc + "<BR></FONT></DL> </FONT></BODY></HTML>"); 62 window.mapdesc.document.close(); 63 window.maptop.document.images[grid].src = pic[arrow].src; 64 oldgrid = grid; 65 } 66 } 67 68 // --> 69 </SCRIPT> 70 <FRAMESET ROWS="315,30,*" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0"> 71 <FRAME SRC=Ómapgrid.html" NAME="maptop" FRAMEBORDER="No" SCROLLING="No" NORESIZE MARGINWIDTH="1" MARGINHEIGHT="1"> 72 <FRAME SRC="mapshow.html" NAME="mapform" FRAMEBORDER="No" SCROLLING="No" NORESIZE MARGINWIDTH="1" MARGINHEIGHT="1"> 73 <FRAME SRC="blank.html" NAME="mapdesc" FRAMEBORDER="No" SCROLLING="No" NORESIZE MARGINWIDTH="1" MARGINHEIGHT="1"> 74 </FRAMESET> 75 </HTML>