function confirmAgreement(url) { 
	if (hasConfirmedAgreement()) { 
		location = url; 
	} else { 
		//location = 'agreement.php?file=' + escape(url); 
		var cwin = window.open('agreement.php?file=' + escape(url), 'Agreement', 'scrollbars,resizable,width=610,height=610');
		cwin.focus(); 
	}   // if 
}   // confirmAgreement 

function hasConfirmedAgreement() { 
	var response = $.ajax({
		type: "GET",
		url: 'check_response.php',
		data: '',
		async: false, 
		error: function(request, msg){
			//alert( "Server timeout: " + formDesc + ":" + msg );
		}, 
		success: function(request) { 
			// alert( "Saved" ); 
		} 
	}); 
	var data = response.responseText; 
	return parseInt(data) != 0; 
}   // hasConfirmedAgreement 

