Fedor, an EAN is generated with numbers that are specific for your company. You should have a registration at GS1. They will give you an unique set of 5 numbers.
The other numbers can be determined by the company itself.
There are rules to check the validity. A quick research gave me this site:
http://www.gs1.org/barcodes/support/checkdigitcalculator
Good luck!