function processGetPost(){
	document.getElementById("currency_convertor_output").innerHTML = 'Calculating...'
	var myajax=ajax.ajaxobj
	if (myajax.readyState == 4){ //if request of file completed
		if (myajax.status==200 || window.location.href.indexOf("http")==-1){
			document.getElementById("currency_convertor_output").innerHTML = myajax.responseText
		}
		else {
			document.getElementById("currency_convertor_output").innerHTML = 'Error'
		}
	}
}

function createstring(){
	var amount_currency_exchange=document.currencyForm4.amount_currency_exchange.value
	var conv_from_currency=document.currencyForm4.conv_from_currency.options[document.currencyForm4.conv_from_currency.selectedIndex].value

	var conv_to_currency=document.currencyForm4.conv_to_currency.options[document.currencyForm4.conv_to_currency.selectedIndex].value
	return "amount_currency_exchange=" + encodeURI(amount_currency_exchange) + "&from_currency=" + encodeURI(conv_from_currency)+ "&to_currency=" + encodeURI(conv_to_currency);
	
}

function createAjaxObj(){
	var httprequest=false
	if (window.XMLHttpRequest){
		httprequest=new XMLHttpRequest()
		if (httprequest.overrideMimeType)
			httprequest.overrideMimeType('text/xml')
		}
		else if (window.ActiveXObject){ // if IE
			try {
				httprequest=new ActiveXObject("Msxml2.XMLHTTP");
			} 
		catch (e){
			try{
				httprequest=new ActiveXObject("Microsoft.XMLHTTP");
			}
		catch (e){}
		}
	}
	return httprequest
}

var ajax=new Object()
	ajax.basedomain="http://"+window.location.hostname
	ajax.ajaxobj=createAjaxObj()
	ajax.getAjaxRequest=function(url, parameters, callbackfunc){
	ajax.ajaxobj=createAjaxObj()
	if (this.ajaxobj){
		this.ajaxobj.onreadystatechange=callbackfunc
		this.ajaxobj.open('GET', url+"?"+parameters, true)
		this.ajaxobj.send(null)
	}
}