
function Login(codice,password) {
	
	//alert('entro');
	var url = 'http://www.hotwingsviaggi.it/login.php?codice='+codice+'&password='+password;

	new Ajax.Request(url, {
		method: 'get',
		timeout: 0,
		asynchronous: false,  //false=chiamata bloccante; true=asincrona (non bloccante)
	  	onLoading: function(transport) {
			//$('response').innerHTML = '<img src="http://www.dimabiodiet.com/immagini/loading.gif" />';
		},
		onSuccess: function(transport) {
			//alert(transport.responseText);
			if(transport.responseText == 'ok'){
				location.href = "http://www.hotwingsviaggi.it/area-info-agenzia.php";
				return true;
			}else{
				$('response').innerHTML = transport.responseText;
				$('response').setStyle({ fontWeight: 'bold', width: '200px', color: 'red' });
			}
		}  
	});				
}

function Logout(page) {
	
	//alert('entro');
	var url = 'http://www.hotwingsviaggi.it/logout.php';

	new Ajax.Request(url, {
		method: 'get',
		timeout: 0,
		//asynchronous: false,  //false=chiamata bloccante; true=asincrona (non bloccante)
	  	onLoading: function(transport) {
			//$('response').innerHTML = '<img src="http://www.dimabiodiet.com/immagini/loading.gif" />';
		},
		onSuccess: function(transport) {
			//alert(transport.responseText);
			//location.href = "http://www.dimabiodiet.com/"+page+".php";
			//return true;
			$('response').innerHTML = transport.responseText;
		}  
	});				
}


