Fix screen width alert

Fixed javascript, added cookies