Hello. I am building a flash/js recipe book to be run locally. I am having trouble with the js that creates the new file to replace the old one.
Code:
/*function activeObject(){

	

	//alert("sach here")

	document.write('<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" WIDTH=\"790\" HEIGHT=\"547\" id=\"Dymocks\" ALIGN=\"\">');

	document.write('<PARAM NAME=movie VALUE=\"Recipe Book.swf\">'); 

	document.write('<PARAM NAME=loop VALUE=false> <PARAM NAME=menu VALUE=false>'); 

	document.write('<PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF>'); 

	document.write('<EMBED src=\"Recipe Book.swf\" loop=false menu=false quality=high bgcolor=#FFFFFF  WIDTH=\"790\" HEIGHT=\"547\" NAME=\"shellCingular\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\">	</EMBED>');

	document.write('</OBJECT>');

}*/



function activeObject()

{



		document.write("<HTML><HEAD><meta http-equiv=Content-Type content=text/html;  charset=ISO-8859-1\"><TITLE>Save text</TITLE>");

		document.write("</HEAD><BODY bgcolor=\"#ffffff\" onUnLoad=\"finish()\"><table align=\"center\"><tr><td><OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" WIDTH=\"788\" HEIGHT=\"541\" id=\"shell\" ALIGN=\"\"> <PARAM NAME=movie VALUE=\"Recipe Book.swf\"> <PARAM NAME=quality VALUE=high> <PARAM NAME=menu VALUE=false> <PARAM NAME=loop VALUE=false><PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src=\"Recipe Book.swf\" quality=high bgcolor=#FFFFFF  WIDTH=\"788\" HEIGHT=\"541\" NAME=\"Recipe Book\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED></OBJECT></table></tr></td></BODY></HTML>");



}



function WriteToFile(sText)

{

	//alert(sText)

	var fso = new ActiveXObject("Scripting.FileSystemObject");

	var FileObject = fso.CreateTextFile("C:\\Recipe Book BETA v0.91\recipes.xml", true); // 8=append, true=create if not exist, 0 = ASCII

	FileObject.write(sText);

	FileObject.close();

	delete FileObject;

	delete fso;

}
Please respond with any help you can offer.
Thanks,
bobfrapples49