var ImgRef='';
var SrcRef='';
var LrgRef='';
var HtrRef='';

function PrechrgImg(){
  var Arg=PrechrgImg.arguments;
  var Siz=Arg.length;
  if (Siz>0){ 
    if (document.iLst==null) document.iLst=new Array();
    var j=document.iLst.length;
    for (var i=0; i<Siz; i++){
      document.iLst[j]= new Image();
      document.iLst[j++].src=Arg[i];
    }
  }
}

function ChangeImg(){
  var Arg=ChangeImg.arguments;
  if (Arg.length==4){
    ImgRef=document.images[Arg[0]].name;
    SrcRef=document.images[Arg[0]].src;
    LrgRef=document.images[Arg[0]].width;
    HtrRef=document.images[Arg[0]].height;
    document.images[Arg[0]].src=Arg[1];
    document.images[Arg[0]].width=Arg[2];
    document.images[Arg[0]].height=Arg[3];
  } 
}

function ResetImg(){
  document.images[ImgRef].src=SrcRef;
  document.images[ImgRef].width=LrgRef;
  document.images[ImgRef].height=HtrRef;
}

