// Preload Images
img1 = new Image(66, 66);  
img1.src="images/loader.gif";

	window.addEvent('domready', function() {
	$('thumbcreate').addEvent('submit', function(e) {

		// Prevents the default submit event from loading a new page.
		e.stop();

		// Show the loader when pressing the submit button...
		$('ajax_loading').setStyle('display','block');

		// Hide the submit button while processing...
		$('submit').setStyle('display','none');

    // Hide the Response Div
    $('response').setStyle('display','none');   

		// Set the options of the form's Request handler.
		// ("this" refers to the $('login') element).
		this.set('send', { onComplete: function(response) {
			$('ajax_loading').setStyle('display','none');
      // Display the Response Div
	      $('response').setStyle('display','block');
			  $('response').set('html', response);
			  // Show the login button
			  $('submit').setStyle('display','block');
	      // Reset URL Field
  		  $('url').value="http://";
	
		}});

		// Send the form.
		this.send();
	});
});


