<!-- Script to determine which web servicing application to launch.

// Reset the error on the form.
function resetError() {
	setError( '' );
}

// Set the error on the form.
// errorMessage := the error message to be displayed.
function setError( errorMessage ) {
	var error = document.getElementById( 'error' );
	
	error.innerHTML = errorMessage;
}

// Interrogates the selections made and launches web servicing using the
// appropriate lookup code.
function launchServicing() {
	resetError();
	
	var launch = false;
	
	var productSelect = document.buyForm.product;
	var product;

	for( var i = 0; i < productSelect.length; i++ ) {
		if( productSelect[i].checked ) {
			launch = true;
			product = productSelect[i].value;
		}
	}
	
	if( !launch ){
		setError( 'You must select at least one of the options to continue and purchase a policy.<br>' );
	}
	else{
		document.location.href = 'https://www2.respondingtolife.com/assist/policyapp/application.cpp?' + product;
	}
}

function launchIdentityProtection(){
	window.location = 'https://www2.respondingtolife.com/assist/policyapp/application.cpp?id=C45EF1FF320DC2D6D1066B99B4E024E9&type=2&term=1';	
}
//-->