should use jQuery for this since the wordpress admin already has it.