$(document).ready(function() {
           $("#postcodeinput").keypress(function(e) {
             if (e.which == 13) {
               e.preventDefault();

		$.modal('<script type="text/javascript">$(document).ready(function(){   $.post("mob-webservice.php", {inputdata: $("#searchform1").serialize()}, function(theXml) { window.location.replace($("redirect",theXml).text());  }); });</script><center><div class="test">\
		<p><h1> Searching... </h1></p>\
		<object width="300" height="250">\
		<param value="opaque" name="wmode"/>\
		<param name="movie" value=""></param>\
		<embed src="images/globe.swf" wmode="opaque" width="300" height="250"></embed>\
		</object>\
		</center>', {close: false});
             }
           });
	
	$('#searchbutton').click(function (e) {
		e.preventDefault();
			
		$.modal('<script type="text/javascript">$(document).ready(function(){   $.post("mob-webservice.php", {inputdata: $("#searchform1").serialize()}, function(theXml) { window.location.replace($("redirect",theXml).text());  }); });</script><center><div class="test">\
		<p><h1> Searching... </h1></p>\
		<object width="300" height="250">\
		<param value="opaque" name="wmode"/>\
		<param name="movie" value=""></param>\
		<embed src="images/globe.swf" wmode="opaque" width="300" height="250"></embed>\
		</object>\
		</center>', {close: false});
	});
});
