function aloha() {
	
	$('jscheck').value = "1";
	var iphone = $F('iphcheck');
	//$('progress').style.display = "inline";
	if (iphone ==0)
	{
		$('status').update('<p><img id="progressimg" style="vertical-align: middle;" src="/images/progresso.gif"/> Παρακαλώ περιμένετε...</p>');
	}
	else if (iphone ==1)
	{
		//$('progress').style.display="block";
		$('progress').setStyle({'opacity':0.85, 'display':'block'});
	}
	//$('status').style.display='block';
	//$('status').update('<p><img id="progresso.gif" style="vertical-align: middle;margin:auto;" src="/images/progresso.gif"/></p>');
	var name = $F('name');
	//alert(name);
	var area = $F('area');
	var street = $F('street');
	var zipcode = $F('zipcode');
	/* if ($F('cuisine'))
	{
		var cuisine = $F('cuisine');
		var delivery = $F('delivery');
	}
	else
	{
		var cuisine = '';
		var delivery = 0;
	}
	if ($F('pubservtype'))
	{
		var pubservtype = $F('pubservtype');
	}
	else
	{
		var pubservtype = '';
	}
	*/
	//alert($F('telephone'));
	var telephone = $F('telephone');
	var type = $F('type');
	var lat = $F('lat');
	var long = $F('long');
	var js = $F('jscheck');
	var url = '/contribmanage.php';
	if (iphone==0) 
	{
		var pars = 'name=' + encodeURIComponent(name) + '&area=' + encodeURIComponent(area) + '&street=' + encodeURIComponent(street) + '&zipcode=' + encodeURIComponent(zipcode) + '&telephone=' + encodeURIComponent(telephone) + '&type=' + encodeURIComponent(type) + '&lat=' + encodeURIComponent(lat) + '&long=' + encodeURIComponent(long) + '&js=' + js + '&x=' + encodeURIComponent($F('x')) + '&y=' + encodeURIComponent($F('y')) + '&buyaka=' + encodeURIComponent($F('buyaka'));
		//alert("Ready to initiate Ajax request");
		// '&cuisine=' + encodeURIComponent(cuisine) + '&delivery=' + encodeURIComponent(delivery) + '&pubservtype=' + encodeURIComponent(pubservtype) +
	} else {
		var pars = 'name=' + encodeURIComponent(name) + '&area=' + encodeURIComponent(area) + '&street=' + encodeURIComponent(street) + '&telephone=' + encodeURIComponent(telephone) + '&type=' + encodeURIComponent(type) +  '&lat=' + encodeURIComponent(lat) + '&long=' + encodeURIComponent(long) + '&js=' + js + '&x=' + encodeURIComponent($F('x')) + '&y=' + encodeURIComponent($F('y')) + '&buyaka=' + encodeURIComponent($F('buyaka'));	
	}
	

	new Ajax.Request(
		url,
		{			
			method: 'post',
			parameters: pars,
			//onCreate:function() {
			//	if (iphone==1) {
			//		$('progress').style.display="block";
			//	}
			//alert('create'); },
			//onInteractive:function() { alert('interactive'); },
			onComplete: submitted
		});
		
	return false;
}


function submitted(origReq) {
	//alert("AJAX complete!");

	if (origReq.responseText.match(/665/))
	{
		if ($F('iphcheck')==1) 
		{
			//$('message').update('Rusty arithmetic? =)');
			//$('image').update('<img id="tick" src="/images/ex.png" />');
			animstatus.running = false;
			$('progress').update('<h2 id="message" style="padding: 0px; margin: 0px; margin-top: 20px; text-align: center; padding:5px; color: #fff;">Λάθος!</h2><div id="image" style="width: 128px; margin: auto; margin-top: 0px; margin-bottom: 0px; padding-bottom: 10px;"><img id="cutesat" src="/images/sign-no.png" /></div>');
			setTimeout("$('progress').setStyle({'opacity':0}); resetnotice();",2000);
		}
		
		$('status').update('<p><span style="color:#de3125;">Ωπ! Λάθος στην πρόσθεση; Πάμε ξανά.</span></p>');
		//alert("error!");
	}
	else if (origReq.responseText.match(/1/))
	{
		//alert("Good!");
		if ($F('iphcheck')==1) 
		{
			animstatus.running = false;
			//$('message').update('Thank you!');
			//$('image').update('<img id="tick" src="/images/tick.png" />');		
			$('progress').update('<h2 id="message" style="padding: 0px; margin: 0px; margin-top: 20px; text-align: center; padding:5px; color: #fff;">Thank you!</h2><div id="image" style="width: 128px; margin: auto; margin-top: 0px; margin-bottom: 0px; padding-bottom: 10px;"><img id="cutesat" src="/images/sign-yes.png" /></div>');
			setTimeout("$('progress').setStyle({'opacity':0}); resetnotice();",2000);
		}
		$('status').update('<p><span style="color:#1a7b0e;">Επιτυχής καταχώριση. Ευχαριστούμε!</span></p>');
		$('contribz').reset();
		init();
		$('zipcode').value= "";
		$('lat').value=0;
		$('long').value=0;
		$('bubble').value='';
		setTimeout ( "$('status').update('<p>Θέλετε να προσθέσετε άλλο ένα σημείο;</p>');", 3000 );
		
	}
	else if (origReq.responseText.match(/42/))
	{
		$('status').update('<p><span style="color:#de3125;">Σφάλμα στην καταχώριση. Παρακαλώ δοκιμάστε ξανά.</span></p>');
	}

	
}

