$(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 = 4.85;
 if (insurance_id=="A" && pet_kind=="B") price = 5.80;
 if (insurance_id=="A" && pet_kind=="C") price = 6.50;
 if (insurance_id=="A" && pet_kind=="D") price = 8.50;
 if (insurance_id=="A" && pet_kind=="E") price = 10.50;

 if (insurance_id=="B" && pet_kind=="A") price = 8.00;
 if (insurance_id=="B" && pet_kind=="B") price = 9.00;
 if (insurance_id=="B" && pet_kind=="C") price = 10.00;
 if (insurance_id=="B" && pet_kind=="D") price = 12.50;
 if (insurance_id=="B" && pet_kind=="E") price = 15.50;

 if (insurance_id=="C" && pet_kind=="A") price = 13.00;
 if (insurance_id=="C" && pet_kind=="B") price = 12.50;
 if (insurance_id=="C" && pet_kind=="C") price = 13.50;
 if (insurance_id=="C" && pet_kind=="D") price = 16.50;
 if (insurance_id=="C" && pet_kind=="E") price = 19.00;

 if (insurance_id=="D" && pet_kind=="A") price = 16.00
 if (insurance_id=="D" && pet_kind=="B") price = 18.00;
 if (insurance_id=="D" && pet_kind=="C") price = 20.00;
 if (insurance_id=="D" && pet_kind=="D") price = 22.00;
 if (insurance_id=="D" && pet_kind=="E") price = 25.00;
 
 
 //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>";
}



//--> 
 
  
 

