<?php

if ($nom=='INPUT') {
  $format="<input ";
  if (!empty($this->src))$format .=" src=\"".$this->src."\"";
  if (!empty($this->border))$format .=" border=\"".$this->border."\"";
  if (!empty($this->name))$format .=" name=\"".$this->name."\"";
  if (!empty($this->type))$format .=" type=\"".$this->type."\"";
  if (!empty($this->value))$format .=" value=\"".$this->value."\"";
}
elseif ($nom=='LABEL') {
  $format="<label ";
  if (!empty($this->for))$format .=" for=\"".$this->for."\"";
}

if(!empty($format)){
  if (!empty($this->style))$format .=" style=\"".$this->style."\"";
  if (!empty($this->classe))$format .=" class=\"".$this->classe."\"";
  if (isset($this->onmouseover)) $format .=" ".$this->onmouseover;
  if (isset($this->onmouseout)) $format .=" ".$this->onmouseout;
  if (isset($this->onclick)) $format .=" onclick=\"".$this->onclick."\"";
  if (isset($this->onmouseup)) $format .=" ".$this->onmouseup;
  if (isset($this->onmousedown)) $format .=" ".$this->onmousedown;
  if (isset($this->onblur)) $format .=" ".$this->onblur;
  if (isset($this->js)) $format .=" ".$this->js;
  $format .=" />";
  print($format);
}

?>