function startImage(imgID, butID) {

  this.active = false;

  this.nImgSrc = "";
  this.oImgSrc = "";

  this.uImgOver = "";
  this.uImgOut = "";
  
  
  this.cImgID = document.getElementById(imgID);
  
  this.over = startImage_over;
  this.out = startImage_out;

  this.defImg = startImage_def;
  this.defBut = startImage_but;
  
  var _this = this;
  
  var button = document.getElementById(butID);
  
  button.onmouseover = function() {	  
	  _this.over(this);
  }
  
  button.onmouseout = function() {
	  _this.out(this);
  }
  
  /*alert(imgID + ' * ' + this.cImgID);*/

  

}

function startImage_def(nSrc, oSrc) {
  this.uImgOut = nSrc;
  this.uImgOver = oSrc;
}

function startImage_but(nSrc, oSrc) {
  this.nImgSrc = nSrc;
  this.oImgSrc = oSrc;
}

function startImage_over(obj) {
    if (obj.src.indexOf(this.oImgSrc) != -1) {
        this.active = true;
    } else {
        obj.src = this.oImgSrc;
        this.active = false;
    }

    if (this.cImgID.src.indexOf(this.uImgOut) == -1) {
		
        document.activeSrc = this.cImgID.src;
        this.cImgID.src = this.uImgOver;
    } else {
        this.cImgID.src = this.uImgOver;
        document.activeSrc = "";
    }

}

function startImage_out(obj) {
    if (this.active == false) {
        obj.src = this.nImgSrc;

    }

    if (document.activeSrc != "") {
        this.cImgID.src = document.activeSrc;
    } else {
        this.cImgID.src = this.uImgOut;
    }
}

function MM_imgMark_over(oRow)
        {
                this.image = oRow.getElementsByTagName("IMG");
                this.image[1].src = this.osrc;
                this.oldColor = oRow.style.backgroundColor;

                if (oRow.style.backgroundColor == this.markedColor)
                        oRow.style.backgroundColor = this.overMarked;
                else
                        oRow.style.backgroundColor = this.overColor;
        }

function MM_imgMark_out(oRow)
        {
                this.image = oRow.getElementsByTagName("IMG");
                this.image[1].src = this.nsrc;

                if (oRow.style.backgroundColor == this.markedColor)
                        oRow.style.backgroundColor = this.markedColor;
                else
                        oRow.style.backgroundColor = this.oldColor;
        }

function MM_imgMark_click(oRow)
        {
                if (this.markedRow == "")
                        {
                                oRow.style.backgroundColor = this.markedColor;
                                this.markedRow = oRow;
                                if (this.onClick != "")
                                        eval(this.onClick);
                        }
                else
                        {
                                this.markedRow.style.backgroundColor = this.oldColor;
                                oRow.style.backgroundColor = this.markedColor;
                                this.markedRow = oRow;
                                if (this.onClick != "")
                                        eval(this.onClick);
                        }
        }

/*************************************************************************/


function MM_rollOver(obj,nSrc,oSrc)        {
        this.obj = document.getElementById(obj);
        this.obj.nSrc = nSrc;
        this.obj.oSrc = oSrc;
        this.obj.onmouseover = MM_rollOver_over;
        this.obj.onmouseout = MM_rollOver_out;

}

function MM_rollOver_over()        {
        this.src = this.oSrc;

}

function MM_rollOver_out(){
        this.src = this.nSrc;

}

