var locationToCall;
/*
This is the handler function that returns the response from the server
*/
function handleRemoveAttachment()
{
	if(xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete')
	{ 
		var result = xmlHttp.responseText;
		document.getElementById("divAttachmentDetails").innerHTML = result;
		attachmentcount = attachmentcount - 1;
	}
}


/**
This actually sends the lookup request (as a URL with a query string) to a
server in the background. When a response comes back from the server, the
function attached to the onReadyStateChange event is fired off.
*/
function removeAttachment(indexOf)
{	
	EmsCallback(locationToCall, handleRemoveAttachment, "removeAttachment|" +  indexOf, "0");
	return;
}


function handleRemoveImage()
{
	if(xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete')
	{ 
		var result = xmlHttp.responseText;
		document.getElementById("divAttachmentDetails").innerHTML = result;
		ShowImageInput(false);
		document.getElementById("CancelImageBrowse").style.display = 'none';
	}
}


/**
This actually sends the lookup request (as a URL with a query string) to a
server in the background. When a response comes back from the server, the
function attached to the onReadyStateChange event is fired off.
*/
function removeImage()
{	
	
	EmsCallback(locationToCall, handleRemoveImage, "removeImage|", "0");
	return;
}
