Can we check if a CSS file is loaded or not.

Can we check if a CSS file is loaded or not.

I am developing a web application in which user can change the theme of the page.

So for this i am changing href attribute of the link tag on selection of the perticular theme.

Problem is that when i change the theme whole page gets messed up till the new css file 
is fully loaded.

So how can I check if the CSS file is completely loaded or not?