// 'blank' images for second row buttons var img1_0 = new Image(118,18), img2_0 = new Image(118,18); var img3_0 = new Image(118,18), img4_0 = new Image(118,18); var img5_0 = new Image(118,18), img6_0 = new Image(118,18); img1_0.src = "images/glr1-2-0.gif"; img2_0.src = "images/glr2-2-0.gif"; img3_0.src = "images/glr3-2-0.gif"; img4_0.src = "images/glr4-2-0.gif"; img5_0.src = "images/glr5-2-0.gif"; img6_0.src = "images/glr6-2-0.gif"; // images for second row buttons var img1_1 = new Image(118,18), img2_1 = new Image(118,18); var img3_1 = new Image(118,18), img4_1 = new Image(118,18); var img5_1 = new Image(118,18), img6_1 = new Image(118,18); var img1_2 = new Image(118,18), img2_2 = new Image(118,18); var img3_2 = new Image(118,18), img4_2 = new Image(118,18); var img5_2 = new Image(118,18), img6_2 = new Image(118,18); var img1_3 = new Image(118,18), img2_3 = new Image(118,18); var img3_3 = new Image(118,18), img4_3 = new Image(118,18); var img5_3 = new Image(118,18), img6_3 = new Image(118,18); var img1_4 = new Image(118,18), img2_4 = new Image(118,18); var img3_4 = new Image(118,18), img4_4 = new Image(118,18); var img5_4 = new Image(118,18), img6_4 = new Image(118,18); // url arrays for second row buttons var urls1 = new Array(), urls2 = new Array(); var urls3 = new Array(), urls4 = new Array(); // base url baseURL = "http://www.math.lsa.umich.edu/~glarose/"; // current projects images var proj0 = new Image(122,18); proj0.src = "images/glr6-1.gif"; var proj1 = new Image(122,18); proj1.src = "images/glr6-1a.gif"; // status of second row buttons var onStatus = 0; // timeout number of current timeout var timeoutID; function swapimg(state,img) { // basic image swapping function // state = 0 or 1 for 'off' or 'on' image // img = name of the image to swap for; we always use the // current project image projN eval("document." + img).src = eval('proj' + state).src; return 1; } function newImages(num) { // change images and links in second row. // num = number of row that is currently moused for(var i = 1; i<=6; i++) { // change images eval("document.linkimg"+i+"2").src = eval("img"+i+"_"+num).src; // change links; would like to do this without hard reference to // link number document.links[2*i-1].href = eval("urls" + num)[i]; } onStatus=1; if ( defined(timeoutID) ) { clearTimeout(timeoutID); } return 1; } function chgStatus(status) { // reset status flag onStatus=status; if ( defined(timeoutID) ) { clearTimeout(timeoutID); } if ( status == 0 ) { timeoutID = setTimeout('clearImages(onStatus)',150); } } function clearImages(status) { // check status; if status = 0, revert images and links in second // row to blank images for(var i = 1; i<=6; i++) { // change images eval("document.linkimg"+i+"2").src = eval("img"+i+"_0").src; // change links; would like to do this without hard reference to // link number document.links[2*i-1].href = baseURL; } return 1; } function loadImages() { // // image names are row_imageFlag; column is always 2 // img1_1.src = "images/glr1-2-1.gif"; img2_1.src = "images/glr2-2-1.gif"; img3_1.src = "images/glr3-2-1.gif"; img4_1.src = img4_0.src; img6_1.src = img6_0.src; img5_1.src = "images/glr5-2-1.gif"; img1_2.src = "images/glr1-2-2.gif"; img2_2.src = "images/glr2-2-2.gif"; img3_2.src = "images/glr3-2-2.gif"; img4_2.src = "images/glr4-2-2.gif"; img5_2.src = "images/glr5-2-2.gif"; img6_2.src = "images/glr6-2-2.gif"; img1_3.src = img1_0.src; img5_3.src = img5_0.src; img2_3.src = "images/glr2-2-3.gif"; img3_3.src = "images/glr3-2-3.gif"; img4_3.src = "images/glr4-2-3.gif"; img6_3.src = img6_0.src; img1_4.src = img1_0.src; img2_4.src = img2_0.src; img3_4.src = "images/glr3-2-4.gif"; img4_4.src = "images/glr4-2-4.gif"; img5_4.src = "images/glr5-2-4.gif"; img6_4.src = img6_0.src; // // load URL arrays // urls1[0] = ""; // we don't use this urls1[1] = "courseinfo/calc"; urls1[2] = "courseinfo/diffeq"; urls1[3] = "courseinfo/model"; urls1[4] = baseURL; urls1[5] = "courseinfo/portfolios"; urls1[6] = baseURL; urls2[0] = ""; // we don't use this urls2[1] = "classes/calcI"; urls2[2] = "classes/calcII"; urls2[3] = "classes/calcIII"; urls2[4] = "classes/diffeq"; urls2[5] = "classes/model"; urls2[6] = "classes/linalg"; urls3[0] = ""; // we don't use this urls3[1] = baseURL; urls3[2] = "http://archives.math.utk.edu/projnext/"; urls3[3] = "pnext/sections/"; urls3[4] = "pnext/nextinfo.html"; urls3[5] = baseURL; urls3[5] = baseURL; urls4[0] = ""; // we don't use this urls4[1] = baseURL; urls4[2] = baseURL; urls4[3] = "htmlinfo/wkshops/html/"; urls4[4] = "htmlinfo/wkshops/web/"; urls4[5] = "htmlinfo/"; urls4[6] = baseURL; } function defined(obj) { if ( obj == null ) { return false; } else { return true; } }