<!-- 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/cfml/cfif" /></title>

<script language="javascript">

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

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

function objectTag() {
  // Manually insert tag, and then put IP inside it.
	var dom = dw.getDocumentDOM();
	var upCaseTag = (dw.getPreferenceString("Source Format", "Tags Upper Case", "") == 'TRUE');
	// Manually wrap tags around selection.

	// if there's a selection, put it between the tags.
	var sel = dom.source.getSelection();
	if (sel[0] != sel[1]){
    if (upCaseTag){
      dom.source.wrapSelection('<CFIF>','</CFIF>');
    }else{
  		dom.source.wrapSelection('<cfif>','</cfif>');
    }
	}else{
    if (upCaseTag){
      dom.source.wrapSelection('<CFIF ','></CFIF>');
    }else{
  		dom.source.wrapSelection('<cfif ','></cfif>');
    }
	}
		

  // Just return -- don't do anything else.
  return;
}

</script>
	
</head>

<body>
</body>

</html>
