<html xmlns:MMString="http://www.macromedia.com/schemes/data/string/">
<head>
<!-- Copyright 2000-2007 Adobe Systems Incorporated.  All rights reserved. -->
<title><MMString:LoadString id="insertbar/formsFileField" /></title>
<script type="text/javascript" SRC="../../Shared/MM/Scripts/CMN/docInfo.js"></script>
<script type="text/javascript" SRC="../../Shared/Common/Scripts/dwscripts.js"></script>
<script type="text/javascript" SRC="formInsert.js"></script>
<script type="text/javascript">

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

function objectTag() {
  var uniqueId = dwscripts.getUniqueId("fileField");
  var inputTag = '<input type="file" name="' + uniqueId + '" id="' + uniqueId + '">';
  
  if (dw.getFocus(true) == "document") {
	  var theNode = dw.getDocumentDOM().getSelectedNode();

	  if (selectionInsideTag('form')){
	    if (theNode.nodeType == Node.TEXT_NODE) {
	      theNode = theNode.parentNode;
	    }
	    while (theNode.nodeType == Node.ELEMENT_NODE) {
	      if (theNode.tagName.toUpperCase() == 'FORM') {
	        theNode.setAttribute('enctype','multipart/form-data');
	        break;
	      }
	      theNode = theNode.parentNode;
	    }
	  }
  }
  return returnFormTag(inputTag);
}

</script>
</head>

<body>
</body>

</html>
