var KQCvalidate = Class.create(
{
	initialize: function(obj)
	{
		var classRoot = this;
		this.obj = obj;
		
		var allTextElms = $$('#'+classRoot.obj.formId+' .'+classRoot.obj.text);
		var allNumElms = $$('#'+classRoot.obj.formId+' .'+classRoot.obj.num);
		var allZipElms = $$('#'+classRoot.obj.formId+' .'+classRoot.obj.zip);
		var allZipSeElms = $$('#'+classRoot.obj.formId+' .'+classRoot.obj.zipSe);
		var allEmailElms = $$('#'+classRoot.obj.formId+' .'+classRoot.obj.email);
		var allPhoneElms = $$('#'+classRoot.obj.formId+' .'+classRoot.obj.phone);
		var allPhoneElmsFi = $$('#'+classRoot.obj.formId+' .'+classRoot.obj.phoneFi);
		var allPhoneElmsSe = $$('#'+classRoot.obj.formId+' .'+classRoot.obj.phoneSe);
		var allPersonNr = $$('#'+classRoot.obj.formId+' .'+classRoot.obj.personNr);
		
		classRoot.allCheckElms = $$('#'+classRoot.obj.formId+' .'+classRoot.obj.check);
		
		classRoot.count = 0;
			
		if(allTextElms){
			allTextElms.each(function(elm,i){
				
				$(elm).observe('keyup', function(event){
					classRoot.text(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				$(elm).observe('click', function(event){
					classRoot.text(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				classRoot.count++;
				classRoot.updateStatus(elm,'error','span');
				
				classRoot.text(classRoot,elm);
				classRoot.validate(classRoot);
				
			});
		}
		
		if(allNumElms){
			allNumElms.each(function(elm,i){
				
				$(elm).observe('keyup', function(event){
					classRoot.num(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				$(elm).observe('click', function(event){
					classRoot.num(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				classRoot.count++;
				classRoot.updateStatus(elm,'error','span');
				
				classRoot.num(classRoot,elm);
				classRoot.validate(classRoot);
			});
		}
		
		if(allZipElms){
			allZipElms.each(function(elm,i){
				
				$(elm).observe('keyup', function(event){
					classRoot.zip(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				$(elm).observe('click', function(event){
					classRoot.zip(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				classRoot.count++;
				classRoot.updateStatus(elm,'error','span');
				
				classRoot.zip(classRoot,elm);
				classRoot.validate(classRoot);
			});
		}
		
		if(allZipSeElms){
			allZipSeElms.each(function(elm,i){
				
				$(elm).observe('keyup', function(event){
					classRoot.zipSe(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				$(elm).observe('click', function(event){
					classRoot.zipSe(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				classRoot.count++;
				classRoot.updateStatus(elm,'error','span');
				
				classRoot.zipSe(classRoot,elm);
				classRoot.validate(classRoot);
			});
		}
		
		if(allEmailElms){
			allEmailElms.each(function(elm,i){
				
				$(elm).observe('keyup', function(event){
					classRoot.email(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				$(elm).observe('click', function(event){
					classRoot.email(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				classRoot.count++;
				classRoot.updateStatus(elm,'error','span');
				
				classRoot.email(classRoot,elm);
				classRoot.validate(classRoot);
			});
		}
		
		if(allPhoneElms){
			allPhoneElms.each(function(elm,i){
				
				$(elm).observe('keyup', function(event){
					classRoot.phone(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				$(elm).observe('click', function(event){
					classRoot.phone(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				classRoot.count++;
				classRoot.updateStatus(elm,'error','span');
				
				classRoot.phone(classRoot,elm);
				classRoot.validate(classRoot);
			});
		}
		
		if(allPhoneElmsFi){
			allPhoneElmsFi.each(function(elm,i){
				
				$(elm).observe('keyup', function(event){
					classRoot.phoneFi(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				$(elm).observe('click', function(event){
					classRoot.phoneFi(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				classRoot.count++;
				classRoot.updateStatus(elm,'error','span');
				
				classRoot.phoneFi(classRoot,elm);
				classRoot.validate(classRoot);
			});
		}
		
		if(allPhoneElmsSe){
			allPhoneElmsSe.each(function(elm,i){
				
				$(elm).observe('keyup', function(event){
					classRoot.phoneSe(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				$(elm).observe('click', function(event){
					classRoot.phoneSe(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				classRoot.count++;
				classRoot.updateStatus(elm,'error','span');
				
				classRoot.phoneSe(classRoot,elm);
				classRoot.validate(classRoot);
			});
		}
		/* her*/
		
		if(allPersonNr){
			allPersonNr.each(function(elm,i){
				
				$(elm).observe('keyup', function(event){
					classRoot.personNr(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				$(elm).observe('click', function(event){
					$(elm).value = '';
					classRoot.personNr(classRoot,elm);
					classRoot.validate(classRoot);
				});
				
				classRoot.count++;
				classRoot.updateStatus(elm,'error','span');
				
				classRoot.personNr(classRoot,elm);
				classRoot.validate(classRoot);
			});
		}
		
		if(classRoot.allCheckElms){
			classRoot.allCheckElms.each(function(elm,i){
				
				$(elm).observe('click', function(event){
					classRoot.validate(classRoot);
				});
				
			});
			
			classRoot.validate(classRoot);
		}
		
		if(classRoot.obj.radio){
			classRoot.obj.radio.each(function(elm,i){
				
				var allRadioElms = $$('#'+classRoot.obj.formId+' .'+elm);
				
				allRadioElms.each(function(elm,i){

					$(elm).observe('click', function(event){
						classRoot.validate(classRoot);
					});

				});
				
			});
			
			classRoot.validate(classRoot);
		}
		
		if(classRoot.obj.dayOfBirth){
			classRoot.obj.dayOfBirth.each(function(elm,i){

				var allDayOfBirthElms = $$('#'+classRoot.obj.formId+' .'+elm);
				if(allDayOfBirthElms != ''){

						allDayOfBirthElms.each(function(elm,i){
							
							$(elm).observe('change', function(event){
								classRoot.dayOfBirth(classRoot,allDayOfBirthElms);
							});
							
							/*$(elm).observe('click', function(event){
								classRoot.dayOfBirth(classRoot,allDayOfBirthElms);
							});*/
						});
						
						classRoot.count++;
						classRoot.updateStatus(allDayOfBirthElms[0],'error','span');
						
						classRoot.dayOfBirth(classRoot,allDayOfBirthElms);
					
				}
				
			});
		}
		
		if(classRoot.obj.dayOfBirthSe){
			classRoot.obj.dayOfBirthSe.each(function(elm,i){

					var allDayOfBirthSeElms = $$('#'+classRoot.obj.formId+' .'+elm);
					if(allDayOfBirthSeElms != ''){
					
						allDayOfBirthSeElms.each(function(elm,i){
							
							if(i != 3){
								$(elm).observe('change', function(event){
									classRoot.dayOfBirthSe(classRoot,allDayOfBirthSeElms);
								});
							}else{
								$(elm).observe('click', function(event){
									classRoot.dayOfBirthSe(classRoot,allDayOfBirthSeElms);
									//$(elm).value = '';
								});
								
								$(elm).observe('keyup', function(event){
									classRoot.dayOfBirthSe(classRoot,allDayOfBirthSeElms);
								});
							}
						});
						
						classRoot.count++;
						classRoot.updateStatus(allDayOfBirthSeElms[0],'error','span');
						
						classRoot.dayOfBirthSe(classRoot,allDayOfBirthSeElms);
					}
				
			});
		}
	},
	
	getUrlParameter: function(parameter){
		parameter = parameter.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 
		var r1 = "[\\?&]"+parameter+"=([^&#]*)";
		var r2 = new RegExp( r1 );
		var r3 = r2.exec( window.location.href );
		if( r3 == null ) return "";
		else return r3[1];
	},
	
	phone: function(classRoot,elm){
		
		if($(elm).value.length > 8){
			$(elm).value = $(elm).value.substring(0,8);
		}
		
		$(elm).value = $(elm).value.replace(/^\s*|\s*$/g,'');
		
		if($(elm).value != "" && isNaN($(elm).value) == false && $(elm).value.length == 8){
			classRoot.updateStatus(elm,'correct','span');
		}else{
			classRoot.updateStatus(elm,'error','span');
		}
	},
	
	phoneFi: function(classRoot,elm){
		
		if($(elm).value.length > 10){
			$(elm).value = $(elm).value.substring(0,10);
		}
		
		$(elm).value = $(elm).value.replace(/^\s*|\s*$/g,'');
		
		if($(elm).value != "" && isNaN($(elm).value) == false && $(elm).value.length == 10 || $(elm).value != "" && isNaN($(elm).value) == false && $(elm).value.length == 9 || $(elm).value != "" && isNaN($(elm).value) == false && $(elm).value.length == 8){
			classRoot.updateStatus(elm,'correct','span');
		}else{
			classRoot.updateStatus(elm,'error','span');
		}
	},
	
	phoneSe: function(classRoot,elm){
		
		if($(elm).value.length > 10){
			$(elm).value = $(elm).value.substring(0,10);
		}
		
		$(elm).value = $(elm).value.replace(/^\s*|\s*$/g,'');
		
		if($(elm).value != "" && isNaN($(elm).value) == false && $(elm).value.length == 10 || $(elm).value != "" && isNaN($(elm).value) == false && $(elm).value.length == 9){
			classRoot.updateStatus(elm,'correct','span');
		}else{
			classRoot.updateStatus(elm,'error','span');
		}
	},
	
	email: function(classRoot,elm){
		
		var apos = $(elm).value.indexOf("@"); 
		var dotpos = $(elm).value.lastIndexOf(".");
		
		if($(elm).value == '' || apos < 1 || ((dotpos)-(apos)) < 2) 
		{ 
			classRoot.updateStatus(elm,'error','span');
		}else{
			classRoot.updateStatus(elm,'correct','span');
		}
	},
	
	zipSe: function(classRoot,elm){
		
		if($(elm).value.length > 5){
			$(elm).value = $(elm).value.substring(0,5);
		}
		
		$(elm).value = $(elm).value.replace(/^\s*|\s*$/g,'');
		
		if($(elm).value != "" && isNaN($(elm).value) == false && $(elm).value.length == 5){
			classRoot.updateStatus(elm,'correct','span');
		}else{
			classRoot.updateStatus(elm,'error','span');
		}
	},
	
	zip: function(classRoot,elm){
		
		if($(elm).value.length > 4){
			$(elm).value = $(elm).value.substring(0,4);
		}
		
		$(elm).value = $(elm).value.replace(/^\s*|\s*$/g,'');
		
		if($(elm).value != "" && isNaN($(elm).value) == false && $(elm).value.length == 4){
			classRoot.updateStatus(elm,'correct','span');
		}else{
			classRoot.updateStatus(elm,'error','span');
		}
	},
	
	text: function(classRoot,elm){
		if($(elm).value != ""){
			classRoot.updateStatus(elm,'correct','span');
		}else{
			classRoot.updateStatus(elm,'error','span');
		}
	},
	
	num: function(classRoot,elm){
		if($(elm).value != "" && isNaN($(elm).value) == false){
				classRoot.updateStatus(elm,'correct','span');
		}else{
				classRoot.updateStatus(elm,'error','span');
		}			
	},
	
	dayOfBirth: function(classRoot,allDayOfBirthElms){
		
		var day = '';
		var month = '';
		var year = '';
		
		for (var i = 0; i < $(allDayOfBirthElms[0]).options.length; i++) {
			
			if($(allDayOfBirthElms[0]).options[i].selected){
				day = $(allDayOfBirthElms[0]).options[i].value;
			}
		}
		
		for (var i = 0; i < $(allDayOfBirthElms[1]).options.length; i++) {
			
			if($(allDayOfBirthElms[1]).options[i].selected){
				month = $(allDayOfBirthElms[1]).options[i].value;
			}
		}
		
		for (var i = 0; i < $(allDayOfBirthElms[2]).options.length; i++) {
			
			if($(allDayOfBirthElms[2]).options[i].selected){
				year = $(allDayOfBirthElms[2]).options[i].value;
			}
		}
		
		/*if(allDayOfBirthElms[0].value.length > 2){
			allDayOfBirthElms[0].value = allDayOfBirthElms[0].value.substring(0,2);
		}
		
		if(allDayOfBirthElms[1].value.length > 2){
			allDayOfBirthElms[1].value = allDayOfBirthElms[1].value.substring(0,2);
		}
		
		if(allDayOfBirthElms[2].value.length > 4){
			allDayOfBirthElms[2].value = allDayOfBirthElms[2].value.substring(0,4);
		}
		
		if(allDayOfBirthElms[0].value > 31){
			allDayOfBirthElms[0].value = 31;
		}
		
		if(allDayOfBirthElms[1].value > 12){
			allDayOfBirthElms[1].value = 12;
		}*/
		
		if(day != '-' && month != '-' && year != '-'){
			classRoot.updateStatus(allDayOfBirthElms[0],'correct','span');
		}else{
			classRoot.updateStatus(allDayOfBirthElms[0],'error','span');
		}
	},
	dayOfBirthSe: function(classRoot,allDayOfBirthElms){
		
		var self = this;
		
		var day = '';
		var month = '';
		var year = '';
		
		for (var i = 0; i < $(allDayOfBirthElms[0]).options.length; i++) {
			
			if($(allDayOfBirthElms[0]).options[i].selected){
				day = $(allDayOfBirthElms[0]).options[i].value;
			}
		}
		
		for (var i = 0; i < $(allDayOfBirthElms[1]).options.length; i++) {
			
			if($(allDayOfBirthElms[1]).options[i].selected){
				month = $(allDayOfBirthElms[1]).options[i].value;
			}
		}
		
		for (var i = 0; i < $(allDayOfBirthElms[2]).options.length; i++) {
			
			if($(allDayOfBirthElms[2]).options[i].selected){
				year = $(allDayOfBirthElms[2]).options[i].value;
			}
		}
		
		if(allDayOfBirthElms[3].value.length > 4){
			allDayOfBirthElms[3].value = allDayOfBirthElms[3].value.substring(0,4);
		}
		
		allDayOfBirthElms[3].value = allDayOfBirthElms[3].value.replace(/^\s*|\s*$/g,'');
		
		/*if(allDayOfBirthElms[2].value > 31){
			allDayOfBirthElms[2].value = 31;
		}
		
		if(allDayOfBirthElms[1].value > 12){
			allDayOfBirthElms[1].value = 12;
		}*/
		
		if (day != '-' && month != '-' && year != '-' && allDayOfBirthElms[3].value.length == 4 
			&& isNaN(allDayOfBirthElms[3].value) == false)
		{
			classRoot.updateStatus(allDayOfBirthElms[0],'correct','span');
			
			/*if (classRoot.getUrlParameter('dev'))
			{
				new Ajax.Request('/index.php',
				{
					method:'get',
					parameters: {
						'c_': 'NU_BusinessCheck',
						'm_': 'creditTemplatePerson',
						'personNumber': day+month+year+allDayOfBirthElms[3].value,
						'firstName': $$('#'+classRoot.obj.formId+' .firstName')[0].value,
						'lastName': $$('#'+classRoot.obj.formId+' .lastName')[0].value,
						'address': $$('#'+classRoot.obj.formId+' .address')[0].value,
						'zipCode': $$('#'+classRoot.obj.formId+' .zip')[0].value,
						'city': $$('#'+classRoot.obj.formId+' .city')[0].value
					},
					onCreate: function()
					{
						classRoot.updateStatus(allDayOfBirthElms[0],'loading','span');
					},
					onSuccess: function(transport)
					{
						var response = transport.responseText.evalJSON();
						console.log(response);
						
						if (response.validated)
						{
							classRoot.updateStatus(allDayOfBirthElms[0],'correct','span');
							classRoot.updateStatusMessage(allDayOfBirthElms[0], '');
						}
						else
						{
							classRoot.updateStatus(allDayOfBirthElms[0],'error','span');
							classRoot.updateStatusMessage(allDayOfBirthElms[0], response.message);
						}
					},
					onFailure: function(){ 
						classRoot.updateStatus(allDayOfBirthElms[0],'error','span');
						classRoot.updateStatusMessage(allDayOfBirthElms[0], 'Oppstod en feil i forbindelsen');
					}
				});

			}*/
			
		}
		else
		{
			classRoot.updateStatus(allDayOfBirthElms[0],'error','span');
		}
		
		
		/*if(allDayOfBirthElms[0].value.length == 2 
		&& allDayOfBirthElms[1].value.length == 2 
		&& allDayOfBirthElms[2].value.length == 2 
		&& allDayOfBirthElms[3].value.length == 4 
		&& isNaN(allDayOfBirthElms[0].value) == false 
		&& isNaN(allDayOfBirthElms[1].value) == false 
		&& isNaN(allDayOfBirthElms[2].value) == false 
		&& isNaN(allDayOfBirthElms[3].value) == false
		){
			classRoot.updateStatus(allDayOfBirthElms[0],'correct','span');
		}else{
			classRoot.updateStatus(allDayOfBirthElms[0],'error','span');
		}*/
		
		
		
	},
	
	personNr: function(classRoot,elm){
		if($(elm).value.length > 4){
			$(elm).value = $(elm).value.substring(0,4);
		}
		
		if($(elm).value != "" && isNaN($(elm).value) == false && $(elm).value.length == 4){
			classRoot.updateStatus(elm,'correct','span');
		}else{
			classRoot.updateStatus(elm,'error','span');
		}
	},
	
	validate: function(classRoot){
		
		var btnStatus = true;
		
		classRoot.allCorrectElm = $$('#'+classRoot.obj.formId+' .correct');
		
		if(classRoot.allCorrectElm.length < classRoot.count){
			btnStatus = false;
		}

		if(classRoot.obj.radio.length != 0){
			classRoot.obj.radio.each(function(elm,i){

				var allRadioElms = $$('#'+classRoot.obj.formId+' .'+elm);
				
				allRadioElms.each(function(elm,i){

					var checked = false;
					
					allRadioElms.each(function(elm,i){
						if($(elm).checked){
							checked = true;
						}
					});
					
					if(!checked){
						btnStatus = false;
						classRoot.updateStatus2(classRoot,elm,'error');
					}else{
						classRoot.updateStatus2(classRoot,elm,'correct');
					}

				});
				
			});
		}
		
		
		if(classRoot.allCheckElms.length != 0){
		
			var checked2 = false;
			
			classRoot.allCheckElms.each(function(elm,i){
					
				if($(elm).checked == true){
					checked2 = true;
					classRoot.updateStatus2(classRoot,elm,'correct');
				}else{
					classRoot.updateStatus2(classRoot,elm,'error');
				}
	
			});
			
			if(!checked2){
				btnStatus = false;
			}

		}

		if(btnStatus){
			$(classRoot.obj.buttonId).disabled = false;
			$(classRoot.obj.buttonId).removeClassName('btnDisabled');
			$(classRoot.obj.buttonId).addClassName('btnActive');
		}else{
			$(classRoot.obj.buttonId).disabled = true;
			$(classRoot.obj.buttonId).removeClassName('btnActive');
			$(classRoot.obj.buttonId).addClassName('btnDisabled');
		}
		
	},
	
	updateStatus: function(elm,status,attribute){
		
		var allStatusElm = $(elm).parentNode.getElementsByTagName(attribute);
		
		if($(allStatusElm[0])){
			if(status == 'correct'){
				$(allStatusElm[0]).addClassName('correct');
				$(allStatusElm[0]).removeClassName('erroneous');
				$(allStatusElm[0]).removeClassName('loading');
			}
			
			if(status == 'error'){
				$(allStatusElm[0]).removeClassName('correct');
				$(allStatusElm[0]).addClassName('erroneous');
				$(allStatusElm[0]).removeClassName('loading');
			}
			
			if(status == 'loading'){
				$(allStatusElm[0]).removeClassName('correct');
				$(allStatusElm[0]).removeClassName('erroneous');
				$(allStatusElm[0]).addClassName('loading');
			}
		}
	},
	
	updateStatus2: function(classRoot,elm,status){
		
		if(classRoot.allCorrectElm.length >= classRoot.count){
			if($(elm).parentNode){
				if(status == 'correct'){
					$($(elm).parentNode).addClassName('correctOther');
					$($(elm).parentNode).removeClassName('erroneousOther');
				}
				
				if(status == 'error'){
					$($(elm).parentNode).removeClassName('correctOther');
					$($(elm).parentNode).addClassName('erroneousOther');
				}
			}
		}
	},
	
	updateStatusMessage: function(elm, message){
		var allMessageElm = $(elm).parentNode.getElementsByTagName('p');
		if($(allMessageElm[0])){
			$(allMessageElm[0]).innerHTML = message;
		}
	}
});

Event.observe(window, 'load', function()
{	
	

	if($('form1')){
		var newKQCvalidate = new KQCvalidate(
		{
			formId : 'form1',
			text : 'KQCtext',
			num : 'KQCnum',
			zip: 'KQCzip',
			zipSe: 'KQCZipSe',
			email : 'KQCemail',
			phone : 'KQCphone',
			phoneFi : 'KQCphoneFi',
			phoneSe : 'KQCphoneSe',
			submit : 'KQCsubmit',
			check : 'KQCcheck',
			radio : radioArray = new Array('KQCradio1'), //Alle radio knapper må ha class KQCradio1 ved 1 til gruppe skal alle f.eks KQCradio2. KQCradio2 må da legges til i array
			dayOfBirth : dayOfBirthArray = new Array('KQCdob'), //3 felter må ha class KQCdob (dag,måned,år) ved 1 til gruppe skal alle 3 felter ha f.eks: KQCdob2. KQCdob2 må da legges til i array
			dayOfBirthSe : dayOfBirthSeArray = new Array('KQCdobSe'), //3 felter må ha class KQCdob (dag,måned,år) ved 1 til gruppe skal alle 3 felter ha f.eks: KQCdob2. KQCdob2 må da legges til i array
			//personNr: 'dobSe4', 
			buttonId : 'formBtn1'
		});
	}	

	if($('form2')){
		
		var newKQCvalidate = new KQCvalidate(
		{
			formId : 'form2',
			text : 'KQCtext',
			num : 'KQCnum',
			zip: 'KQCzip',
			zipSe: 'KQCZipSe',
			email : 'KQCemail',
			phone : 'KQCphone',
			phoneFi : 'KQCphoneFi',
			phoneSe : 'KQCphoneSe',
			submit : 'KQCsubmit',
			check : 'KQCcheck',
			radio : radioArray = new Array('KQCradio1'), //Alle radio knapper må ha class KQCradio1 ved 1 til gruppe skal alle f.eks KQCradio2. KQCradio2 må da legges til i array
			dayOfBirth : dayOfBirthArray = new Array('KQCdob'), //3 felter må ha class KQCdob (dag,måned,år) ved 1 til gruppe skal alle 3 felter ha f.eks: KQCdob2. KQCdob2 må da legges til i array
			dayOfBirthSe : dayOfBirthSeArray = new Array('KQCdobSe'), //3 felter må ha class KQCdob (dag,måned,år) ved 1 til gruppe skal alle 3 felter ha f.eks: KQCdob2. KQCdob2 må da legges til i array
			//personNr: 'dobSe4',
			buttonId : 'formBtn2'
		});
	
	}
	
	if($('checkout_form')){
		
		var newKQCvalidate = new KQCvalidate(
		{
			formId : 'checkout_form',
			text : 'KQCtext',
			num : 'KQCnum',
			zip: 'KQCzip',
			zipSe: 'KQCZipSe',
			email : 'KQCemail',
			phone : 'KQCphone',
			phoneFi : 'KQCphoneFi',
			phoneSe : 'KQCphoneSe',
			submit : 'KQCsubmit',
			check : 'KQCcheck',
			radio : radioArray = new Array('KQCradio1'), //Alle radio knapper må ha class KQCradio1 ved 1 til gruppe skal alle f.eks KQCradio2. KQCradio2 må da legges til i array
			dayOfBirth : dayOfBirthArray = new Array('KQCdob'), //3 felter må ha class KQCdob (dag,måned,år) ved 1 til gruppe skal alle 3 felter ha f.eks: KQCdob2. KQCdob2 må da legges til i array
			//dayOfBirthSe : dayOfBirthSeArray = new Array('KQCdobSe'), //3 felter må ha class KQCdob (dag,måned,år) ved 1 til gruppe skal alle 3 felter ha f.eks: KQCdob2. KQCdob2 må da legges til i array
			//personNr: 'dobSe4',
			buttonId : 'formsubmit'
		});

	}
	
});
