// Start XmlHttp Object

function uzXmlHttp()
{
			var xmlhttp = false;
			try
			{
						xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch(e)
			{
						try
						{
								xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
						}
						catch(e)
						{
								xmlhttp = false;
						}
			}
		 
			if(!xmlhttp && document.createElement)
			{
					xmlhttp = new XMLHttpRequest();
			}
		
			return xmlhttp;
}
// End XmlHttp Object

function form_session_clear()
{
	var url = 'clear_session.php';
	
	xmlhttp = uzXmlHttp();
	xmlhttp.open("POST", url, false);
	xmlhttp.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
	xmlhttp.send();
}

function confirm_form()
{ // custname pronun address email telephone question zipcode1 address1 custname1 telephone1 rapping1 zipcode2 address2 custname2 telephone2 rapping2

	var custname 		= document.getElementById('custname').value;
	var pronun 			= document.getElementById('pronun').value;
	var address 		= document.getElementById('address').value;
	var email		 	= document.getElementById('email').value;
	var telephone 		= document.getElementById('telephone').value;
	var question 		= document.getElementById('question').value;
	var zipcode1 		= document.getElementById('zipcode1').value;
	var address1		= document.getElementById('address1').value;
	var custname1 		= document.getElementById('custname1').value;
	var telephone1 		= document.getElementById('telephone1').value;
	//var rapping1 		= document.getElementById('rapping1').value;
	var zipcode2		= document.getElementById('zipcode2').value;
	var address2		= document.getElementById('address2').value;
	var custname2 		= document.getElementById('custname2').value;
	var telephone2 		= document.getElementById('telephone2').value;
	//var rapping2 		= document.getElementById('rapping2').value;

	var rapping1 		= document.form1.rapping1;
	var rapping2 		= document.form1.rapping2;
			
	var rapping1Buffer					= "";
	for(var i=0;rapping1Counter=rapping1[i];i++) 
	{
			rapping1Buffer = (rapping1Counter.checked) ? (rapping1Counter.value) : (rapping1Buffer);
	}
	rapping1 = rapping1Buffer;
	
	var rapping2Buffer					= "";
	for(var i=0;rapping2Counter=rapping2[i];i++) 
	{
			rapping2Buffer = (rapping2Counter.checked) ? (rapping2Counter.value) : (rapping2Buffer);
	}
	rapping2 = rapping2Buffer;
	
	var kg2no_1 		= document.getElementById('kg2no_1').value;
	var kg5no_1 		= document.getElementById('kg5no_1').value;
	var kg2no_2 		= document.getElementById('kg2no_2').value;
	var kg5no_2 		= document.getElementById('kg5no_2').value;
	
	//alert(rapping1 + rapping2)
	var url = 'contact_conf_submit.php';
	
	xmlhttp = uzXmlHttp();
	xmlhttp.open("POST", url, false);
	xmlhttp.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
	xmlhttp.send("custname=" + custname + "&pronun=" + pronun + "&address=" + address + "&email=" + email + "&telephone=" + telephone + "&question=" + question + "&zipcode1=" + zipcode1 + "&address1=" + address1 + "&custname1=" + custname1 + "&telephone1=" + telephone1 + "&rapping1=" + rapping1 + "&zipcode2=" + zipcode2 + "&address2=" + address2 + "&custname2=" + custname2 + "&telephone2=" + telephone2 + "&rapping2=" + rapping2 + "&kg2no_1=" + kg2no_1 + "&kg5no_1=" + kg5no_1 + "&kg2no_2=" + kg2no_2 + "&kg5no_2=" + kg5no_2); // kg2no_1 kg5no_1 kg2no_2 kg5no_2

	//alert(xmlhttp.responseText);
	eval(xmlhttp.responseText);
}

function contact_form()
{ // custname pronun address email telephone question zipcode1 address1 custname1 telephone1 rapping1 zipcode2 address2 custname2 telephone2 rapping2
//alert('in');
	var custname 		= document.getElementById('custname').value;
	var pronun 			= document.getElementById('pronun').value;
	var address 		= document.getElementById('address').value;
	var email		 	= document.getElementById('email').value;
	var telephone 		= document.getElementById('telephone').value;
	var question 		= document.getElementById('question').value;
	var zipcode1 		= document.getElementById('zipcode1').value;
	var address1		= document.getElementById('address1').value;
	var custname1 		= document.getElementById('custname1').value;
	var telephone1 		= document.getElementById('telephone1').value;	
	var zipcode2		= document.getElementById('zipcode2').value;
	var address2		= document.getElementById('address2').value;
	var custname2 		= document.getElementById('custname2').value;
	var telephone2 		= document.getElementById('telephone2').value;
	
	var rapping1 		= document.form1.rapping1;
	var rapping2 		= document.form1.rapping2;
			
	var rapping1Buffer					= "";
	for(var i=0;rapping1Counter=rapping1[i];i++) 
	{
			rapping1Buffer = (rapping1Counter.checked) ? (rapping1Counter.value) : (rapping1Buffer);
	}
	rapping1 = rapping1Buffer;
	
	var rapping2Buffer					= "";
	for(var i=0;rapping2Counter=rapping2[i];i++) 
	{
			rapping2Buffer = (rapping2Counter.checked) ? (rapping2Counter.value) : (rapping2Buffer);
	}
	rapping2 = rapping2Buffer;	

	var kg2no_1 		= document.getElementById('kg2no_1').value;
	var kg5no_1 		= document.getElementById('kg5no_1').value;
	var kg2no_2 		= document.getElementById('kg2no_2').value;
	var kg5no_2 		= document.getElementById('kg5no_2').value;
	//alert(rapping1 + rapping2) // kg2no_1 kg5no_1 kg2no_2 kg5no_2
	var url = 'contact_form_submit.php';
	
	xmlhttp = uzXmlHttp();
	xmlhttp.open("POST", url, false);
	xmlhttp.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
	xmlhttp.send("custname=" + custname + "&pronun=" + pronun + "&address=" + address + "&email=" + email + "&telephone=" + telephone + "&question=" + question + "&zipcode1=" + zipcode1 + "&address1=" + address1 + "&custname1=" + custname1 + "&telephone1=" + telephone1 + "&rapping1=" + rapping1 + "&zipcode2=" + zipcode2 + "&address2=" + address2 + "&custname2=" + custname2 + "&telephone2=" + telephone2 + "&rapping2=" + rapping2 + "&kg2no_1=" + kg2no_1 + "&kg5no_1=" + kg5no_1 + "&kg2no_2=" + kg2no_2 + "&kg5no_2=" + kg5no_2); // kg2no_1 kg5no_1 kg2no_2 kg5no_2

	//alert(xmlhttp.responseText);
	eval(xmlhttp.responseText);
}