// 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) {
    a=preload.arguments
    for (i=0;i<(a.length/2);i++) {
        imgObj=a[(i*2)];
        imgSrc=a[(i*2)+1];
        if (document.images) {
            eval(imgObj+' = new Image()');
            eval(imgObj+'.src = "'+imgSrc+'"');
        }
    }
}

brow = new detectBrowser();

function changeImage(layer,imgName,imgObj) {
    //alert(imgName);
    if (brow.DOMHTML) document.getElementById(imgName).src = imgObj;
    else{
        if (document.layers && layer!=null) eval('document.'+layer+'.document.images["'+imgName+'"].src = ' + imgObj)
        else document.images[imgName].src = eval(imgObj+".src");
    }
}

function canvia(com) {
	var im1="../img/"+mode+"_"+com+".gif";
	document.images["txt"].src=im1;
}

function canvia(com, lxCamp) {
	var im1="../img/"+mode[lxCamp]+"_"+com+".gif";
        //alert(eval('document.images["txt'+lxCamp+'"].src'));
	eval('document.images["txt'+lxCamp+'"].src=im1');
}


function color(cela,color) {
	var c=eval('document.all.'+cela);
	c.bgColor=color;
}			
