function switchAgreeButton () {
	// Check that the user has checked the right tick boxes
	// if they have enable the button, otherwise disable it
	
	var checkout_div = document.getElementById( 'checkout_buttons' );
	
	var agreeMedical = document.getElementById( 'agreeMedical' ).checked;
	var agreeSummary = document.getElementById( 'agreeSummary' ).checked;
	var agreeAdequate = document.getElementById( 'agreeAdequate' ).checked;

	var agreeButton = document.getElementById( 'agreeButton' );
	
	if (agreeMedical && agreeSummary && agreeAdequate) {
		agreeButton.disabled = false;
		Element.show('checkout_buttons');
		Element.hide('checkout_text');
	}
	else {
		agreeButton.disabled = true;
		Element.hide('checkout_buttons');
		Element.show('checkout_text');
	}
}


function printSummary(pdf) {
	alert( "Printing the Policy Summary\n\nThe Policy Summary is currently being loaded. When it has loaded you can print the policy summary by clicking the print button or choosing 'Print' from the 'File' menu." );
	window.open( pdf );
}


function popupKeyFacts()
{
	window.open( "/keyfacts.html", 'popupKeyFacts', 'width=350,height=400,left=20,top=20,,scrollbars=yes' );
}

function displayComparePolicies(){
	
	queryString = Form.serialize('multiquoteForm');

	window.open('/travel_insurance/compare_policies.php?' + queryString, 'Compare_Policies', 'height=600,width=550, left=20,top=20,scrollbars=yes,resizable=yes');
}

function update_schedule(){
	quote = document.getElementById('quote').value;
	sc = document.getElementById('sc').value;
	schedule = document.getElementById('comparison_dropdown').value;
	location.href = "/travel_insurance/quote/"	+quote+ "/"+sc+"/update_benefit_"+schedule+"/";
	
}

function quickjump(url){
	
	 parent.location=url;
	 
	 return true
}