var stSoftwareUri = "";

function checkForURI() {
	// Store the page query string (QS) value
	var stQS = window.location.search;
	// Find out if QS value contains a software uri value
	var intUriStart = stQS.indexOf("uri=");
	if ( intUriStart >= 0 ) {
		// Check if another name/value pair occurs after the URI value in the QS.
		var intUriEnd =  stQS.indexOf("&", intUriStart);
		if ( intUriEnd == -1 ) {
			intUriEnd = stQS.length;
		}
		stSoftwareUri = stQS.substring(intUriStart+4, intUriEnd);
	}
	if (stSoftwareUri == "") {
		window.history.back();
	}
}

function acceptAgreement() {
	window.location = stSoftwareUri;
}


