Change Field Editor Properties--Default Mode using javascript

I am trying to change the “Default Mode” from “Read with Inline-Edit” on the field Editor Properties to Read-only, but using javascript to control this. 

The idea is to set this mode based on record type. 

Ex: 
If (recordtype=a)
{Set the Field Editor - Default Mode to Read-only}
else {Set the Field Editor - Default Mode to Read with Inline-Edit}

Any example on how to accomplish this will be greatly appreciated. 

There’s probably something in this post that will help:
http://community.skuid.com/skuid/topics/_edit_mode_button