
function FlashUploader_(Name)
{
	this.Object = Flash.GetSWFObject(Name);
	this.InputName = Name;
	this.FormObject = null;
	this.CallBackFunction = null;

	this.CallBack = function(CallBackFunction)
	{
		this.CallBackFunction = CallBackFunction;
	}

	this.Start = function(FormObject)
	{
		this.FormObject = Form.GetForm(FormObject);
		this.Object.FlashUploaderStart("");
	}

	this.Complete = function(Object)
	{
		InputList = this.FormObject.getElementsByTagName("INPUT");
		for(Loop=0;Loop<InputList.length;Loop++)
			if (InputList[Loop].name==this.InputName+"[]")
				InputList[Loop].parentNode.removeChild(InputList[Loop]);

		for(Loop=0;Loop<Object.length;Loop++)
		{
			Input = document.createElement("input");
			Input.type = "hidden";
			Input.name = this.InputName+"[]";
			Input.value = Object[Loop];
			this.FormObject.appendChild(Input);
		}

		if (this.CallBackFunction)
			this.CallBackFunction();
	}

}
