var obj;
function newBorders(block) {         
 $(block+" img").load(function() {  
 if ((!this.className || this.className !== 'floatImgLeft' || this.className !== 'floatImgRight') && !this.stopValue) {
  this.stopValue = true; 
  var addCss = '';
  if (this.className === 'floatImgLeft') addCss='float:left;'; 
  if (this.className === 'floatImgRight') addCss='float:right;';  
  $(this).wrap('<div style="'+addCss+'width:'+(this.width)+'px;height:'+(this.height)+'px;"><b class=”rtop”><b class=”r1?></b> <b class=”r2?></b> <b class=”r3?></b> <b class=”r4?></b></b><b class=”rbottom”><b class=”r4?></b> <b class=”r3?></b> <b class=”r2?></b> <b class=”r1?></b></b></div>'); 
  this.style.position="static";
  this.style.margin='0px';
  this.style.marginLeft=0+'px';
  this.style.marginTop=0+'px';
  this.style.display="block";
 } 
 });                        
 
}    

