Login   Register  
PHP Classes
elePHPant
Icontem

File: images.js

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Carlos Falo Hervás  >  rollover  >  images.js  >  Download  
File: images.js
Role: Application script
Content type: text/plain
Description: Javascript functions required (from old dynlayer api)
Class: rollover
Basic rollover images
Author: By
Last change:
Date: 2001-04-18 07:52
Size: 676 bytes
 

Contents

Class file image Download
// Image Functions
// changeImage() and preload() functions for rollovers and GIF animation
// 19990326

// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynapi/

function preload(imgObj,imgSrc) {
    if (document.images) {
        eval(imgObj+' = new Image()')
        eval(imgObj+'.src = "'+imgSrc+'"')
    }
}
function changeImage(layer,imgName,imgObj) {
    if (document.images) {
        if (document.layers && layer!=null) eval('document.layers["'+layer+'"].document.images["'+imgName+'"].src = '+imgObj+'.src')
        else document.images[imgName].src = eval(imgObj+".src")
    }
}