function set_transform_origin($val) {
    $values = preg_split("/\s+/", $val);
    
    if ( count($values) === 0) {
      return;
    }
    
    foreach($values as &$value) {
      if ( in_array($value, array("top", "left")) ) {
        $value = 0;
      }
      
      if ( in_array($value, array("bottom", "right")) ) {
        $value = "100%";
      }
    }
    
    if ( !isset($values[1]) ) {
      $values[1] = $values[0];
    }
    
    //see __set and __get, on all assignments clear cache, not needed on direct set through __set
    $this->_prop_cache["transform_origin"] = null;
    $this->_props["transform_origin"] = $values;
  }