/**
 * Class to simulate a post-request:
 */		
	function HtmlRequest ( url, vars, method, enctype )
	{
		/**
		 * Constructor:
		 */		
			this.__construct = function ( url, vars, method, enctype )
			{
				this.form = document.createElement ( 'form' );
				this.form.style.display = 'none';
				
				this.setUrl ( url );
				this.setMethod ( method );
				this.setEnctype ( enctype );
				
				this.addVars ( vars );
			}
		
		/**
		 * Setter:
		 */
			this.setUrl = function ( url ) { this.url = url; }
			this.setMethod = function ( method ) { this.method = method; }
			this.setEnctype = function ( enctype ) { this.enctype = enctype; }
		
		/**
		 * Adds variables to the form:
		 */
			this.addVars = function ( vars )
			{
				for ( var i in vars )
				{
					this.addVar ( i, vars[ i ] );
				}
			}
		
		/**
		 * Adds one variable to the form:
		 */
			this.addVar = function ( vName, vValue )
			{
				var input = document.createElement ( 'textarea' );
					input.name = vName;
					input.value = vValue;
					
				this.form.appendChild ( input );
			}
		
		/**
		 * Execute the form:
		 */
			this.execute = function ( )
			{
				this.form.action = this.url;
				this.form.method = this.method;
				this.form.enctype = this.enctype;
				
				document.body.appendChild ( this.form );
				this.form.submit ( );
			}
		
		/**
		 * Call constructor:
		 */		
			this.__construct ( url || '', vars || {}, method || 'post' , enctype || 'multipart/form-data' );
	}