updated to latest library and condensed code

Updated to latest Prototype (1.7) and lates Scriptaclous and condensed
redundant code