
function SE_FormInit()  { 
	var formName = "";
	var paramVal = "";
	var urlParts = document.URL.split('/');
	var fileName = urlParts.pop();
	if (fileName.indexOf("TrialRequest.html") >= 0) {
		formName = "StyleEaseDemoForm";
	}
	else if (fileName.indexOf("PurchaseRequest.html") >= 0) {
		formName = "StyleEasePurchaseForm";
	}
	else {
		return;		// Exit function because this isn't one of our forms
	}

	var loc = fileName.indexOf("=");
	if (loc >= 0) {
		paramVal = fileName.substring(loc+1);
		var prodNames = ["APA", "MLA", "Chicago", "Seminary"];
		var selectIndex = 0;
		for (var i in prodNames) {
			if (paramVal == prodNames[i]) {
				selectIndex = i;
			}
		}
		document.forms[formName].Product.options[selectIndex].selected="selected";
	}
}


function SEBuyCheckPcAgree()
{
	if (document.StyleEasePurchaseForm.IsPcPurchase.checked) {
		setUrchinInputCode();
		return true;
	}
	else
	{
		alert('Please click the box to acknowledge that you are using StyleEase on Windows (not MacOS)');
		return false;
	}
}

