strFilepathHTTPCSSGlobal = '/share/skin/paperish/style/paperish-global.css';
strFilepathHTTPCSSMicrosoft = '/share/skin/paperish/style/paperish-specific-microsoft.css';
strFilepathHTTPCSSStandard = '/share/skin/paperish/style/paperish-specific-standard.css';
blnIsMicrosoft = (document.createElement && window.ActiveXObject);
blnIsStandard = (document.implementation.createDocument && window.XMLHttpRequest);

function createElementNS(strNamespace, strNameOfElement, domParent) { // don't use gecko native createElementNS -- it prefixes anything left in default namespace

	elmCreated = domParent.createElement(strNameOfElement);
	elmCreated.setAttribute((strNameOfElement.indexOf(':') > -1) ? 'xmlns:' + strNameOfElement.match(/[^:]+/)[0] : 'xmlns', strNamespace);
	return elmCreated; }

function createElementXHTML(strNameOfElement) {

	if (document.createElementNS) { return document.createElementNS('http://www.w3.org/1999/xhtml', strNameOfElement); }
	else { return document.createElement(strNameOfElement); }}

function loadCSS(strFilepathHTTP) {

	elmLinkCSS = createElementXHTML('link');
	elmLinkCSS.setAttribute('rel', 'stylesheet');
	elmLinkCSS.setAttribute('type', 'text/css');
	elmLinkCSS.setAttribute('href', strFilepathHTTP);
	document.getElementsByTagName('head')[0].appendChild(elmLinkCSS); }

if (blnIsMicrosoft) { loadCSS(strFilepathHTTPCSSGlobal); loadCSS(strFilepathHTTPCSSMicrosoft); }
if (blnIsStandard) { loadCSS(strFilepathHTTPCSSGlobal); loadCSS(strFilepathHTTPCSSStandard); }
