function checkEnter(e) {
var characterCode;
if(e && e.which) {
	e = e;
	characterCode = e.which;
}
else{
	e = event;
	characterCode = e.keyCode;
}
if(characterCode == 13){
	CalSearch2();
	return false;
}
else{
	return true;
}
}

function CalSearch() {
	if (getObj('calkey').value.length < 3) {
		alert('Εισάγετε λέξη μεγαλύτερη από 2 χαρακτήρες..');		
	}
	else {
	getObj('CalCont').innerHTML = "<img src='http://www.shape.gr/myimages/ajax-cal.gif' width='66' height='66' style='margin-left:380px;margin-top:100px;'>"; 
	var httpReq = new ajaxObject('http://www.shape.gr/myincludes/calories_model.php', function fin(responseTxt,responseStat) {
	getObj('CalCont').innerHTML = responseTxt; 
}
);
	var data = "";
	data += "key=" + encodeURI(getObj('calkey').value);
	data += "&Action=CalSearch";
	httpReq.update(data,'GET');
	}
}

function CalSearch2() {
	if (getObj('calkey').value.length < 3) {
		alert('Εισάγετε λέξη μεγαλύτερη από 2 χαρακτήρες..');		
	}
	else {
	getObj('CalCont').innerHTML = "<img src='http://www.shape.gr/myimages/ajax-cal.gif' width='66' height='66' style='margin-left:300px;margin-top:100px;'>"; 
	var httpReq = new ajaxObject('http://www.shape.gr/myincludes/calories_model.php', function fin(responseTxt,responseStat) {
	getObj('CalCont').innerHTML = responseTxt; 
}
);
	var data = "";
	data += "key=" + encodeURI(getObj('calkey').value);
	data += "&Action=CalSearch2";
	httpReq.update(data,'GET');
	}
}
