<!--
	
	 
 
	function choosePicture() { 
      if (document.images) { 
         randomNum = Math.floor((Math.random() * myPictures.length)); 
         document.mainPicture.src = myPictures[randomNum];
      } 
   } 
   
	function initApplySave() {
		if (document.all || document.getElementById) {
			document.forms['applySaveForm'].elements['applySaveForm:civicRegNrFirst'].focus();
			if (document.forms['applySaveForm']['applySaveForm:hasEmail'].checked == false) {
				hideEmailField();
			}
		} else if (document.layers) {
			document.layers[0].document.forms['applySaveForm'].elements['applySaveForm:civicRegNrFirst'].focus();
			if (document.layers[0].document.forms['applySaveForm']['applySaveForm:hasEmail'].checked == false) {
				hideEmailField();
			}
		}
	}

	function initApplySparkonto() {
		if (document.all || document.getElementById || document.layers) {
			document.forms['applySparkontoForm'].elements['applySparkontoForm:civicRegNrFirst'].focus();
		}
	}
	
	function initApplySparkontoNo() {
		if (document.all || document.getElementById || document.layers) {
			document.forms['applySparkontoForm'].elements['applySparkontoForm:civicRegNrFirstNo'].focus();
		}
	}
	
	function initChoosePassword() {
		if (document.all || document.getElementById) {
			document.forms['choosePwForm'].elements['choosePwForm:password'].focus();
		} else if (document.layers) {
			document.layers[0].document.forms['choosePwForm'].elements['choosePwForm:password'].focus();
		}	
	}
	
	function initAgForm() {
		if (document.all || document.getElementById) {
			document.forms['agFormForm'].elements['agFormForm:agAmount'].focus();
		} else if (document.layers) {
			document.layers[0].document.forms['agFormForm'].elements['agFormForm:agAmount'].focus();
		}
	}

	function showHelp(index) {
		if (document.layers) {			//i.e. Netscape   
			document.helpHeader.document.write(helpHeaders[index]);
			document.helpHeader.document.close();
			document.helpText.document.write(helpTexts[index]);
 			document.helpText.document.close();
		}
		if (document.all) {				//i.e. Some (older) versions of Internet Explorer for Mac
			document.all.helpHeader.innerHTML = helpHeaders[index];
			document.all.helpText.innerHTML = helpTexts[index];
		}
    	else if (document.getElementById) {		//i.e. Internet Explorer for PC
			document.getElementById("helpHeader").innerHTML=helpHeaders[index];
			document.getElementById("helpText").innerHTML=helpTexts[index];
      	}
		return false;
	}
	
	function showHelpAboutSave(index) {
		if (document.layers) {			//i.e. Netscape   
			document.helpHeader.document.write(helpHeaders[index]);
			document.helpHeader.document.close();
			document.helpText.document.write(helpTextsAboutSave);
 			document.helpText.document.close();
		}
		if (document.all) {				//i.e. Some (older) versions of Internet Explorer for Mac
			document.all.helpHeader.innerHTML = helpHeaders[index];
			document.all.helpText.innerHTML = helpTextsAboutSave;
		}
    	else if (document.getElementById) {		//i.e. Internet Explorer for PC
			document.getElementById("helpHeader").innerHTML=helpHeaders[index];
			document.getElementById("helpText").innerHTML=helpTextsAboutSave;
      	}
		return false;
	}
	
	
	function showOrHideEmailField(showOrHide) {
		if (showOrHide == "true") {
			showEmailField();
		}
		else {
			 hideEmailField();
		}
	}
	
	function hideEmailField() {
		if (document.all || document.getElementById) {	
			document.forms['applySparkontoForm'].elements['applySparkontoForm:emailAddress'].className = 'disabled';
		} else if (document.layers) {
			document.layers[0].document.forms['applySparkontoForm'].elements['applySparkontoForm:emailAddress'].className = 'disabled';
		}
	}
	
	function showEmailField() {
		if (document.all || document.getElementById) {	
			
			document.forms['applySparkontoForm'].elements['applySparkontoForm:emailAddress'].className = 'enabled';
			document.forms['applySparkontoForm'].elements['applySparkontoForm:emailAddress'].focus();
		} else if (document.layers) {
			document.layers[0].document.forms['applySparkontoForm'].elements['applySparkontoForm:emailAddress'].className = 'enabled';
			document.layers[0].document.forms['applySparkontoForm'].elements['applySparkontoForm:emailAddress'].focus();
		}
	}
	
	function keyPressedInCivicRegNrFirst(name_of_the_form) {
		if (document.all || document.getElementById) {	
			if(document.forms[name_of_the_form].elements[name_of_the_form + ':civicRegNrFirst'].value.length >= 6) {
				document.forms[name_of_the_form].elements[name_of_the_form + ':civicRegNrLast'].focus();
			}
		} else if (document.layers) {
			document.layers[0].document.forms[name_of_the_form].elements[name_of_the_form + ':civicRegNrLast'].focus();
		}
	}
	
	function keyPressedInCivicRegNrLast(name_of_the_form) {
		if (document.all || document.getElementById) {	 
			if(document.forms[name_of_the_form].elements[name_of_the_form + ':civicRegNrLast'].value.length >= 4) {
				document.forms[name_of_the_form].elements[name_of_the_form + ':firstName'].focus();
			}
		} else if (document.layers) {
			document.layers[0].document.forms[name_of_the_form].elements[name_of_the_form + ':firstName'].focus();
		}
	}
	
	function keyPressedInZipCode(name_of_the_form) {
		if (document.all || document.getElementById) {	
			if(document.forms[name_of_the_form].elements[name_of_the_form + ':zipCode'].value.length >= 5) {
				document.forms[name_of_the_form].elements[name_of_the_form + ':city'].focus();
			}
		} else if (document.layers) {
			document.layers[0].document.forms[name_of_the_form].elements[name_of_the_form + ':city'].focus();
		}
	}
	
	function keyPressedInPhoneNumberPrefix(name_of_the_form) {
		if (document.all || document.getElementById) {	
			if(document.forms[name_of_the_form].elements[name_of_the_form + ':phoneNumberPrefix'].value.length >= 4) {
				document.forms[name_of_the_form].elements[name_of_the_form + ':phoneNumber'].focus();
			}
		} else if (document.layers) {
			document.layers[0].document.forms[name_of_the_form].elements[name_of_the_form + ':phoneNumber'].focus();
		}
	}
	
// -->