Function Writebase64File (filename, content)
DIM XML
SET XML = Server.createObject ("msxml2.domdocument")
DIM STM
Set stm = server.createObject ("adodb.stream")
Set root = Xml.createElement ("TIF")
root.text = Content
Root.DataType = "bin.base64"
Stm.Type = 1
Stm.open
Stm.write root.nodetypedPalue
Stm.savetofile Server.mappath (filename)
Stm.close
Set root = Nothing
SET XML = Nothing
SET STM = Nothing
END FUNCTION