// 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 validateInputs(myInputs){
	inputLength = myInputs.length;
	var isChecked = false;
	for(i=0;i<inputLength;i++){
		if (myInputs[i].checked){
			return true;
		}
	}
	return false;
}	


function frmCheck(){
	if(validateInputs(document.wizard.transact) && validateInputs(document.wizard.encrypt) && validateInputs(document.wizard.infoType) && validateInputs(document.wizard.multi)){
		return true;
	}
	else{
		alert("Alla frågor är obligatoriska.");
		return false
	}
}


function tally(){
	if(frmCheck()){
		//Check to see if any EV boxes were selected
		/*if(document.wizard.infoType[4].checked){
			document.getElementById('trst').style.display = "block";
		}*/
		if(document.wizard.infoType[4].checked || document.wizard.multi[1].checked || document.wizard.encrypt[1].checked || document.wizard.transact[1].checked){
			/*document.getElementById('trst').style.display = "block";*/
			document.getElementById("product-name").innerHTML = "VeriSign Trust-sigill";
			document.getElementById("product-btn").innerHTML = '<a href="https://trust-center.verisign.se/process/retail/trust_initial?application_locale=VRSN_SE"><img src="/assets/ssl/images/dev041720.gif" alt="K&#246;p VeriSign SSL-certifikat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/trust-seal/index.html"><strong>L&#228;s mer</strong></a>';
		}
		
		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 med 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.se/vcce/enterprise/enterprise_account_enroll?productType=HASGCServer&application_locale=VRSN_SE&prepaidUnits=4"><img src="/assets/ssl/images/dev041720.gif" alt="K&#246;p VeriSign SSL-certifikat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/extended-validation-pro-ssl-certificates/index.html"><strong>L&#228;s mer</strong></a>';
					}else{
						//No Enterprise Account Recommendation
						document.getElementById("product-btn").innerHTML = '<a href="https://ssl-certificate-center.verisign.se/process/retail/initial?productType=HASGCServer"><img src="/assets/ssl/images/dev041720.gif" alt="K&#246;p VeriSign SSL-certifikat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/extended-validation-pro-ssl-certificates/index.html"><strong>L&#228;s mer</strong></a>';
					}
			}else{
				//Secure Site with EV Recommendation
				document.getElementById("product-name").innerHTML = "Secure Site med 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.se/vcce/enterprise/enterprise_account_enroll?productType=HAServer&application_locale=VRSN_SE&prepaidUnits=4"><img src="/assets/ssl/images/dev041720.gif" alt="K&#246;p VeriSign SSL-certifikat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/extended-validation-ssl-certificates/index.html"><strong>L&#228;s mer</strong></a>';
					}else{
						//No Enterprise Account Recommendation
						document.getElementById("product-btn").innerHTML = '<a href="https://ssl-certificate-center.verisign.se/process/retail/initial?productType=HAServer"><img src="/assets/ssl/images/dev041720.gif" alt="K&#246;p VeriSign SSL-certifikat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/extended-validation-ssl-certificates/index.html"><strong>L&#228;s mer</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.se/vcce/enterprise/enterprise_account_enroll?productType=GlobalServerClass3&application_locale=VRSN_SE&prepaidUnits=4"><img src="/assets/ssl/images/dev041720.gif" alt="K&#246;p VeriSign SSL-certifikat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/secure-site-pro-ssl-certificates/index.html"><strong>L&#228;s mer</strong></a>';
					}else{
						//No Enterprise Account Recommendation
						document.getElementById("product-btn").innerHTML = '<a href="https://ssl-certificate-center.verisign.se/process/retail/initial?productType=GlobalServerClass3"><img src="/assets/ssl/images/dev041720.gif" alt="K&#246;p VeriSign SSL-certifikat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/ssl/buy-ssl-certificates/secure-site-pro-ssl-certificates/index.html"><strong>L&#228;s mer</strong></a>';
					}
		}else{
			//Secure Site without EV
			/*document.getElementById('trst').style.display = "block";*/
			document.getElementById("product-name").innerHTML = "VeriSign Trust-sigill";
			document.getElementById("product-btn").innerHTML = '<a href="https://trust-center.verisign.se/process/retail/trust_initial?application_locale=VRSN_SE"><img src="/assets/ssl/images/dev041720.gif" alt="K&#246;p VeriSign SSL-certifikat" /></a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="/trust-seal/index.html"><strong>L&#228;s mer</strong></a>';
		}
		//Show seal and disclaimer, along with final results
		document.getElementById('seal').style.display = "block";
		document.getElementById("prod-wiz").style.display = "none";
		document.getElementById("product").style.display = "block";
	}
}

window.onload = init; 


