Cleaned up JS code

Reindented RATTIC function
Cleaned up variable declarations
Semicolon fixing
Removed more trailing commas
Removed trailing spaces, added semicolons
Made button click variables local
Scoped some url related vars
Added local variable scoping to 'me' and 'options'
Added local variable scope to 'button'
Scoped some more variables to local scope
Scoped target, targets, mystatus, me and input
Scoped text, clip, form, hideTimeoutId
Scoped inputval, message, ajax, input
Scoped iconname, txtfield, imgfield, target
Code formatting issues
Scoped 'ajax' to a local variable
More code cleanup