Conservation laws for electromagnetic fields