Inspired by #37 - also looked at IE support - add missing scripts and redo some loops

Match changes to how it works. Also now search by publiclinenumber, not planningnumber