/**
 * this is a sample javascript that demonstrates how the Rad UPload Plus
 * applet can interact with a javascript.
 *
 * If you set the jsnotify configuration property, the applet will call 
 * the upload completed method when the file upload has been completed
 *  
 * You can call the getUploadStatus() method to determine whether the 
 * upload was successfull. Possible values are 1, for success, 0 when the 
 * user has cancelled the upload and -1 when the upload failed (error).
 * 
 */

/* a usefull variable */
var upload=0;


/**
 * the response returned by the server will be passed as a parameter (s) to this
 * function. However in the case of Netscape the parameter will be empty. When using
 * netscape call the getResponse()method of the applet to access this information.
 *
 */
function uploadCompleted(s)
{
	upload = document.rup.getUploadStatus();
	if(upload==1)
	{
		alert("The upload (media) was successfull");
		/*
		if(confirm("the upload was successfull do you wish to see the server response?"))
		{
			alert(s);
		}
		*/
	}
	else
	{
		confirm("The upload seems to have failed");
	}
	
	return true;
}
