$(document).ready( function() {

	$("#getClinic_historyCnt").click(
	function(){ $("#clinic_historyCnt").slideUp('slow') }
	);

	$("#hideClinic_historyCnt").click(
	function(){ $("#clinic_historyCnt").slideDown('slow') }
	);


	$("#getComplainsCnt").click(
	function(){ $("#complainsCnt").slideUp('slow') }
	);

	$("#hideComplainsCnt").click(
	function(){ $("#complainsCnt").slideDown('slow') }
	);


});


function createPolicy_nr(val)
{	
 selectbox1 = document.getElementById('insurance_id');
 insurance_id = selectbox1.options[selectbox1.selectedIndex].value;
 if (insurance_id=="1") insurance_id = "A"; 
 if (insurance_id=="2") insurance_id = "B"; 
 if (insurance_id=="3") insurance_id = "C"; 
 if (insurance_id=="4") insurance_id = "D"; 
 
 selectbox2 = document.getElementById('pet_kind_id');
 pet_kind = selectbox2.options[selectbox2.selectedIndex].value;
 if (pet_kind=="1") pet_kind = "A"; 
 if (pet_kind=="2") pet_kind = "B";  
 if (pet_kind=="3") pet_kind = "C";  
 if (pet_kind=="4") pet_kind = "D"; 
 if (pet_kind=="5") pet_kind = "E";
  
 selectbox3 = document.getElementById('age');
 age = selectbox3.options[selectbox3.selectedIndex].value;

 selectbox8 = document.getElementById('periodic');
 periodic = selectbox8.options[selectbox8.selectedIndex].value;  

if (periodic=="") periodic = document.getElementById('periodic_set').value;
 
 if (insurance_id=="A" && pet_kind=="A") price = 5.35;
 if (insurance_id=="A" && pet_kind=="B") price = 6.42;
 if (insurance_id=="A" && pet_kind=="C") price = 7.49;
 if (insurance_id=="A" && pet_kind=="D") price = 8.56;
 if (insurance_id=="A" && pet_kind=="E") price = 9.63;
 
 if (insurance_id=="B" && pet_kind=="A") price = 9.63;
 if (insurance_id=="B" && pet_kind=="B") price = 10.70;
 if (insurance_id=="B" && pet_kind=="C") price = 11.77;
 if (insurance_id=="B" && pet_kind=="D") price = 13.91;
 if (insurance_id=="B" && pet_kind=="E") price = 16.05;
 
 if (insurance_id=="C" && pet_kind=="A") price = 12.84;
 if (insurance_id=="C" && pet_kind=="B") price = 14.98;
 if (insurance_id=="C" && pet_kind=="C") price = 16.05;
 if (insurance_id=="C" && pet_kind=="D") price = 18.19;
 if (insurance_id=="C" && pet_kind=="E") price = 20.33;
 
 if (insurance_id=="D" && pet_kind=="A") price = 17.12;
 if (insurance_id=="D" && pet_kind=="B") price = 19.26;
 if (insurance_id=="D" && pet_kind=="C") price = 21.40;
 if (insurance_id=="D" && pet_kind=="D") price = 23.54;
 if (insurance_id=="D" && pet_kind=="E") price = 26.75; 
 
 
 price = price * 0.80;
 
 price = price * 1.015;
 
 if (periodic=="1") price = price;
 if (periodic=="2") price = price * 3 * 0.98;
 if (periodic=="3") price = price * 12 * 0.96;
 
 if (age == "1") price = price;	
 if (age == "2") price = price * 1.10;
 if (age == "3") price = price * 1.20;
 if (age == "4") price = price * 1.40;
 
 price = "&euro; " + (price).toFixed(2);
 

 document.getElementById('insurance_price').innerHTML = price;
 document.getElementById('insurance_link').innerHTML = "<a href='aanvraagformulier.php'>Direct verzekeren</a>";
}



//--> 
 
  
 
