
               function postRequest(strURL){
                    var ajax = getXMLHttpRequestObject();

                    ajax.open('POST', strURL, true);
                    ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
                    ajax.onreadystatechange = function(){
                         if (ajax.readyState == 4){
                              updatepage(ajax.responseText);
                         }
                    }
                    ajax.send(strURL);
               }
			   
			   
				 function getRadioValue(radioObject) {
					  var value = null
					  for (var i=0; i<radioObject.length; i++) {
						   if (radioObject[i].checked) {
								value = radioObject[i].value;
								break ;
						   }
					  }
					  return value
				 }
				 
				 function testCheckbox(oCheckbox) {
						var checkbox_val = oCheckbox.value;
						
						if(oCheckbox.checked == true) {
						return oCheckbox.value;
						
						} else {
						
						return 10;
						
						}
						
						} 
               
               function updatepage(str){
                    document.getElementById('price').value = str;
               }
               
               function callProcess(){
                    var a = getRadioValue(document.costa.genre);
                    var b = getRadioValue(document.costa.cabin);
					var c = parseInt(document.costa.len.value);
					var d = testCheckbox(document.costa.cq);
					var e = testCheckbox(document.costa.uft);
					var f = parseInt(document.costa.stroke.value);
					var g = testCheckbox(document.costa.ukt);
					var h = testCheckbox(document.costa.lbt);
					var i = getRadioValue(document.costa.fin);
					var j = getRadioValue(document.costa.tran);
					var k = testCheckbox(document.costa.wht);
					var l = testCheckbox(document.costa.efo);
					var m = testCheckbox(document.costa.ec);
					var n = testCheckbox(document.costa.anc);
					var o = testCheckbox(document.costa.sfaw);
					var p = testCheckbox(document.costa.rcd);
					var q = testCheckbox(document.costa.furs);
					var r = testCheckbox(document.costa.rl);
					var s = parseInt(document.costa.gps.value);
					var t = getRadioValue(document.costa.str);
					var u = getRadioValue(document.costa.s2);
					var v = getRadioValue(document.costa.sm2);
					var w = testCheckbox(document.costa.tlr);
					var x = testCheckbox(document.costa.sos);
					var y = testCheckbox(document.costa.rh);
					var z = testCheckbox(document.costa.dbp);
					var a1 = testCheckbox(document.costa.bb);
					var b1 = testCheckbox(document.costa.tb);
					var c1 = testCheckbox(document.costa.sh);
					var d1 = testCheckbox(document.costa.bl);
					var d2 = parseInt(document.costa.htop.value);
					var d3 = parseInt(document.costa.blen.value);


					var url = "process.php?genre=" + a + "&cabin=" + b + "&len=" + c + "&cq=" + d + "&uft=" + e + "&stroke=" + f + "&ukt=" + g + "&lbt=" + h + "&fin=" + i + "&tran=" + j + "&wht=" + k + "&efo=" + l + "&ec=" + m + "&anc=" + n + "&sfaw=" + o + "&rcd=" + p + "&furs=" + q + "&rl=" + r + "&gps=" + s + "&str=" + t + "&s2=" + u + "&sm2=" + v + "&tlr=" + w + "&sos=" + x + "&rh=" + y + "&dbp=" + z + "&bb=" + a1 + "&tb=" + b1 + "&sh=" + c1 + "&bl=" + d1 + "&ht=" + d2 + "&b2=" + d3 + "";
                    postRequest(url);
               }
// JavaScript Document