// experience gained

function countexp1(obj) {
	max = 3; // max. number allowed at a time

	box1 = obj.form.exp1.checked;
	box2 = obj.form.exp2.checked;
	box3 = obj.form.exp3.checked;
	box4 = obj.form.exp4.checked;
	box5 = obj.form.exp5.checked;
	box6 = obj.form.exp6.checked;
	box7 = obj.form.exp7.checked;
	box8 = obj.form.exp8.checked;
	box9 = obj.form.exp9.checked;	
	box10 = obj.form.exp10.checked;		 
	box11 = obj.form.exp11.checked;
	box12 = obj.form.exp12.checked;	
	
	count = (box1 ? 1 : 0) + (box2 ? 1 : 0) + (box3 ? 1 : 0) + (box4 ? 1 : 0) + (box5 ? 1 : 0) + (box6 ? 1 : 0) + (box7 ? 1 : 0) + (box8 ? 1 : 0) + (box9 ? 1 : 0) + (box10 ? 1 : 0) + (box11 ? 1 : 0) + (box12 ? 1 : 0);


	if (count > max) {
	alert("Please select a maximum of " + max + " skills. \nUncheck an option if you want to select another.");
	obj.checked = false;
   }
}


function countexp2(obj) {
	max = 4; // max. number allowed at a time

	box1 = obj.form.exp21.checked;
	box2 = obj.form.exp22.checked;
	/* need to remove these 2 as they are no longer in table - prevents js error 
	box3 = obj.form.exp23.checked;
	box4 = obj.form.exp24.checked;
	*/
	box5 = obj.form.exp25.checked;
	box6 = obj.form.exp26.checked;
	box7 = obj.form.exp27.checked;
	box8 = obj.form.exp28.checked;
	box9 = obj.form.exp29.checked;	
	box10 = obj.form.exp210.checked;	
	box11 = obj.form.exp211.checked;	
	box12 = obj.form.exp212.checked;	
	box13 = obj.form.exp213.checked;
	box14 = obj.form.exp214.checked;
	box15 = obj.form.exp215.checked;
	box16 = obj.form.exp216.checked;
	box17 = obj.form.exp217.checked;
	box18 = obj.form.exp218.checked;
	box19 = obj.form.exp219.checked;
	box20 = obj.form.exp220.checked;
	box21 = obj.form.exp221.checked;
	box22 = obj.form.exp222.checked;
	box23 = obj.form.exp223.checked;
	box24 = obj.form.exp224.checked;
	box25 = obj.form.exp225.checked;
	box26 = obj.form.exp226.checked;
	box27 = obj.form.exp227.checked;
	box28 = obj.form.exp228.checked;
	box29 = obj.form.exp229.checked;
	box30 = obj.form.exp230.checked;
	box31 = obj.form.exp231.checked;
	box32 = obj.form.exp232.checked;
	box33 = obj.form.exp233.checked;

	count = 
		(box1 ? 1 : 0) + 
		(box2 ? 1 : 0) + 
		/* need to remove these 2 as they are no longer in table - prevents js error 
		(box3 ? 1 : 0) + 
		(box4 ? 1 : 0) + 
		*/
		(box5 ? 1 : 0) + 
		(box6 ? 1 : 0) + 
		(box7 ? 1 : 0) + 
		(box8 ? 1 : 0) + 
		(box9 ? 1 : 0) + 
		(box10 ? 1 : 0) + 
		(box11 ? 1 : 0) + 
		(box12 ? 1 : 0) + 
		(box13 ? 1 : 0) + 
		(box14 ? 1 : 0) +
		(box15 ? 1 : 0) +
		(box16 ? 1 : 0) +
		(box17 ? 1 : 0) +
		(box18 ? 1 : 0) +
		(box19 ? 1 : 0) +
		(box20 ? 1 : 0) +
		(box21 ? 1 : 0) +
		(box22 ? 1 : 0) +
		(box23 ? 1 : 0) +
		(box24 ? 1 : 0) +
		(box25 ? 1 : 0) +
		(box26 ? 1 : 0) +
		(box27 ? 1 : 0) +
		(box28 ? 1 : 0) +
		(box29 ? 1 : 0) +
		(box30 ? 1 : 0) +
		(box31 ? 1 : 0) +
		(box32 ? 1 : 0) +
		(box33 ? 1 : 0);

	if (count > max) {
	alert("Please select a maximum of " + max + " skills. \nUncheck an option if you want to select another.");
	obj.checked = false;
   }
}

