// JavaScript Document
$(document).ready(function(){
	$("#ajax-contact-form").submit(function(){
	// 'this' refers to the current submitted form
	
	var str = $(this).serialize();
   $.ajax({
   type: "POST",
   url: "event-management-quote.php",
   data: str,
   success: function(msg){
	$("#note").ajaxComplete(function(event, request, settings){
	var t = document.getElementById('progress');
	if (t) t.style.visibility='visible';
		if(msg == 'OK') {// Message Sent? Show the 'Thank You' message and hide the form
			result = '<table width="510" cellspacing="0" cellpadding="0"><tr><td>&nbsp;</td></tr><tr><td><span class="TextFont12">Fill in the form to request Event Management quotes</span></td></tr><tr><td>&nbsp;</td></tr><tr><td>Thank you for your request for event management quotes<br/>We will get in touch with you shortly.</td></tr></table>';			
			if(msg == 'OK') { $("#fields").hide(); }
		}
		else {
			result = msg;
		}
		//if(msg != 'OK')alert(result);
		$(this).html(result);
	});
	}
 	});
	return false;
	});
	
	$("#stand-quote-form").submit(function(){
	// 'this' refers to the current submitted form
	
	var str = $(this).serialize();

   $.ajax({
   type: "POST",
   url: "exhibition-stand-quote.php",
   data: str,
   success: function(msg){
	$("#note1").ajaxComplete(function(event, request, settings){
	var t = document.getElementById('progress');
	if (t) t.style.visibility='visible';
		if(msg == 'OK') {// Message Sent? Show the 'Thank You' message and hide the form
			result = '<table width="510" cellspacing="0" cellpadding="0"><tr><td>&nbsp;</td></tr><tr><td><span class="TextFont12">Get FREE quotes<br>Fill in the form to receive Exhibition Stand quotes tailored to your needs</span></td></tr><tr><td>&nbsp;</td></tr><tr><td>Thank you for your request for event management quotes<br/>We will get in touch with you shortly.</td></tr></table>';			
			if(msg == 'OK') { $("#fields1").hide(); }
		}
		else {
			result = msg;
		}
		//if(msg != 'OK')alert(result);
		$(this).html(result);
	});
	}
 	});
	return false;
	});
	
	
	$("#quote-request-form").submit(function(){
	// 'this' refers to the current submitted form
	var str = $(this).serialize();

   $.ajax({
   type: "POST",
   url: "quote-request-form.php",
   data: str,
   success: function(msg){

	$("#note2").ajaxComplete(function(event, request, settings){
	var t = document.getElementById('progress');
	if (t) t.style.visibility='visible';

	if(msg == 'OK') {// Message Sent? Show the 'Thank You' message and hide the form
			result = '<table width="510" cellspacing="0" cellpadding="0"><tr><td>&nbsp;</td></tr><tr><td><span class="TextFont12">Quote Request Form</span></td></tr><tr><td>&nbsp;</td></tr><tr><td>Thank you for your request for quotes<br/>We will get in touch with you shortly.</td></tr></table>';			
			if(msg == 'OK') { $("#fields2").hide(); }
		}
		else {
			result = msg;
		}
		//alert(result);
		//if(msg != 'OK')alert(result);
		$(this).html(result);
	});
	}
 	});
	return false;
	});
	
	
$("#supplier-signup-form").submit(function(){
	// 'this' refers to the current submitted form
	var str = $(this).serialize();

   $.ajax({
   type: "POST",
   url: "supplier-signup-form.php",
   data: str,
   success: function(msg){

	$("#note3").ajaxComplete(function(event, request, settings){
		var t = document.getElementById('progress');
		if (t) t.style.visibility='visible';
									  
		if(msg == 'OK') {// Message Sent? Show the 'Thank You' message and hide the form
			result = '<table width="510" cellspacing="0" cellpadding="0"><tr><td>&nbsp;</td></tr><tr><td><span class="TextFont12">Supplier Signup Form</span></td></tr><tr><td>&nbsp;</td></tr><tr><td>Thank you for your sending your information<br/>We will get in touch with you shortly.</td></tr></table>';			
			if(msg == 'OK') { $("#fields3").hide(); }
		}
		else {
			result = msg;
		}
		//alert(result);
		//if(msg != 'OK')alert(result);
		$(this).html(result);
	});
	}
 	});
	return false;
	});
});