If Instr(filename_new,".jpg")<>0 Or Instr(filename_new,".gif")<>0 Or Instr(filename_new,".jpeg")<>0 Then
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set uploadfile=fs.CreateTextFile(Server.Mappath("clinic_pic"&"/"&filename_new))
uploadfile.Write uploaddata.Item("file").Item("value")