// experience wanted 
// -------------------------------------------------------------------------------
function countexpw1(obj) {
	max = 3; // max. number allowed at a time

	box1 = obj.form.expw1.checked;
	box2 = obj.form.expw2.checked;
	box3 = obj.form.expw3.checked;
	box4 = obj.form.expw4.checked;
	box5 = obj.form.expw5.checked;
	box6 = obj.form.expw6.checked;
	box7 = obj.form.expw7.checked;
	box8 = obj.form.expw8.checked;
	box9 = obj.form.expw9.checked;
	box10 = obj.form.expw10.checked;	
	box11 = obj.form.expw11.checked;	
	box12 = obj.form.expw12.checked;	 

	count = (box1 ? 1 : 0) + (box2 ? 1 : 0) + (box3 ? 1 : 0) + (box4 ? 1 : 0) + (box5 ? 1 : 0) + (box6 ? 1 : 0) + (box7 ? 1 : 0) + (box8 ? 1 : 0) + (box9 ? 1 : 0) + (box10 ? 1 : 0) + (box11 ? 1 : 0) + (box12 ? 1 : 0);

	if (count > max) {
	alert("Please select a maximum of " + max + " skills. \nUncheck an option if you want to select another.");
	obj.checked = false;
   }
}


function countexpw2(obj) {
	max = 4; // max. number allowed at a time

	box1 = obj.form.expw21.checked;
	box2 = obj.form.expw22.checked;
	/* need to remove these 2 as they are no longer in table - prevents js error 
	box3 = obj.form.expw23.checked;
	box4 = obj.form.expw24.checked;
	*/
	box5 = obj.form.expw25.checked;
	box6 = obj.form.expw26.checked;
	box7 = obj.form.expw27.checked;
	box8 = obj.form.expw28.checked;
	box9 = obj.form.expw29.checked;	
	box10 = obj.form.expw210.checked;	
	box11 = obj.form.expw211.checked;	
	box12 = obj.form.expw212.checked;	
	box13 = obj.form.expw213.checked;
	box14 = obj.form.expw214.checked;
	box15 = obj.form.expw215.checked;
	box16 = obj.form.expw216.checked;
	box17 = obj.form.expw217.checked;
	box18 = obj.form.expw218.checked;
	box19 = obj.form.expw219.checked;
	box20 = obj.form.expw220.checked;
	box21 = obj.form.expw221.checked;
	box22 = obj.form.expw222.checked;
	box23 = obj.form.expw223.checked;
	box24 = obj.form.expw224.checked;
	box25 = obj.form.expw225.checked;
	box26 = obj.form.expw226.checked;
	box27 = obj.form.expw227.checked;
	box28 = obj.form.expw228.checked;
	box29 = obj.form.expw229.checked;
	box30 = obj.form.expw230.checked;
	box31 = obj.form.expw231.checked;
	box32 = obj.form.expw232.checked;
	box33 = obj.form.expw233.checked;

	count = 
		(box1 ? 1 : 0) + 
		(box2 ? 1 : 0) + 
		/* need to remove these 2 as they are no longer in table - prevents js error 
		(box3 ? 1 : 0) + 
		(box4 ? 1 : 0) + 
		*/
		(box5 ? 1 : 0) + 
		(box6 ? 1 : 0) + 
		(box7 ? 1 : 0) + 
		(box8 ? 1 : 0) + 
		(box9 ? 1 : 0) + 
		(box10 ? 1 : 0) + 
		(box11 ? 1 : 0) + 
		(box12 ? 1 : 0) + 
		(box13 ? 1 : 0) + 
		(box14 ? 1 : 0) +
		(box15 ? 1 : 0) +
		(box16 ? 1 : 0) +
		(box17 ? 1 : 0) +
		(box18 ? 1 : 0) +
		(box19 ? 1 : 0) +
		(box20 ? 1 : 0) +
		(box21 ? 1 : 0) +
		(box22 ? 1 : 0) +
		(box23 ? 1 : 0) +
		(box24 ? 1 : 0) +
		(box25 ? 1 : 0) +
		(box26 ? 1 : 0) +
		(box27 ? 1 : 0) +
		(box28 ? 1 : 0) +
		(box29 ? 1 : 0) +
		(box30 ? 1 : 0) +
		(box31 ? 1 : 0) +
		(box32 ? 1 : 0) +
		(box33 ? 1 : 0);

	if (count > max) {
	alert("Please select a maximum of " + max + " skills. \nUncheck an option if you want to select another.");
	obj.checked = false;
   }
}

