I definitely wouldn't throw it away. If nothing else, there's still something to learn about the fermentation process. Take careful note of the smells produced while it ferments. They will be a key indicator to your, soon to be beer's health.
If your refrigerator is super clean, there's a chance that it will be fine. unfortunately, the way a fridge cycles air with a fan, if you left the lid ajar, any bacteria in the air is now in your wort. I would suggest you don't do it this way again. Perhaps someone with a microbiology background can further comment.
From what I have read, there is nothing that will survive in your beer that can harm you. If it smells bad, it will probably taste bad too. After the fermentation has completed, please let us know what you find.
Best of luck!