<?php


  $localisation_image =  (@file_exists($this->src)) ? $this->src : str_replace ("../",'',$this->src);
  $img = str_replace ("../",'',$this->src);

  ## chargement par default de la miniature
  if ( (file_exists(REP_IMG.'thumb/'.md5($img).".jpg"))AND ($this->mini !='false') )  $image_mini= URL_DU_SITE.REP_IMG.'thumb/'.md5($img).".jpg";
  elseif(!eregi("http",$localisation_image)) $image_mini = URL_DU_SITE.$localisation_image;
  else  $image_mini = $localisation_image;
  $img_max=(eregi("http",$localisation_image))? $localisation_image:URL_DU_SITE.$localisation_image;

  $html = (!empty($this->pop))? '<a href="'.$img_max.'" '.$this->pop.'>' : '' ;
  $html .='<img';
  $html .= (!empty($this->id))? " id=\"".$this->id."\"" : '' ;
  $html .= " src=\"".$image_mini."\"" ;
  $html .=(!empty($this->alt)) ?" alt=\"".$this->alt ."\"" :  " alt=\"img\"";
  if (!empty($this->align))  $html .="align='".$this->align ." '  ";
  if (!empty($this->x))  $html .="  width='".$this->x." ' ";
  if (!empty($this->y))  $html .="  height='".$this->y." ' ";
  if (!empty($this->width))  $html .="  width='".$this->width." ' ";
  if (!empty($this->height))  $html .="  height='".$this->height." ' ";
  $html .= (!empty($this->style))? " style=\"".$this->style."\"" : '' ;
  $html .= (!empty($this->pop))? $this->pop : '' ;
  $html .= (!empty($this->classe) /*|| !empty($this->align)*/)?' class="'.(!empty($this->classe)?$this->classe:'').' './*(!empty($this->align)?$this->align:'').*/'"' :'';
  $html .= (!empty($this->onmouseover))? " onmouseover=\"".$this->onmouseover."\"" : '' ;
  $html .= (!empty($this->onmouseout))? " onmouseout=\"".$this->onmouseout."\"" : '' ;
  $html .= (!empty($this->onclick))? " onclick=\"".$this->onclick."\"" : '' ;
  $html .= (!empty($this->onmouseup))? " onmouseup=\"".$this->onmouseup."\"" : '' ;
  $html .= (!empty($this->onmousedown))? " onmousedown=\"".$this->onmousedown."\"" : '' ;
  $html .= (!empty($this->onblur))? " onblur=\"".$this->onblur."\"" : '' ;
  $html .='/>';
  $html .= (!empty($this->pop))? '</a>' : '' ;

  //if (!isset($CSS_AFTER_BODY))
  print $html;
?>