<script type="text/javascript">
fields = 0;
function addInput() {
if (fields != 6) {
document.getElementById('uploadform').innerHTML += "<input type='file' name='imageup[]' /><br />";
fields += 1;
} else {
document.getElementById('uploadform').innerHTML += "<br /><?php echo $l[imagesallowed];?>.";
document.galleryuploads.addimage.disabled=true;
}
}
</script>
