Auto (-) after 4 digit accept number&alphabet 129S-28D8-3821

Job ID: 30800414

Budget: $10 – $30 USD

Hi i think from subject everything clear.
i need JS script to finish my issues.
For sample :

R293-2821-2S93
2938-49W8-2817

auto ( - ) after 4 digit and accept number&alphabet
Related categories: PHP JavaScript jQuery / Prototype