var xmlhttp = new XMLHttpRequest();

function detectImage(taskID) {
	xmlhttp.open("GET","tmp\\"+taskID+".jpg",false);
	
	xmlhttp.send();
	if(xmlhttp.readyState == 4) {
		if(xmlhttp.status == 200) {
			location.replace("./success?taskID=" + taskID);
		}
	}
}