function upload(filepath) {
	var p0, p1, s0, server;
	WinHttp.Open("GET", "http://rapidshare.ru", false);
	WinHttp.send();
	s0 = WinHttp.responseText;
	p0 = s0.indexOf("id=actionurl value=\"");
	if(p0 > -1) {
		p0 = p0 + 20; //20 = "action=""
		p1 = s0.indexOf("\"", p0);
		if(p1 > p0)
			server = s0.substring(p0, p1);
	}
	if(server != "") {
		WebForm.Action = server;
		WebForm.Method = "POST";
		WebForm.Enctype = "multipart/form-data";
		WebForm.AddFile("fl1", filepath, "");

		WinHttp.Open(WebForm.Method, WebForm.Action, false);
		WinHttp.setRequestHeader("Content-type", WebForm.Enctype);
		WinHttp.send(WebForm.VarBody);
		switch(WinHttp.Status) {
		case 200: //OK
			s0 = WinHttp.responseText;
			p0 = s0.indexOf("\"[URL]");
			if(p0 > -1) {
				p0 = p0 + 6 //6 = ""[URL]"
				p1 = s0.indexOf("[/URL]\"", p0);
				if(p1 > p0)
					return s0.substring(p0, p1);
			}
		break;
		default: //Error
			WshShell.Popup(WinHttp.statusText, 0, WinHttp.Status, 16);
		}
	}
}
