window.addEvent('domready', function() {


			//make the ajax call, replace text
			// http://formular.mms-it.net/formular_ext.php?site=beamte-pkv.net&typ=pkv
			var gets = 'site=krankenversicherung-beamter.de&typ=pkv';
			var path = 'formular_ext.php';
			var path = 'formular/proxy.php?ajax_path='+encodeURIComponent(path);

			var myRequest = new Request({
									method: 'get', 
									url: path,
									onSuccess: function(response){
										$('ajaxform').set('html',response);
										$('formular').set('html','<input type="hidden" name="ajax_path" value="formular_ext.php"><input type="hidden" name="site" value="krankenversicherung-beamter.de"><input type="hidden" name="typ" value="pkv">',$('formular').get('html'));

										new FormCheck('formular');

/*
										new FormCheck('formular',{
											submitByAjax: true,
											onAjaxRequest: function(response){
												$('formular').addEvent('submit', function(e) {
													e.stop();
													this.set('send');
												});
											},
											onAjaxSuccess: function(response){
												if(response.contains('ok')){
													window.location = 'danke.html';
												}else{
													window.location = 'fehler.html';
												}
											}
										});
*/
									}
									});
			myRequest.send();

});
