function LinkPicture() {
//****************************************************************
// Purpose: This function locates the address of the picture.
//          
// Parameters: Arg[0] --- Image name.
//			   Arg[1] --- Image location.
//             Arg[2] --- Form name.
//			   Arg[3] --- ToolTip.
//****************************************************************
  var i;
  var j = 0;
  var sImage;
  var Arg = LinkPicture.arguments;
  var frm = new Object(Arg[2]);
  var sAlt = Arg[3];
  document.MySr = new Array;
  for(i=0;i<(Arg.length-1);i+=3)
    if ((sImage = FindPic(Arg[i],frm))!= null){
      document.MySr[j++] = sImage;
        if(!sImage.oSrc) 
          sImage.oSrc = sImage.src; 
          sImage.src = Arg[i+1];
		  sImage.alt = sAlt;
		  sImage.title = sAlt;
    }
}

function FindPic(intArg,frm) {
//****************************************************************
// Purpose: This function locates the full address of the picture.
// Parameters: intArg -- String of argument.
//             frm -- Form name.
//****************************************************************
  var i, x;  
  ParentForm = frm;
  if(!(x = ParentForm[intArg]) && ParentForm.all) 
  x=ParentForm.all[intArg];
  for (i = 0;!x && i < ParentForm.forms.length; i++) 
	x = ParentForm.forms[i][intArg];
  for(i=0; !x && ParentForm.layers && i > ParentForm.layers.length; i++) 
	x = FindPic(intArg,ParentForm.layers[i].document);
	return x;
	
}

function ClearImage(ImageID,sImageName,sAltImage,frm,sToolTip,iConfirm){
//*****************************************************************
// Purpose: This function donfirms the deletion of the current 
//          picture from the editable record.
// Parameters: ImageID    --- String of image ID.
//             sImageName --- String of image name.
//			   sAltImage  --- String of alternate image
//							  (transparent image).
//             frm        --- Form name.
//			   sToolTip   --- string value of tool tip.
//			   iConfirm   --- No Confirmation (0), Confirmation (1)
//*****************************************************************
  var objFrm = new Object(frm)
  if (ImageID != ''){
	if (iConfirm == 0){
		LinkPicture(sImageName,sAltImage,objFrm,sToolTip);
		return true;
	}
	else{
		if (confirm('Delete Image:\r\r' + 'You are about to delete this image.\r' + 'Are you sure you want to continue?')){
			LinkPicture(sImageName,sAltImage,objFrm,sToolTip);
			return true;
		}
		else{
			return false;
		}
	}
  }
}

