var upload_range = 2;


function arabportal(num)
{
    if ( upload_range < max_tr_fileup )
    {
        if ( num == upload_range )
        {
            var up = document.getElementById('fileup');
            var dv = document.createElement( "div" );

            dv.innerHTML = '<input  type="file" name="fileup_' + upload_range
                               + '" size="54" onchange="arabportal(' + (upload_range + 1) + ')">';
            up.appendChild( dv );
            upload_range++;
            document.tr_upload.upload_range.value = upload_range;
        }
    }
}
