I use the following pattern when writing JS:
//Create link to myCSS.css
if(!document.getElementById('myCSS')){
var cssFile = document.createElement('link');
cssFile.rel = 'stylesheet';
cssFile.type = 'text/css';
cssFile.id='myCSS';
cssFile.href = './myCSS.css';
document.getElementsByTagName('head')[0].appendChild(cssFile)
}
------------------------------
Paul Mendelson
------------------------------