
function calFee() 
{
	fee = 110;
	if (myForm.expressService.checked == true) { fee = 410; }

	// display the fee and update the fee hidden field
	fee = addCommas(fee);
	paymentAmount.innerHTML = fee;
	myForm.feeAmount.value = fee;
}

function addSignatories()
{
	var signatories  = myForm.numberOfSignatories.value;
	if (signatories>0) {
		for (i=signatories;i<6;i++)
		{
			var signatoryRow = 'signatory'+i;
			var row  = document.getElementById(signatoryRow);
			row.style.display = 'none';
		}
		for (i=1;i<=signatories;i++) {
			var signatoryRow = 'signatory'+i;
			var row  = document.getElementById(signatoryRow);
			row.style.display = 'block';
		}
	} else {
		for (i=1;i<6;i++)
		{
			var signatoryRow = 'signatory'+i;
			var row  = document.getElementById(signatoryRow);
			row.style.display = 'none';
		}
	}
}

function addReprsentatives()
{
	var reprsentatives  = myForm.numberOfReprsentatives.value;
	if (reprsentatives>0) {
		for (i=reprsentatives;i<6;i++)
		{
			var reprsentativeRow = 'reprsentative'+i;
			var row  = document.getElementById(reprsentativeRow);
			row.style.display = 'none';
		}
		for (i=1;i<=reprsentatives;i++) {
			var reprsentativeRow = 'reprsentative'+i;
			var row  = document.getElementById(reprsentativeRow);
			row.style.display = 'block';
		}
	} else {
		for (i=1;i<6;i++)
		{
			var reprsentativeRow = 'reprsentative'+i;
			var row  = document.getElementById(reprsentativeRow);
			row.style.display = 'none';
		}
	}
}


function callAllFunctions()
{
	calFee();
	addSignatories();
}

function alertText()
{
	var txt='"Online Services" Registration form should be attached with the "Authorized Signatory Card" application at the time of submission. See the requirements below.';
	alert(txt);

}	
