Problem i see with your code:
document.getElementById('ctl00$ContentPlaceHolder1$UploadNewComp1$Test1'))
The "name" parameter uses "$", and you are getting by "ID", which uses "_", so that line should be
document.getElementById('ctl00_ContentPlaceHolder1_UploadNewComp1_Test1'))
"If you make it idiot proof, they'll build a better idiot"