<div class="formArea">
<fieldset>
	<legend>{UPLOAD_FILE_TEXT}</legend>
    <p>{UPLOAD_FILE_HINT}</p>
	<table class="formFields" cellspacing="0" id="tbl">
		<tr>
			<td class="name">{UPLOAD_FILE_SRC_TEXT}</td>
			<td><input type="file" name="file[]"></td>
			<td class="withButton"><a class='uploadRemove' href="#" onClick="del(this)" style="display: none;">{REMOVE_UPLOAD_FIELD}</a></td>
		</tr>
<!-- BEGIN DYNAMIC BLOCK: multi_add -->
		<tr>
		<td class="name">&nbsp;</td>
		<td colspan="2" class="withButton">
<script>
T = document.getElementById("tbl");
R = T.rows[0].cloneNode(true);
count = 0;
function add() {
	var row = R.cloneNode(true);
	row.id = 'rowid_' + count++;
	row.getElementsByTagName('a')[0].style.display = 'inline';
	T.tBodies[0].insertBefore(row, T.rows[T.rows.length - 1]);
}

function del(a)
{
	var id = a.parentNode.parentNode.id;
	for (var i=0; i < T.rows.length; i++) {
		if (T.rows[i].id && id == T.rows[i].id)
		T.deleteRow(i);
	}
}
function getCountNonEmptyFiles()
{
	var count = 0;
	var files = document.getElementsByName('file[]');
	for (var i = 0; i < files.length; i++)
		count += files[i].value != '' ? 1 : 0;

	return count;
}

</script>
	<a href="javascript:add()" class='uploadAdd'>{ADD_UPLOAD_FIELD}</a> &nbsp;
	</td>
	</tr>
<!-- END DYNAMIC BLOCK: multi_add -->
	</table>
	</fieldset>
</div>