/* rollover.js
last edited 27112000 by Ian (ian@moocow.co.uk)

functions supplied by this file -

--------
preload(imgObj,imgSrc)
load image 'imgSrc' into the object 'imgObj'

e.g.
for (var i=1;i<=6;i++) {preload('mainmenu_'+i,'images/mainmenu_'+i+'.gif')}
--------

--------
imgOn(imgObj,pic,layers)
replace the image 'pic' in layer 'layers' with the image stored in
object imgObj.

e.g.
imgOn('mainmenu_2','button1','document.menubox1')
(if no layers are used, or the page is only to be viewed on ie4+ or
ns6+ then set the layers attribute to '')
--------
*/



// begin functions

function preload(imgObj,imgSrc) {
        eval(imgObj+' = new Image()')
        eval(imgObj+'.src = "'+imgSrc+'"')
}

function imgOn(imgObj,pic,layers) {
  if (is_nav4) 
  {
    if (layers!='') {
      lay=eval(layers);
      lay.document[pic].src = eval(imgObj).src;
    } else {
     document[pic].src=eval(imgObj).src;
    }
  }
  else if (is_ie4up || is_nav5up)
  {
    document[pic].src = eval(imgObj).src;
  }
}
