1/************* BEGIN PRELOAD OF BACKGROUND IMAGES *************/ 2function doPreload() 3{ 4 var the_images = new Array('images/search/search-dunes.jpg','images/search/search-historical.jpg','images/search/search-iwo-jima.jpg','images/search/search-nebula.jpg','images/search/search-penguins.jpg','images/search/search-pyramids.jpg','images/search/search-the-arts.jpg','images/search/search-tiger.jpg','images/search/search-volcano.jpg','images/search/search-windmill.jpg'); 5 preloadImages(the_images); 6} 7 8function preloadImages(the_images_array) { 9 10 for(var loop = 0; loop < the_images_array.length; loop++) 11 { 12 var an_image = new Image(); 13 an_image.src = the_images_array[loop]; 14 } 15} 16/************* END PRELOAD OF BACKGROUND IMAGES *************/ 17 18 19/************* BEGIN FUNCTION TO CHANGE THE BACKGROUND IMAGE ON THE HOME PAGE *************/ 20function changeback(){ 21 var images = new Array(10); 22 images[0] = 'images/search/search-dunes.jpg'; 23 images[1] = 'images/search/search-historical.jpg'; 24 images[2] = 'images/search/search-iwo-jima.jpg'; 25 images[3] = 'images/search/search-nebula.jpg'; 26 images[4] = 'images/search/search-penguins.jpg'; 27 images[5] = 'images/search/search-pyramids.jpg'; 28 images[6] = 'images/search/search-the-arts.jpg'; 29 images[7] = 'images/search/search-tiger.jpg'; 30 images[8] = 'images/search/search-volcano.jpg'; 31 images[9] = 'images/search/search-windmill.jpg'; 32 33 var objDiv = document.getElementById("home-center-top"); 34 35 36 var i = Math.floor(Math.random() * images.length); 37 objDiv.style.backgroundImage = 'url(' + images[i] + ')'; 38 setTimeout('changeback()',3000); 39} 40/************* END FUNCTION TO CHANGE THE BACKGROUND IMAGE ON THE HOME PAGE *************/ 41 42 43/************* BEGIN FUNCTION TO SET FOCUS ON A PARTICULAR INPUT FIELD *************/ 44function setFocusOfElement(which){ 45 var theInputField = document.getElementById(which); 46 theInputField.focus(); 47} 48 49function setFocusElement(username,library) { 50 var theUserName = document.getElementById(username); 51 var theLibrary = document.getElementById(library); 52 53 //alert(document.loginForm.auth.value); 54 var authValue = document.loginForm.auth.value; 55 if(authValue == 'UidPassword') 56 theUserName.focus(); 57 else 58 theLibrary.focus(); 59 60} 61/************* END FUNCTION TO SET FOCUS ON A PARTICULAR INPUT FIELD *************/ 62 63/************* BEGIN FUNCTION TO HIDE AWAY AN ERROR MESSAGE AFTER 5 SECONDS *************/ 64/*** USE THIS CODE TO REMOVE THE ERROR MESSAGE 65hideawayerrorbox('error-classes'); -- THIS NEEDS TO BE PLACED IN THE ONLOAD EVENT WHEN THE ERROR MESSAGE APPEARS 66hideawayerrorbox -- THIS IS THE NAME OF THE FUNCTION 67error-classes -- THIS IS THE NAME OF THE DIV THAT IS TO HIDE AFTER 5 SECONDS 68***/ 69var theerrordiv; 70function hideawayerrorbox(which){ 71 theerrordiv = document.getElementById(which); 72 setTimeout('hideerror()',5000); 73} 74function hideerror(){ 75 theerrordiv.style.display = 'none'; 76} 77/************* END FUNCTION TO HIDE AWAY AN ERROR MESSAGE AFTER 5 SECONDS *************/ 78 79 80/************* BEGIN FUNCTION TO DETERMINE THE WIDTH OF THE FLOATING IMAGES SO THAT THE TEXT WILL WRAP *************/ 81function determineFloatWidth(theimage,thecontainer){ 82 var theimagebyid = document.getElementById(theimage); // THIS IS THE IMAGE THAT WE NEED TO DETERMINE THE SIZE FOR 83 var thefloatingcontainer = document.getElementById(thecontainer); // THIS IS THE FLOATING CONTAINER 84 thefloatingcontainer.style.width = (theimagebyid.width + 12) + "px"; // THIS SETS THE WIDTH OF THE CONTAINER TO THE WIDTH OF THE IMAGE PLUS 12px FOR THE PADDING ON BOTH THE LEFT AND RIGHT SIDE 85} 86/************* END FUNCTION TO DETERMINE THE WIDTH OF THE FLOATING IMAGES SO THAT THE TEXT WILL WRAP *************/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.