<!-- MENU-LOCATION=NONE -->
<html xmlns:MMString="http://www.macromedia.com/schemes/data/string/">
<head>
<!-- Copyright 2001, 2002, 2003 Macromedia, Inc. All rights reserved. -->
<title><MMString:LoadString id="insertbar/textEm" /></title>
<script language="javascript">

//---------------     API FUNCTIONS    ---------------

function isDOMRequired() {
	// Return false, indicating that this object is available in code view.
	return false;
}

function objectTag() {
	// Manually wrap tags around selection.
	var dom = dw.getDocumentDOM();
	if (dw.getFocus() == 'textView' || dw.getFocus(true) == 'html'){
    var upCaseTag = (dw.getPreferenceString("Source Format", "Tags Upper Case", "") == 'TRUE');
  	// Manually wrap tags around selection.
    if (upCaseTag){
      dom.source.wrapSelection('<EM>','</EM>');
    }else{
  		dom.source.wrapSelection('<em>','</em>');
    }
	}else if (dw.getFocus() == 'document'){
		//  Normally, when we apply character (or font) markup, DW considers several
		//  factors including whether or not the user has expressed a general preference
		//  to use CSS over HTML.  In that is the case, then DW will try to use CSS
		//  where possible and sensible.  In this case, however, we don't want CSS
		//  used, regardless of the general preference that the user has stated.
		//  Therefore, we temporarily force that preference to be "use HTML over CSS"
		//  so this markup is implemented in HTML, not CSS.
		var oldPrefUseCSS = dw.setPrefUseCSS(false);

		dom.applyCharacterMarkup("em");
		dw.setPrefUseCSS(oldPrefUseCSS);
  }
  
  // Just return -- don't do anything else.
  return;
}

		</script>
	</head>
	<body>
	</body>
</html>
