altered attachment javascript file, rel #362

The attachment script has been altered as it was having difficulties in
the front.