function countint(obj) {
	max = 8; // max. number allowed at a time

	box1 = obj.form.int1.checked;
	box2 = obj.form.int2.checked;
	box3 = obj.form.int3.checked;
	box4 = obj.form.int4.checked;
	box5 = obj.form.int5.checked;
	box6 = obj.form.int6.checked;
	box7 = obj.form.int7.checked;
	box8 = obj.form.int8.checked;
	box9 = obj.form.int9.checked;	
	
	box10 = obj.form.int10.checked;	
	box11 = obj.form.int11.checked;	
	box12 = obj.form.int12.checked;	
	box13 = obj.form.int13.checked;
	box14 = obj.form.int14.checked;
	box15 = obj.form.int15.checked;
	
	box16 = obj.form.int16.checked;
	box17 = obj.form.int17.checked;
	box18 = obj.form.int18.checked;	
	box19 = obj.form.int19.checked;	
	box20 = obj.form.int20.checked;
	
	box21 = obj.form.int21.checked;
	box22 = obj.form.int22.checked;
	box23 = obj.form.int23.checked;	
	box24 = obj.form.int24.checked;
	box25 = obj.form.int25.checked;
	box26 = obj.form.int26.checked;
	box27 = obj.form.int27.checked;
	box28 = obj.form.int28.checked;
	box29 = obj.form.int29.checked;
	box30 = obj.form.int30.checked;
	
	box31 = obj.form.int31.checked;
	box32 = obj.form.int32.checked;
	box33 = obj.form.int33.checked;								
	box34 = obj.form.int35.checked;
	box35 = obj.form.int36.checked;
	box36 = obj.form.int37.checked;
	box37 = obj.form.int38.checked;	
	box38 = obj.form.int39.checked;	
	box39 = obj.form.int40.checked;	
	box40 = obj.form.int41.checked;	
	box41 = obj.form.int42.checked;	
	box42 = obj.form.int43.checked;	
	box43 = obj.form.int44.checked;	
	box44 = obj.form.int45.checked;	
	box45 = obj.form.int46.checked;	
	box46 = obj.form.int47.checked;	
	box47 = obj.form.int48.checked;	
	box48 = obj.form.int49.checked;	
	box49 = obj.form.int50.checked;	
	box50 = obj.form.int34.checked;		
	box51 = obj.form.int51.checked;											
				
	

	count = (box1 ? 1 : 0) + (box2 ? 1 : 0) + (box3 ? 1 : 0) + (box4 ? 1 : 0) + (box5 ? 1 : 0) + (box6 ? 1 : 0) + (box7 ? 1 : 0) + (box8 ? 1 : 0) + (box9 ? 1 : 0) + (box10 ? 1 : 0) + (box11 ? 1 : 0) + (box12 ? 1 : 0) + (box13 ? 1 : 0) + (box14 ? 1 : 0) + (box15 ? 1 : 0) + (box16 ? 1 : 0) + (box17 ? 1 : 0) + (box18 ? 1 : 0) + (box19 ? 1 : 0) + (box20 ? 1 : 0) + (box21 ? 1 : 0) + (box22 ? 1 : 0) + (box23 ? 1 : 0) + (box24 ? 1 : 0) + (box25 ? 1 : 0) + (box26 ? 1 : 0) + (box27 ? 1 : 0) + (box28 ? 1 : 0) + (box29 ? 1 : 0) + (box30 ? 1 : 0) + (box31 ? 1 : 0) + (box32 ? 1 : 0) + (box33 ? 1 : 0) + (box34 ? 1 : 0) + (box35 ? 1 : 0) + (box36 ? 1 : 0) + (box37 ? 1 : 0) + (box38 ? 1 : 0) + (box39 ? 1 : 0) + (box40 ? 1 : 0) + (box41 ? 1 : 0) + (box42 ? 1 : 0) + (box43 ? 1 : 0) + (box44 ? 1 : 0) + (box45 ? 1 : 0) + (box46 ? 1 : 0) + (box47 ? 1 : 0) + (box48 ? 1 : 0) + (box49 ? 1 : 0) + (box50 ? 1 : 0) + (box51 ? 1 : 0);


	if (count > max) {
	alert("Please select a maximum of " + max + " interests. \nUncheck an option if you want to select another.");
	obj.checked = false;
   }
}
