
<html xmlns:MMString="http://www.macromedia.com/schemes/data/string/">
<head>
<!-- Copyright 2012 Adobe Systems Inc. -All rights reserved -->
<title><MMString:LoadString id="insertbar/FormsPassword" /></title>
<script type="text/javascript" SRC="../../Shared/Common/Scripts/dwscripts.js"></script>
<script language="javascript">

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

function objectTag() {

	var tagStr = '';
	var dom = dw.getDocumentDOM();
	
	// if code view is active, dont append the id as we cant get a unique id
	if('code' == dom.getActiveView())
	{
		tagStr = '<input type="password">';
		return tagStr;
	}
	else
	{
		var uniqueId = dwscripts.getUniqueId("password");
	 	tagStr = '<label for="' + uniqueId + '">Password:</label>\
				  <input type="password" name="' + uniqueId + '" id="' + uniqueId + '">';
	}
  	
	// Adjusting Selection from Label tag to Input tag
	var dom = dw.getDocumentDOM();
	dom.insertHTML(tagStr, false, false);	
	var newObj = dom.getElementById(uniqueId);	
	var offsets = dom.nodeToOffsets(newObj);	
	dom.setSelection(offsets[0], offsets[1]);
	
	return ''; 
}
</script>

</head>

<body>
</body>

</html>