var pdf24Obj = false;
function pdf24Doc2PDFForm(form) {
	form.target = "pdf24PopWin";
	form.action = "http://doc2pdf.pdf24.org/doc2pdf.php";
	//form.enctype = "multipart/form-data";
	//form.method = "POST";
	form.acceptCharset = "UTF-8";
	this.pdf24Win = false;
	var self = this;
	this.pdf24CheckFkt = function() {
		if(!this.pdf24Win || this.pdf24Win.closed) {
			form.submitBtn.disabled = false;
			pdf24Obj = false;
		} else {
			window.setTimeout('pdf24Obj.pdf24CheckFkt();', 1000);
		}
	};
	this.onSubmit = function() {
		if(pdf24Obj) {
			alert("An other conversion is running. Please wait for finnish of the other conversion and than close that window.");
			pdf24Obj.pdf24Win.focus();
			return false; //an other conversion is running..
		}
		pdf24Obj = self;
		form.submitBtn.disabled = true;
		self.pdf24Win = window.open('', 'pdf24PopWin', 'scrollbars=yes,width=400,height=200,top=0,left=0');
		self.pdf24Win.focus();
		window.setTimeout('pdf24Obj.pdf24CheckFkt();', 1000);
		return true;
	};
}
