// SSL Product Selection Wizard
function none(){
	if(document.wizard.infoType[4].checked){
		document.wizard.infoType[0].checked = false;
		document.wizard.infoType[1].checked = false;
		document.wizard.infoType[2].checked = false;
		document.wizard.infoType[3].checked = false;
		
		
		document.wizard.infoType[0].disabled = true;
		document.wizard.infoType[1].disabled = true;
		document.wizard.infoType[2].disabled = true;
		document.wizard.infoType[3].disabled = true;
		
	}else{
		document.wizard.infoType[0].disabled = false;
		document.wizard.infoType[1].disabled = false;
		document.wizard.infoType[2].disabled = false;
		document.wizard.infoType[3].disabled = false;
		
	}
}

function init(){
	document.getElementById('ev').style.display = "none";
	document.getElementById('sgc').style.display = "none";
	document.getElementById('seal').style.display = "none";
	document.getElementById('dis').style.display = "none";
	document.getElementById('trst').style.display = "none";
}

function frmCheck(){
	if(document.wizard.transact[0].checked==false && document.wizard.transact[1].checked==false){
		alert("All questions are required.");
		return false;
	}else if(document.wizard.encrypt[0].checked==false && document.wizard.encrypt[1].checked==false){
		alert("All questions are required.");
		return false;
	}else if(document.wizard.multi[0].checked==false && document.wizard.multi[1].checked==false){
		alert("All questions are required.");
		return false;
	}else{
		return true;
	}
}

function tally(){
	if(frmCheck()){
		//Check to see if any EV boxes were selected
		if(document.wizard.infoType[0].checked || document.wizard.infoType[1].checked || document.wizard.transact[0].checked){
			//Check to see which type of EV cert - Secure site pro or secure site
			if(document.wizard.infoType[0].checked || document.wizard.infoType[1].checked || document.wizard.infoType[2].checked || document.wizard.encrypt[0].checked){
				//Secure Site Pro with EV Recommendation
				document.getElementById("product-name").innerHTML = "Secure Site Pro with EV";
				document.getElementById('ev').style.display = "block";
				document.getElementById('sgc').style.display = "block";
					//Check for Enterprise account
					if(document.wizard.multi[0].checked){
						//Enterprise Account Recommendation
						document.getElementById('ent').style.display = "block";
						document.getElementById("product-btn").innerHTML = '<a href="https://ssl-certificate-center-enterprise.verisign.ch/vcce/enterprise/enterprise_account_enroll?application_locale=VRSN_CH"><img src="/stellent/groups/public/documents/image/dev041720.gif" alt="Buy Now" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/extended-validation-pro-ssl-certificates/index.html"><strong>Learn more</strong></a>';
					}else{
						//No Enterprise Account Recommendation
						document.getElementById("product-btn").innerHTML = '<a href="https://ssl-certificate-center.verisign.ch/process/retail/initial?productType=HASGCServer&application_locale=VRSN_CH"><img src="/stellent/groups/public/documents/image/dev041720.gif" alt="Buy Now" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/extended-validation-pro-ssl-certificates/index.html"><strong>Learn more</strong></a>';
					}
			}else{
				//Secure Site with EV Recommendation
				document.getElementById("product-name").innerHTML = "Secure Site with EV";
				document.getElementById('ev').style.display = "block";
				document.getElementById('sgc').style.display = "none";
					//Check for Enterprise account
					if(document.wizard.multi[0].checked){
						//Enterprise Account Recommendation
						document.getElementById('ent').style.display = "block";
						document.getElementById("product-btn").innerHTML = '<a href="https://ssl-certificate-center-enterprise.verisign.ch/vcce/enterprise/enterprise_account_enroll?application_locale=VRSN_CH"><img src="/stellent/groups/public/documents/image/dev041720.gif" alt="Buy Now" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/extended-validation-ssl-certificates/index.html"><strong>Learn more</strong></a>';
					}else{
						//No Enterprise Account Recommendation
						document.getElementById("product-btn").innerHTML = '<a href="https://ssl-certificate-center.verisign.ch/process/retail/initial?productType=HAServer&application_locale=VRSN_CH"><img src="/stellent/groups/public/documents/image/dev041720.gif" alt="Buy Now" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/extended-validation-ssl-certificates/index.html"><strong>Learn more</strong></a>';
					}
			}
		}else if(document.wizard.encrypt[0].checked){
			//Secure Site Pro without EV
			document.getElementById("product-name").innerHTML = "Secure Site Pro";
			document.getElementById('ev').style.display = "none";
			document.getElementById('sgc').style.display = "block";
					//Check for Enterprise account
					if(document.wizard.multi[0].checked){
						//Enterprise Account Recommendation
						document.getElementById('ent').style.display = "block";
						document.getElementById("product-btn").innerHTML = '<a href="https://ssl-certificate-center-enterprise.verisign.ch/vcce/enterprise/enterprise_account_enroll?application_locale=VRSN_CH"><img src="/stellent/groups/public/documents/image/dev041720.gif" alt="Buy Now" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/secure-site-pro-ssl-certificates/index.html"><strong>Learn more</strong></a>';
					}else{
						//No Enterprise Account Recommendation
						document.getElementById("product-btn").innerHTML = '<a href="https://ssl-certificate-center.verisign.ch/process/retail/initial?productType=GlobalServerClass3&application_locale=VRSN_CH"><img src="/stellent/groups/public/documents/image/dev041720.gif" alt="Buy Now" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/secure-site-pro-ssl-certificates/index.html"><strong>Learn more</strong></a>';
					}
		}else{
			//Secure Site without EV
			document.getElementById("product-name").innerHTML = "Secure Site";
			document.getElementById('ev').style.display = "none";
			document.getElementById('sgc').style.display = "none";
					//Check for Enterprise account
					if(document.wizard.multi[0].checked){
						//Enterprise Account Recommendation
						document.getElementById('ent').style.display = "block";
						document.getElementById("product-btn").innerHTML = '<a href="https://ssl-certificate-center-enterprise.verisign.ch/vcce/enterprise/enterprise_account_enroll?application_locale=VRSN_CH"><img src="/stellent/groups/public/documents/image/dev041720.gif" alt="Buy Now" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/secure-site-ssl-certificates/index.html"><strong>Learn more</strong></a>';
					}else{
						//No Enterprise Account Recommendation
						document.getElementById("product-btn").innerHTML = '<a href="https://ssl-certificate-center.verisign.ch/process/retail/initial?productType=VeriSignServerClass3&application_locale=VRSN_CH"><img src="/stellent/groups/public/documents/image/dev041720.gif" alt="Buy Now" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/secure-site-ssl-certificates/index.html"><strong>Learn more</strong></a>';
					}
		}
		//Show seal and disclaimer, along with final results
		document.getElementById('seal').style.display = "block";
		//document.getElementById('trst').style.display = "block";
		document.getElementById("prod-wiz").style.display = "none";
		document.getElementById("product").style.display = "block";
	}
}

window.onload = init; 
