Simplified Javascript