(a) When circumstances are such that grounds for a divorce exist, the aggrieved party may institute a proceeding by complaint in the same manner as if petitioner were seeking a decree of divorce, but praying instead to be allowed to live separate and apart from the offending party. (b) No separation by decree entered hereunder shall be grounds for a divorce on the grounds of desertion or two (2) year separation unless those grounds existed at the time of petitioning for judicial separation. A decree of divorce may be granted after the decree of judicial separation is entered upon proper grounds arising thereafter. (c) The court may make such orders as appear just, including custody of the children, provision for support, disposition of the properties of the parties, alimony, restraint of one (1) or both spouses during litigation and restraint of disposition of property. The court may impose a time limitation on the order or render a perpetual separation. The parties may at any time move the court to be discharged from the order. (d) All defenses available in an action for divorce are available under this section.