var fso = new ActiveXObject("Scripting.FileSystemObject")
var temp_folder=fso.GetSpecialFolder(2);//temp folder
var html_file=temp_folder + "\\preview.html";//preview current buffer in temp folder
fso = null;

Include(SCRIPT_PATH + '\\marked.js');
Include(SCRIPT_PATH+'\\export_impl.ejs');

var file = new ActiveXObject('Adodb.Stream');
file.Type = 2;
file.Open();
file.Charset = 'utf-8';
file.WriteText( content );
file.SaveToFile(html_file, 2);
file.Close();
App.Alert('Done!');

var shell = new ActiveXObject("WScript.Shell")
try{
	shell.Run('"'+html_file+'"', 1, true);
}
catch(err){
}
file=null;

