
var flag = false;

function imageLoad() {  // called with onLoad()
    if (document.images) {
        btn01_on = new Image(); btn01_on.src = "images/web/btn04_on.gif";        
        btn02_on = new Image(); btn02_on.src = "images/web/btn04_on.gif";        
        btn03_on = new Image(); btn03_on.src = "images/web/btn04_on.gif";        
        btn04_on = new Image(); btn04_on.src = "images/web/btn04_on.gif";        
        btn05_on = new Image(); btn05_on.src = "images/web/btn04_on.gif";        
        btn06_on = new Image(); btn06_on.src = "images/web/btn04_on.gif";        
        btn07_on = new Image(); btn07_on.src = "images/web/btn04_on.gif";        
        btnlogin_on = new Image(); btnlogin_on.src = "images/web/btn04_on.gif";        
        btnenviar_on = new Image(); btnenviar_on.src = "images/web/btnenviar_on.gif";        
        btnverdemo_on = new Image(); btnverdemo_on.src = "images/web/btnverdemo_on.gif";        
        btnversitio_on = new Image(); btnversitio_on.src = "images/web/btnversitio_on.gif";        
        return (flag = true);  // set the flag and let the function know know it can work
    }
}

if (document.images) {   // load the off images in the normal way
    btn01_off = new Image(); btn01_off.src = "images/web/btn04_off.gif";
    btn02_off = new Image(); btn02_off.src = "images/web/btn04_off.gif";        
    btn03_off = new Image(); btn03_off.src = "images/web/btn04_off.gif";        
    btn04_off = new Image(); btn04_off.src = "images/web/btn04_off.gif";        
    btn05_off = new Image(); btn05_off.src = "images/web/btn04_off.gif";        
    btn06_off = new Image(); btn06_off.src = "images/web/btn04_off.gif";        
    btn07_off = new Image(); btn07_off.src = "images/web/btn04_off.gif";        
    btnlogin_off = new Image(); btnlogin_off.src = "images/web/btn04_off.gif";        
    btnenviar_off = new Image(); btnenviar_off.src = "images/web/btnenviar_off.gif";        
    btnverdemo_off = new Image(); btnverdemo_off.src = "images/web/btnverdemo_off.gif";        
    btnversitio_off = new Image(); btnversitio_off.src = "images/web/btnversitio_off.gif";        
}


function rollIn(imgName) {
    if (document.images && (flag == true)) {
        document[imgName].src = eval(imgName + "_on.src");
    }
}

function rollOut(imgName) {  // the normal onMouseOut function
    if (document.images){
        document[imgName].src = eval(imgName + "_off.src");
    }
}
