Wacky functions

javascript modified