function createOffsets (className) {
	document.body.innerHTML = '<div style="position: absolute; left: -1000px; float: left;" class="'+className+'"><span id="laquo">&laquo;</span><span id="brace">(</span><div id="1em" style="width: 1em;"></div></div>' + document.body.innerHTML;
	laquoOffset = document.getElementById('laquo').offsetWidth;
	braceOffset = document.getElementById('brace').offsetWidth;
	myEm = document.getElementById('em').offsetWidth;
	laquoEm = laquoOffset / myEm;
	braceEm = braceOffset / myEm;
	sheetHlaquo = "margin-left: -"+laquoEm+"em";
	sheetSlaquo = "margin-right: "+laquoEm+"em";
	sheetHbrace = "margin-left: -"+braceEm+"em";
	sheetSbrace = "margin-right: "+braceEm+"em";
	var thesheet = document.styleSheets[0];
	if (window.opera) {
	sheetSlaquo = "margin-left: "+laquoEm+"em";
	sheetSbrace = "margin-left: "+braceEm+"em";
	}
		// IE detection
		if (thesheet.removeRule) {
			with (thesheet) {
				addRule(".hlaquo", sheetHlaquo);
				addRule(".slaquo", sheetSlaquo);
				addRule(".hbrace", sheetHbrace);
				addRule(".sbrace", sheetSbrace);
			}
		} else {
		with (thesheet) {
			insertRule(".hlaquo {"+sheetHlaquo+"}", 0);
			insertRule(".slaquo {"+sheetSlaquo+";}", 0);
			insertRule(".hbrace {"+sheetHbrace+"}", 0);
			insertRule(".sbrace {"+sheetSbrace+";}", 0);
		}
	}
}
createOffsets('text');
