function test(){

var xmlhttp=false;
var rate = 0;
var equals = 0;

if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
else if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}	

document.forms.converter.equals.value="Connecting...";

var from = document.forms.converter.from.value;
var to = document.forms.converter.to.value;
var amount = document.forms.converter.amount.value;


 xmlhttp.open("GET", "http://robwat.p1718.futuro.pl/property/currencyConverter/yahoo_currency.php?currency_from="+from+"&currency_to="+to,true);
 xmlhttp.onreadystatechange=function() {
 
  if (xmlhttp.readyState==4) {
   rate = xmlhttp.responseText;
   
   equals = rate * amount;
   
   document.forms.converter.equals.value=""+equals;
   
  }
 }
 xmlhttp.send(null)
}
