Function eDOC_CREATE_NEW_DOCUMENT_HEADER (strDocType, blInitialContent, strMajorVersion, strMinorVersion)
	
	' Check to see if Iteration Flag is set on
	strBuildNo = eDOC_SET_ITERATION_FLAG
	
	Select case strDocType 
		case "dm_document", "qm_document", "qm_templates", "qm_collections", "qm_printtype"
			strDocType = strDocType
		case else
			strDocType = strDocType & strBuildNo
	End Select
	
	eDOC_SELECT_IMAGE_CLICK "New Document", "index:=0" ' Add the header details to the New Document

	With Browser("name:=xyz").Window("regexpwndtitle:=xyz -- Web Page Dialog").Page("title:=xyz")
	
		intItemCount = .WebList("name:=select", "html id:=listbox1", "select type:=Single Selection").GetROProperty("items count")
		
		for intItem = 0 to intItemCount - 1
			if strDocSuperType = "qm_document" then
				.WebList("name:=select", "html id:=listbox1", "select type:=Single Selection").Select "#" & intItem
				strSelItem = .WebList("name:=select", "html id:=listbox1", "select type:=Single Selection").GetROProperty("selection")
				if strSelItem = "dm_document (dm_document)" then
					.WebButton("name:=->", "type:=button").Click
					.WebButton("html tag:=INPUT", "name:=OK", "type:=button").Click
					Exit For
				elseif strSelItem = "qm_document (qm_document)" then
					.WebButton("name:=->", "type:=button").Click
					.WebButton("html tag:=INPUT", "name:=OK", "type:=button").Click
					Exit For
				End If
			End if

			.WebList("name:=select", "html id:=listbox1", "select type:=Single Selection").Select intItem  
			strListItem = .WebList("name:=select", "html id:=listbox1", "select type:=Single Selection").GetROProperty("selection")

			intItemLength = Len(strListItem)
			intFoundPos = Instr(1, strListItem, "(", 1)
			if intFoundPos <> 0 then
				strListItem = Right(strListItem, intItemLength - intFoundPos)
			End if

			strListItem = Replace (strListItem, ")", "")
			if Trim(strListItem) = strDocType then
				.WebButton("name:=->", "type:=button").Click
				.WebButton("html tag:=INPUT", "name:=OK", "type:=button").Click
				Exit For
			End if
		Next
	
	End With
	
	wait 3
	eDOC_XML_WAIT
	eDOC_SET_BOOLEAN "New Document", "chkInitialContent", blInitialContent

	eDOC_XML_WAIT
	eDOC_SET_WEB_EDIT "New Document", "prop_htcMajor", strMajorVersion
	eDOC_SET_WEB_EDIT "New Document", "prop_htcMinor", strMinorVersion

	If Err.Number <> 0 Then
		Reporter.ReportEvent micGeneral,"ERROR_CAPTURE", "Error in eDOC_CREATE_NEW_DOCUMENT_HEADER function: " & Err.Description	
	Else
		Reporter.ReportEvent micPass,"Function eDOC_CREATE_NEW_DOCUMENT_HEADER Passed", "Successfully created new Document header"
	End if 	
	
End Function