local toolpath=BROWSERPATH.."Tools";

function kmasave()	
	local title,url=GetDocInfo(hwnd)
	local sname="kma-"..title;
	km.setpref(TYPE_INT,"kmeleon.general.saveType",2);
	local getdldir=km.getpref(TYPE_STRING,"kmeleon.download.saveDir");
	exec(toolpath.."\\kmaservice\\kmasave.exe \""..getdldir.."\" \""..sname.."\"");
end

function kmaread()
	exec(toolpath.."\\kmaservice\\kmaread.exe ");
end

function kmareg()
	exec(toolpath.."\\kmaservice\\kmaregister.exe ");
end
