function checkIt(evt) {
    evt = (evt) ? evt : window.event
    var charCode = (evt.which) ? evt.which : evt.keyCode
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
        status = "This field accepts numbers only."
        return false
    }
//if (e.shiftkey) return false;
    status = ""
    return true
}

function showbtn() {}

function senddata() {
  if($('visits').value && $('conversions').value && $('profit').value) {
	$('showcf').setStyle('display', 'none');
	var url = "http://www.netstudio.gr/conversionratecalculator/ajax.php?lang=el";
	var postString = "visits=" + $('visits').value + "&conversions=" + $('conversions').value + "&profit=" + $('profit').value + "&cost=" + $('cost').value;
	new Ajax(url, {
		method: 'post',
		data: postString,
		update: $('results')
	}).request();
  }
}

window.addEvent('domready', function(){
$('visits').addEvent('change', function(e) {
	showbtn();
});
$('conversions').addEvent('change', function(e) {
	showbtn();
});
$('profit').addEvent('change', function(e) {
	showbtn();
});
$('cost').addEvent('change', function(e) {
	showbtn();
});
$('calculatecr').addEvent('click', function(e) {
	senddata();
});

});