document.cardType = '';
document.payType = '';

function goTo( targetdiv ) {
	//        alert("card: " + document.cardType + " payment: " + document.payType );
	if (document.cardType == '' || document.payType == '') {
		highlighter(targetdiv);
		document.getElementById(targetdiv).className = "doshow cardSelectHighlight";
	} else {
		document.getElementById('cardtype').innerHTML = document.cardType;
		document.getElementById('paytype').innerHTML = document.payType;
		if (document.cardType == 'Mastercard' && document.payType == "Pay Monthly" ) {
			document.getElementById('getcardlink').href  = "../external.html?link=https://www.tuxedomoney.com/Admin/Public/Register.aspx?Scheme=5&amp;Ccode=P0161";
		} else if (document.cardType == 'Mastercard' && document.payType == "Pay As You Go") {
			document.getElementById('getcardlink').href  = "../external.html?link=https://www.tuxedomoney.com/Admin/Public/Register.aspx?Scheme=3&amp;Ccode=P0161";
		} else if (document.cardType == 'Maestro' && document.payType == "Pay Monthly") {
			document.getElementById('getcardlink').href  = "../external.html?link=https://www.tuxedomoney.com/Admin/Public/Register.aspx?Scheme=9&amp;Ccode=P0161";
		} else if (document.cardType == 'Maestro' && document.payType == "Pay As You Go") {
			document.getElementById('getcardlink').href  = "../external.html?link=https://www.tuxedomoney.com/Admin/Public/Register.aspx?Scheme=1&amp;Ccode=P0161";
		}
		highlighter('cardSelectA');
		document.getElementById('cardSelectA').className = "doshow cardSelectHighlight";
	}
}

function highlighter(targetdiv) {
	divs = document.getElementsByTagName('div');
	for (var divcursor = 0 ; divcursor < divs.length ; divcursor++) {
	// alert(divs[divcursor].className);
		if (divs[divcursor].id != targetdiv && divs[divcursor].className == "doshow cardSelectHighlight") {
			document.getElementById(divs[divcursor].id).className = "doshow cardSelect";
		} 
	}
}    

function setMastercard() {
	document.cardType = "Mastercard";
}

function setMaestro() {
	document.cardType = "Maestro";
}

function setPaygo() {
	document.payType = "Pay As You Go";
}

function setPayMonth() {
	document.payType = "Pay Monthly";
}

function resetWizard() {
	document.payType = '';
	document.cardType = '';
	document.getElementById('cardSelectQ1').className = "doshow cardSelectHighlight";
	document.getElementById('cardSelectQ2').className = "noshow";
	document.getElementById('cardSelectQ3').className = "noshow";
	document.getElementById('cardSelectQ4').className = "noshow";
	document.getElementById('cardSelectQ5').className = "noshow";    
	document.getElementById('cardSelectA').className = "noshow";    
}