ยง 501. Contractual provisions fixing venue. Subject to the provisions of subdivision two of section 510, written agreement fixing place of trial, made before an action is commenced, shall be enforced upon a motion for change of place of trial.