function upload(filepath) {
	var p0, p1, s0, serverno;
	XMLHTTP.Open("GET", "http://ifile.it/upload:api_fetch_upload_server?response=text", false);
	XMLHTTP.send();
	s0 = XMLHTTP.responseText;
	p0 = s0.indexOf("server_id: ");
	if(p0 > -1) {
		p1 = s0.indexOf("\n", p0);
		if(p1 > p0)
			serverno = s0.substring(p0 + 11, p1); //11 = "server_id: "
	}
	if(serverno != "") {
		WebForm.Action = "http://s" + serverno + ".ifile.it/upload?response=text";
		WebForm.Method = "POST";
		WebForm.Enctype = "multipart/form-data";
		WebForm.AddFile("Filedata", filepath, "");

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