.
* (2) Insert a container element that can accept a background-image style,
* such as
or
, where you want the image gallery to appear,
* and make sure you give it an id="imageContainer".
* (3) Inside the imageContainer, insert your first image, making sure that
* the tag gets both a name="SlideShow" and an id="SlideShow"
* attribute. So the code in your body should look like this:
*
* (4) Add an onload event handler to your document's tag to start
* the slideshow:
*
*********************************************************************************
*/
// Global configuration variables
// Edit values of these variables to control behavior of the slideshow.
// List names of images to be displayed in the imageList array
var imageList = new
Array("images/tobaccoad/lucky_strike_long_0.jpg","images/tobaccoad/lucky_strike_long_1.jpg");
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Global variables (do not edit these)
var currentIndex = 0;
var imageGallery = new Array();
for(var x = 0; x < imageList.length; x++){
imageGallery[x] = new Image();
imageGallery[x].src = imageList[x];
}
function checkOpacitySupport(){
// Function checks whether the browser supports w3C-style opacity,
// or IE7-style opacity via object.style.filter=alpha(opacity=##).
// If it finds neither method supported, it returns "Plain Vanilla",
// i.e., no support for opacity.
var returnValue = "Plain Vanilla";
if(document.defaultView && document.defaultView.getComputedStyle){
if(document.defaultView.getComputedStyle(document.images[0],null).getPropertyValue("opacity")){
returnValue = "Firefox-style";
}
} else {
try{
document.images[0].style.filter = "alpha(opacity=100)";
returnValue = "IE7-style";
} catch(e){
// Error. filter/alpha opacity not supported. Do nothing.
}
}
return returnValue;
}
function runSlideShow(){
document.images.SlideShow.src = imageGallery[currentIndex].src;
var opacitySupport = checkOpacitySupport();
if(opacitySupport == "Firefox-style"){
var container = document.getElementById("imageContainer");
var imageHeight = imageGallery[0].height + "px";
var imageWidth = imageGallery[0].width + "px";
container.style.height = imageHeight;
container.style.width = imageWidth;
if(imageGallery.length > 1){
container.style.backgroundImage = "url('" + imageGallery[1].src + "')";
} else {
container.style.backgroundImage = "url('" + imageGallery[0].src + "')";
}
container.style.backgroundRepeat = "no-repeat";
document.images.SlideShow.style.opacity = "1.0";
var timerID = setTimeout("changeImageFF()",slideShowSpeed); // second arg is display time.
} else if(opacitySupport == "IE7-style"){
var timerID = setTimeout("changeImageIE()",slideShowSpeed); // second arg is display time.
} else {
var timerID = setTimeout("changeImageOther()",slideShowSpeed); // second arg is time between image-swaps
}
}
function changeImageFF(){
var pic = document.getElementById("SlideShow");
var container = document.getElementById("imageContainer");
var opacity = pic.style.opacity;
if(opacity > 0){
pic.style.opacity -= 0.01;
t = setTimeout("changeImageFF()",crossFadeDuration*10);
} else {
var oldIndex = currentIndex;
if(currentIndex < imageGallery.length - 1){
currentIndex++;
} else {
currentIndex = 0;
}
pic.src = imageGallery[currentIndex].src;
pic.style.opacity = 1.0;
container.style.backgroundImage = "url('" + imageGallery[oldIndex].src + "')";
t = setTimeout("changeImageFF()",slideShowSpeed);
}
}
function changeImageIE(){
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
document.images.SlideShow.src = imageGallery[currentIndex].src;
document.images.SlideShow.filters.blendTrans.Play();
if(currentIndex < imageGallery.length - 1){
currentIndex++
} else {
currentIndex = 0;
}
t = setTimeout("changeImageIE()", slideShowSpeed); // Call changeImageIE recursively
}
function changeImageOther(){
// This function does a simple image-swap without trasition effects, for browsers
// that support neither FF-style "image.style.opacity" nor IE7-style "image.style.filters".
if(currentIndex < imageGallery.length - 1){
currentIndex++;
} else {
currentIndex = 0;
}
document.images.SlideShow.src = imageGallery[currentIndex].src;
t = setTimeout("changeImageOther()",slideShowSpeed); // function recursively calls itself
}
// END image gallery functions
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i
New Mobile Devices Portal
The Library has created a new Mobile Devices portal in response to the incorporation of mobile devices by physicians, students, and clinical staff into the health sciences environment. Our librarians have selected resources and organized them according to device for your convenience. This portal will be updated continuously as new applications and devices are released.
Librarians Inducted into Honor Society
Mark Baggett, Assistant Systems Librarian and John Cyrus, Liaison Librarian, are being inducted into the international library and information studies honor society Beta Phi Mu at LSU in Baton Rouge . Beta Phi Mu was founded in 1948 by a group of leading librarians and library educators to recognize and encourage scholastic achievement among library and information studies students. Eligibility for membership is by invitation of the faculty from an American Library Association accredited professional degree program.
Focus on Kids’ Health
Librarians Deidra Woodson and Donna Timm will visit public libraries in January to present story hours to the children. Stories and activities will focus on germs and how to fight them. These events are part of the Library’s community outreach program that is sponsored by a grant from the regional office of the National Network of Libraries of Medicine. Click here for more information.
Librarians Awarded NLM Grant
The Library was recently awarded a Library Technology grant from the regional office of the National Library of Medicine. Principal investigators for the grant are Dee Jones, Head of Cataloging; Deidra Woodson, Metadata and Digitization Librarian; and Mararia Adams, Assistant Director/Head of Systems. This award will be used to fund a project documenting the history of LSUHSC-S and its impact on the history of the local medical community. New digital technologies will be used to identify and preserve materials, resulting in a graphically oriented history that is electronically accessible.
Librarian to Serve State Organization
David Duggar, LSUHSC-S Reference Librarian, was recently elected Treasurer of the Health Sciences Library Association of Louisiana (HSLAL). His two-year term began in October 2009. The purpose of HSLAL is to encourage and promote cooperation and communication among the librarians of health science institutions in Louisiana.
Library Director Elected to Board
Congratulations to Marianne Comegys, Library Director, who was recently elected to the Board of Directors of the Medical Library Association (MLA). Her three-year term will begin in May 2010. The Board of Directors has general supervision of the business of MLA, a non-profit, educational organization of more than 1100 institutions and 3600 individual members in the health sciences information field.
Librarian to Advise NEJM
Julia Esparza, LSUHSC-S Clinical Medical Librarian, has been appointed to the New England Journal of Medicine Library Advisory Board. She will serve on the Board for a term of three years. The nine-member board advises the publisher on new products, services, and features pertaining to the library community; provides insights and suggestions to improve the service the publisher offers to the academic community; and provides the customer perspective on publishing issues.
AMA’s Backfiles Now Available!
The Library has recently purchased the journal backfiles collection from the American Medical Association. This purchase was a collaborative project with the LSUHSC-New Orleans Library. The backfiles provide you with electronic access to every issue of AMA’s journals from their inception: