this works perfectly in firefox - but in internet explorer it just creates the first lable and the input field, although it creates the input field as a regular text field instead of for files. the caption label and text field aren't created at all. any ideas?

function addphoto() {
	var photos = document.getElementById("photos"); // the element that containts the fields
	// create a label for the file field
	var title = photos.appendChild(document.createElement("strong"));
	title.innerHTML = "Photo " + count.value;
	// create the file input field
	var file = photos.appendChild(document.createElement("input"));
	file.setAttribute("type", "file");
	file.setAttribute("size", 70);
	file.setAttribute("name", "filPhotos[]");
	// create a label for the text field
	var caption = photos.appendChild(document.createElement("strong"));
	caption.innerHTML = "Caption " + count.value;
	// create the text field
	var text = photos.appendChild(document.createElement("input"));
	text.setAttribute("type", "text");
	text.setAttribute("name", "txtCaptions[]");