Determination of continuous variable entanglemente by purity measurements