PLEASE don't give your dogs anything at all like this before checking with your vet!
I know all dogs are different, but strong sustained exercise for at LEAST an hour at a time at LEAST twice a day is the best dog-calmer I have ever known
I don't think you should medicate them. Try Just sitting down and relaxing, NO TV, NO RADIO, NO NOISE!! If you are calm, they they are calm.
NEVER give a human medication to a dog! If your dogs are hyper because of a visiting dog then take steps to keep the animal separate so that they don't get into trouble. If you absolutely cannot get them to calm down there is a product called Comfort Zone that you can plug into your wall like an air freshener that releases calming, friendly pheromones into the air that your dog will smell that will keep both of them calm. Or ask your vet about giving them one of the Bach's flower products, like Rescue Remedy. These all-natural preparations are perfectly safe for use in dogs and work wonders. They are available at health food stores.
Ghilly
I agree with prior posts, under no circumstances give your dogs human medicines as these are rarely designed for a dog's metabiolism and, in some cases, can do permanent harm. Valium is certainly a case in point, as it is very easy to administer an overdose, so it is best avoided. Seroquel is dangerous too, as it is primarily used as an antipyschotic in humans and is unsuitable for dogs (one effect being an increased risk of cataract in dogs).
In short therefore, do not use these drugs for your dogs. If possible, take them out for a good walk or run, and this will almost certainly calm them for the rest of the day. Tony