Index: skins/common/wikibits.js
===================================================================
--- skins/common/wikibits.js	(revision 36299)
+++ skins/common/wikibits.js	(working copy)
@@ -86,14 +86,23 @@
 	return s;
 }
 
-// document.write special stylesheet links
+function appendLinkedCss(uri) {
+	var l = document.createElement('link');
+	s.rel = 'stylesheet';
+	s.type = 'text/css';
+	s.href = uri;
+	document.getElementsByTagName('head')[0].appendChild(l);
+	return l;
+}
+
+// appendLinkedCss special stylesheet links
 if (typeof stylepath != 'undefined' && typeof skin != 'undefined') {
 	if (is_opera_preseven) {
-		document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera6Fixes.css">');
+		appendLinkedCss( stylepath + '/' + skin + '/Opera6Fixes.css' );
 	} else if (is_opera_seven && !is_opera_95) {
-		document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera7Fixes.css">');
+		appendLinkedCss( stylepath + '/' + skin + '/Opera7Fixes.css' );
 	} else if (is_khtml) {
-		document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/KHTMLFixes.css">');
+		appendLinkedCss( stylepath + '/' + skin + '/KHTMLFixes.css' );
 	}
 }
 
