﻿function CalculatePrize()
{
	this.init();
}
CalculatePrize.prototype.init = function()
{
	this._sidebar = document.getElementById( 'sidebar' );
	this._default = '<div class="content"><div class="legend why"><div class="corner left top"></div><div class="corner right top"></div>Waarom petplan?</div><ol><li><span>Meest complete dekking</span></li><li><span>Zorg op maat</span></li><li><span>Preventieve zorg meeverzekerd</span></li><li><span>Levenslange premiegarantie</span></li><li><span>Snelle uitkering declaraties</span></li><li><span>Vaste (jaarlijkse) eigen bijdrage</span></li><li><span>Ondersteund door alle dierenartsen</span></li></ol></div>';
	this._noPrize = '<div class="legend"><div class="corner left top"></div><div class="corner right top"></div>Geen Premieberekening mogelijk</div>Vanwege de leeftijd van uw huisdier is premieberekening voor dit Zorgpakket helaas nu niet mogelijk. Vervolgt u uw aanvraag en u wordt automatisch door ons ge&iuml;nformeerd.';
	if( !this._sidebar )
		alert( 'Error finding sidebar' );
}
CalculatePrize.prototype.start = function( obj )
{
	this._oForm = obj;
	this._sidebar.innerHTML = this._default;
}
CalculatePrize.prototype.update = function()
{
	var sText;
	// rerun the calculation
	switch( this._oForm._currentPage )
	{
		case 0:
			sText = this._default;;
			break;
		case 1:
		case 2:
		case 3:
		case 4:
			sText = this.calculate();
			break;
		case 5:
			sText = '';
			break;
		default:
			sText = '';
			break;
	}
	
	this._sidebar.innerHTML = sText;
}
CalculatePrize.prototype.calculate = function()
{
	this.animal = new Object();
	this.animal.age = this.getAge( this._oForm._container.geboortedatum.value );
	this.animal.weight = parseInt( this._oForm._container.volgroeidgewicht.value, 10 );
	this.animal.careType = this.getCareType();
	
	var result;
	if( this._oForm._container.soorthuisdier[ 0 ].checked )
		result = this.calculateDog();
	else if( this._oForm._container.soorthuisdier[ 1 ].checked )
		result = this.calculateCat();
	else if( this._oForm._container.soorthuisdier[ 2 ].checked )
		result = this.calculateRabbit();
	else if( this._oForm._container.soorthuisdier[ 3 ].checked )
		result = this.calculateParrot();
	else
		return this._default;
	
	if( result == -1 )
		return this._default;
	else if( result == -2 )
		return this._noPrize;
		
	if( this._oForm._container.looptijdverz[1].checked )
			result *= 1.03;
		
	var sContent = this.getContent( result );
	sContent = this.getHeader() + sContent + this.getFooter(result);
	
	this.setResult( result );
	
	return sContent;
}
CalculatePrize.prototype.calculateCat = function()
{	
	if( this.animal.age != undefined && this.animal.careType )
	{
		var iBasic = this.getBasicPriceCat();
		if( iBasic === false )
			return -2;
			
		var iExtra = this.getExtraPriceCat();
		if( iExtra === false )
			return -2;
		
		return this.getPaymentFactor( iBasic + iExtra );
	}
	return -1;
}
CalculatePrize.prototype.calculateDog = function()
{	
	if( this.animal.age != undefined && this.animal.weight != undefined && this.animal.careType )
	{
		var iBasic = this.getBasicPriceDog();
		if( iBasic === false )
			return -2;
			
		var iExtra = this.getExtraPriceDog();
		if( iExtra === false )
			return -2;
		
		return this.getPaymentFactor( iBasic + iExtra );
	}
	return -1;
}
CalculatePrize.prototype.calculateRabbit = function()
{	
	if( this.animal.age != undefined && this.animal.weight != undefined && this.animal.careType )
	{
		var iBasic = this.getBasicPriceRabbit();
		if( iBasic === false )
			return -2;
			
		var iExtra = this.getExtraPriceRabbit();
		if( iExtra === false )
			return -2;
		
		return this.getPaymentFactor( iBasic + iExtra );
	}
	return -1;
}
CalculatePrize.prototype.getCareType = function()
{
	for( var i = 0; i < this._oForm._container.zorgpakket.length; i++ )
	{
		if( this._oForm._container.zorgpakket[ i ].checked )
			return this._oForm._container.zorgpakket[ i ].value;
	}
	
	return false;
}
CalculatePrize.prototype.getPaymentFactor = function( iPrice )
{
	if( this._oForm._container.betalingswijze[ 0 ].checked || this._oForm._container.betalingswijze[ 1 ].checked )
		iPrice *= 0.95;
	
	return iPrice;
}
CalculatePrize.prototype.getExtraPriceCat = function()
{
	var iExtra = 0;
	if	(
			( this._oForm._container.stercas.checked && this.animal.age > 9 ) ||
			( this._oForm._container.chemrad.checked && this.animal.age > 3 ) ||
			( this._oForm._container.crem.checked && this.animal.age > 6 )
		)
		return false;
	
	// Aanvullende verzekeringen Kat
	if( this._oForm._container.stercas.checked )
		iExtra += 0.85;
	
	if( this._oForm._container.chemrad.checked )
	{
		switch( this.animal.age )
		{
			case 0:
				iExtra += 3.41;
				break;
			case 1:
			case 2:
			case 3:
				iExtra += 4.53;
				break;
			default:
				return false;
		}
	}
	
	if( this._oForm._container.crem.checked )
	{
		switch( this.animal.age )
		{
			case 0:
				iExtra += 0.85;
				break;
			case 1:
			case 2:
			case 3:
				iExtra += 1.11;
				break;
			case 4:
			case 5:
			case 6:
				iExtra += 1.38;
				break;
			default:
				return false;
		}
	}
	
	if( this._oForm._container.reisverz.checked )
		iExtra += 4.12;
	
	iExtra += this.getContribution();
		
	return iExtra;

}





CalculatePrize.prototype.getExtraPriceRabbit = function()
{
	var iExtra = 0;
	if	(
			( this._oForm._container.stercas.checked && this.animal.age > 2 ) ||
			( this._oForm._container.chemrad.checked ) ||
			( this._oForm._container.crem.checked && this.animal.age > 2 )
		)
		return false;
	
	// Aanvullende verzekeringen Konijn
	if( this._oForm._container.stercas.checked )
	{
		if( this.animal.weight < 3 )
			iExtra += 1.55;
		else
			iExtra += 1.55;
	}
	
	if( this._oForm._container.crem.checked )
	{
		switch( this.animal.age )
		{
			case 0:
				if( this.animal.weight < 3 )
					iExtra += 1.65;
				else
					iExtra += 2.16;
				break;
			case 1:
				if( this.animal.weight < 3 )
					iExtra += 2.01;
				else
					iExtra += 2.58;
				break;
			case 2:
				if( this.animal.weight < 3 )
					iExtra += 2.42;
				else
					iExtra += 3.04;
				break;
			default:
				return false;
		}
	}
	
	if( this._oForm._container.reisverz.checked )
		iExtra += 2.83;
	
	iExtra += this.getContribution();	
		
	return iExtra;
}
CalculatePrize.prototype.getExtraPriceDog = function()
{
	var iExtra = 0;
	if	(
			( this._oForm._container.stercas.checked && this.animal.age > 9 ) ||
			( this._oForm._container.chemrad.checked && this.animal.age > 3 ) ||
			( this._oForm._container.crem.checked && this.animal.age > 6 )
		)
		return false;
	
	// Aanvullende verzekeringen Hond
	if( this._oForm._container.stercas.checked )
		iExtra += 2.88;
	
	if( this._oForm._container.chemrad.checked )
	{
		switch( this.animal.age )
		{
			case 0:
				if( this.animal.weight >= 0 && this.animal.weight < 6 )
					iExtra += 5.43;
				else if( this.animal.weight >= 6 && this.animal.weight < 21 )
					iExtra += 6.02;
				else if( this.animal.weight >= 21 && this.animal.weight < 36 )
					iExtra += 6.55;
				else if( this.animal.weight >= 36 && this.animal.weight < 51 )
					iExtra += 7.45;
				else if( this.animal.weight >= 51 )
					iExtra += 9.69;
				break;
			case 1:
			case 2:
			case 3:
				if( this.animal.weight >= 0 && this.animal.weight < 6 )
					iExtra += 7.45;
				else if( this.animal.weight >= 6 && this.animal.weight < 21 )
					iExtra += 7.93;
				else if( this.animal.weight >= 21 && this.animal.weight < 36 )
					iExtra += 8.52;
				else if( this.animal.weight >= 36 && this.animal.weight < 51 )
					iExtra += 9.11;
				else if( this.animal.weight >= 51 )
					iExtra += 11.07;
				break;
			default:
				return false;
		}
	}
	
	if( this._oForm._container.crem.checked )
	{
		switch( this.animal.age )
		{
			case 0:
				if( this.animal.weight >= 0 && this.animal.weight < 6 )
					iExtra += 1.11;
				else if( this.animal.weight >= 6 && this.animal.weight < 21 )
					iExtra += 1.38;
				else if( this.animal.weight >= 21 && this.animal.weight < 36 )
					iExtra += 1.76;
				else if( this.animal.weight >= 36 && this.animal.weight < 51 )
					iExtra += 2.61;
				else if( this.animal.weight >= 51 )
					iExtra += 3.89;
				break;
			case 1:
			case 2:
			case 3:
				if( this.animal.weight >= 0 && this.animal.weight < 6 )
					iExtra += 1.54;
				else if( this.animal.weight >= 6 && this.animal.weight < 21 )
					iExtra += 1.81;
				else if( this.animal.weight >= 21 && this.animal.weight < 36 )
					iExtra += 2.24;
				else if( this.animal.weight >= 36 && this.animal.weight < 51 )
					iExtra += 3.14;
				else if( this.animal.weight >= 51 )
					iExtra += 5.01;
				break;
			case 4:
			case 5:
			case 6:
				if( this.animal.weight >= 0 && this.animal.weight < 6 )
					iExtra += 2.13;
				else if( this.animal.weight >= 6 && this.animal.weight < 21 )
					iExtra += 2.39;
				else if( this.animal.weight >= 21 && this.animal.weight < 36 )
					iExtra += 2.98;
				else if( this.animal.weight >= 36 && this.animal.weight < 51 )
					iExtra += 4.42;
				else if( this.animal.weight >= 51 )
					iExtra += 6.12;
				break;
			default:
				return false;
		}
	}
	
	if( this._oForm._container.reisverz.checked )
	{
		if( this.animal.weight >= 0 && this.animal.weight < 6 )
			iExtra += 4.12;
		else if( this.animal.weight >= 6 && this.animal.weight < 21 )
			iExtra += 4.12;
		else if( this.animal.weight >= 21 && this.animal.weight < 36 )
			iExtra += 4.12;
		else if( this.animal.weight >= 36 && this.animal.weight < 51 )
			iExtra += 4.12;
		else if( this.animal.weight >= 51 )
			iExtra += 4.12;
	}
	
	iExtra += this.getContribution();
		
	return iExtra;
}
CalculatePrize.prototype.getBasicPriceDog = function()
{
	switch( this.animal.careType )
	{
		case 'Basis Pakket':
			switch( this.animal.age )
			{
				case 0:
					if( this.animal.weight >= 0 && this.animal.weight < 6 )
						return 11.07;
					else if( this.animal.weight >= 6 && this.animal.weight < 21 )
						return 13.69;
					else if( this.animal.weight >= 21 && this.animal.weight < 36 )
						return 15.82;
					else if( this.animal.weight >= 36 && this.animal.weight < 51 )
						return 18.32;
					else if( this.animal.weight >= 51 )
						return 22.20;
					break;
				case 1:
				case 2:
				case 3:
					if( this.animal.weight >= 0 && this.animal.weight < 6 )
						return 12.35;
					else if( this.animal.weight >= 6 && this.animal.weight < 21 )
						return 14.27;
					else if( this.animal.weight >= 21 && this.animal.weight < 36 )
						return 16.61;
					else if( this.animal.weight >= 36 && this.animal.weight < 51 )
						return 19.38;
					else if( this.animal.weight >= 51 )
						return 23.32;
					break;
				case 4:
				case 5:
				case 6:
					if( this.animal.weight >= 0 && this.animal.weight < 6 )
						return 13.31;
					else if( this.animal.weight >= 6 && this.animal.weight < 21 )
						return 15.97;
					else if( this.animal.weight >= 21 && this.animal.weight < 36 )
						return 19.17;
					else if( this.animal.weight >= 36 && this.animal.weight < 51 )
						return 22.84;
					else if( this.animal.weight >= 51 )
						return 26.68;
					break;
				case 7:
				case 8:
				case 9:
					if( this.animal.weight >= 0 && this.animal.weight < 6 )
						return 14.27;
					else if( this.animal.weight >= 6 && this.animal.weight < 21 )
						return 17.25;
					else if( this.animal.weight >= 21 && this.animal.weight < 36 )
						return 21.04;
					else if( this.animal.weight >= 36 && this.animal.weight < 51 )
						return 27.21;
					else if( this.animal.weight >= 51 )
						return 31.10;
					break;
			}
			
			return false;
			break;
		case 'Plus Pakket':
			switch( this.animal.age )
			{
				case 0:
					if( this.animal.weight >= 0 && this.animal.weight < 6 )
						return 18.11;
					else if( this.animal.weight >= 6 && this.animal.weight < 21 )
						return 19.79;
					else if( this.animal.weight >= 21 && this.animal.weight < 36 )
						return 22.26;
					else if( this.animal.weight >= 36 && this.animal.weight < 51 )
						return 25.51;
					else if( this.animal.weight >= 51 )
						return 29.72;
					break;
				case 1:
				case 2:
				case 3:
					if( this.animal.weight >= 0 && this.animal.weight < 6 )
						return 19.97;
					else if( this.animal.weight >= 6 && this.animal.weight < 21 )
						return 22.05;
					else if( this.animal.weight >= 21 && this.animal.weight < 36 )
						return 24.28;
					else if( this.animal.weight >= 36 && this.animal.weight < 51 )
						return 27.42;
					else if( this.animal.weight >= 51 )
						return 31.74;
					break;
				case 4:
				case 5:
				case 6:
					if( this.animal.weight >= 0 && this.animal.weight < 6 )
						return 21.46;
					else if( this.animal.weight >= 6 && this.animal.weight < 21 )
						return 24.07;
					else if( this.animal.weight >= 21 && this.animal.weight < 36 )
						return 28.01;
					else if( this.animal.weight >= 36 && this.animal.weight < 51 )
						return 31.31;
					else if( this.animal.weight >= 51 )
						return 35.73;
					break;
				case 7:
				case 8:
				case 9:
					if( this.animal.weight >= 0 && this.animal.weight < 6 )
						return 22.47;
					else if( this.animal.weight >= 6 && this.animal.weight < 21 )
						return 26.68;
					else if( this.animal.weight >= 21 && this.animal.weight < 36 )
						return 31.10;
					else if( this.animal.weight >= 36 && this.animal.weight < 51 )
						return 36.64;
					else if( this.animal.weight >= 51 )
						return 34.11;
					break;
			}
			
			return false;
			break;
		case 'Totaal Pakket':
			switch( this.animal.age )
			{
				case 0:
					if( this.animal.weight >= 0 && this.animal.weight < 6 )
						return 29.72;
					else if( this.animal.weight >= 6 && this.animal.weight < 21 )
						return 31.79;
					else if( this.animal.weight >= 21 && this.animal.weight < 36 )
						return 33.87;
					else if( this.animal.weight >= 36 && this.animal.weight < 51 )
						return 37.06;
					else if( this.animal.weight >= 51 )
						return 41.64;
					break;
				case 1:
				case 2:
				case 3:
					if( this.animal.weight >= 0 && this.animal.weight < 6 )
						return 32.05;
					else if( this.animal.weight >= 6 && this.animal.weight < 21 )
						return 33.44;
					else if( this.animal.weight >= 21 && this.animal.weight < 36 )
						return 36.26;
					else if( this.animal.weight >= 36 && this.animal.weight < 51 )
						return 39.62;
					else if( this.animal.weight >= 51 )
						return 44.25;
					break;
			}
			
			return false;
			break;
		default:
			return false;
			break;
	}
}
CalculatePrize.prototype.getBasicPriceCat = function()
{
	switch( this.animal.careType )
	{
		case 'Basis Pakket':
			switch( this.animal.age )
			{
				case 0:
					return 8.47;
					break;
				case 1:
				case 2:
				case 3:
					return 9.91;
					break;
				case 4:
				case 5:
				case 6:
					return 10.86;
					break;
				case 7:
				case 8:
				case 9:
					return 11.34;
					break;
				case 10:
				case 11:
				case 12:
					return 11.98;
					break;
			}
			
			return false;
			break;
		case 'Plus Pakket':
			switch( this.animal.age )
			{
				case 0:
					return 15.82;
					break;
				case 1:
				case 2:
				case 3:
					return 16.77;
					break;
				case 4:
				case 5:
				case 6:
					return 17.68;
					break;
				case 7:
				case 8:
				case 9:
					return 18.32;
					break;
				case 10:
				case 11:
				case 12:
					return 19.92;
					break;
			}
			
			return false;
			break;
		case 'Totaal Pakket':
			switch( this.animal.age )
			{
				case 0:
					return 21.73;
					break;
				case 1:
				case 2:
				case 3:
					return 22.26;
					break;
				case 4:
				case 5:
				case 6:
					return 24.02;
					break;
				case 7:
				case 8:
				case 9:
					return 25.13;
					break;
			}
			
			return false;
			break;
		default:
			return false;
			break;
	}
}
CalculatePrize.prototype.getBasicPriceRabbit = function()
{
	switch( this.animal.careType )
	{
		case 'Basis Pakket':
			switch( this.animal.age )
			{
				case 0:
					if( this.animal.weight < 3 )
						return 5.95;
					else
						return 8.19;
					break;
				case 1:
					if( this.animal.weight < 3 )
						return 7.11;
					else
						return 9.17;
					break;
				case 2:
					if( this.animal.weight < 3 )
						return 7.98;
					else
						return 10.04;
					break;
				case 3:
					if( this.animal.weight < 3 )
						return 8.45;
					else
						return 10.51;
					break;
			}
			
			return false;
			break;
		case 'Plus Pakket':
			switch( this.animal.age )
			{
				case 0:
					if( this.animal.weight < 3 )
						return 9.22;
					else
						return 11.28;
					break;
				case 1:
					if( this.animal.weight < 3 )
						return 10.20;
					else
						return 12.26;
					break;
				case 2:
					if( this.animal.weight < 3 )
						return 11.07;
					else
						return 13.13;
					break;
				case 3:
					if( this.animal.weight < 3 )
						return 11.54;
					else
						return 13.60;
					break;
			}
			
			return false;
			break;
		case 'Totaal Pakket':
			switch( this.animal.age )
			{
				case 0:
					if( this.animal.weight < 3 )
						return 12.31;
					else
						return 14.37;
					break;
				case 1:
					if( this.animal.weight < 3 )
						return 13.29;
					else
						return 15.35;
					break;
				case 2:
					if( this.animal.weight < 3 )
						return 14.16;
					else
						return 16.22;
					break;
			}
			
			return false;
			break;
		default:
			return false;
			break;
	}
}
CalculatePrize.prototype.getAge = function( sDate )
{
	// expected format of date: dd-mm-yyyy (other seperators possible)
	var sDay = parseInt( sDate.substring( 0, 2 ), 10 );
	var sMonth = parseInt( sDate.substring( 3, 5 ), 10 );
	var sYear = parseInt( sDate.substring( 6 ), 10 );
	
	var now = new Date();
	var tDay = now.getDate();
	var tMonth = now.getMonth() + 1; // month is zerobase ( 0 - 11 )
	var tYear = now.getFullYear();
	
	var age = tYear - sYear;
	if( ( tMonth < sMonth ) || ( tMonth == sMonth && tDay < sDay ) )
		age -= 1;
	
	return age;
}
CalculatePrize.prototype.getHeader = function()
{
	var type = ''
	switch( this.animal.careType )
	{
		case 'Basis Pakket':
			type = 'Basis Pakket';
			break;
		case 'Plus Pakket':
			type = 'Plus Pakket';
			break;
		case 'Totaal Pakket':
			type = 'Totaal Pakket';
			break;
	}
	var sHeader = '<div class="header"><div class="legend"><div class="corner left top"></div><div class="corner right top"></div>Uw keuze</div><div class="choice">' + type + ' voor ' + this._oForm._container.roepnaam.value + '<br />- leeftijd: ' + this.animal.age + ' jaar';
	if( this.animal.weight > 0 )
		sHeader += '<br />- volgroeid gewicht: ' + this.animal.weight + ' kg.<br />';
	//if( this._oForm._container.stercas.checked || this._oForm._container.chemrad.checked || this._oForm._container.crem.checked || this._oForm._container.reisverz.checked || this._oForm._container.reisverzworld.checked )
	if( this._oForm._container.stercas.checked || this._oForm._container.chemrad.checked || this._oForm._container.crem.checked || this._oForm._container.reisverz.checked )
	{
		sHeader += '<br /><strong>Inclusief:</strong><div>';
		if( this._oForm._container.stercas.checked )
			sHeader += '- Sterilisatie en Castratie Verzekering<br />';
		if( this._oForm._container.chemrad.checked )
			sHeader += '- Chemo en Radiotherapie Verzekering<br />';
		if( this._oForm._container.crem.checked )
			sHeader += '- Crematie Verzekering<br />';
		if( this._oForm._container.reisverz.checked )
			sHeader += '- Reisverzekering Wereld<br />';
		//if( this._oForm._container.reisverzworld.checked )
		//	sHeader += '- Reisverzekering Wereld<br />';
		sHeader += '</div>';
	}
	sHeader += '</div><br />';
	
	return sHeader;
}
CalculatePrize.prototype.getFooter = function( iValue )
{
	var sFooter = '<div class="footer">';
	sFooter += '&euro; ' + ( iValue * 12 ).toFixed( 2 ) + ' per jaar.<br />(excl. 9,7% assurantiebelasting)';
	sFooter += this.getPostage();
	sFooter += '</div>';
	
	return sFooter;
}
CalculatePrize.prototype.getContent = function( iValue )
{
	var sContent = '<div class="content"><div class="premie">Uw maandpremie:<div class="prize">&euro; ' + iValue.toFixed( 2 ) + '</div></div></div>';
	
	return sContent;
}
CalculatePrize.prototype.getPostage = function()
{
	if( !this._oForm._container.ontvangstpolis[ 0 ].checked && !this._oForm._container.ontvangstpolis[ 1 ].checked )
		return '';
	
	var sText = '<div class="postage">Poliskosten: &euro; ';
	if( this._oForm._container.ontvangstpolis[ 0 ].checked )
		sText += '7,50'
	else if( this._oForm._container.ontvangstpolis[ 1 ].checked )
		sText += '3,50'
	
	sText += '</div>';
	return sText;
}
CalculatePrize.prototype.getContribution = function()
{
	if( this._oForm._container.eigenbijdrage[ 0 ].checked )
		return 0;
	else if( this._oForm._container.eigenbijdrage[ 1 ].checked )
		return 1.00;
	else if( this._oForm._container.eigenbijdrage[ 2 ].checked )
		return 2.00;
	
	return 0;
}
CalculatePrize.prototype.setResult = function( iValue )
{
	if( !this._oForm._container.berekendmaandpremie )
	{
		this.maandpremie = document.createElement( "INPUT" );
		this.maandpremie.type = "hidden";
		this.maandpremie.id = "berekendmaandpremie";
		this.maandpremie.name = "berekendmaandpremie";
		this.maandpremie.value = iValue.toFixed( 2 );
		
		this._oForm._container.appendChild( this.maandpremie );
	}
	else
		this._oForm._container.berekendmaandpremie.value = iValue.toFixed( 2 );
		
	if( !this._oForm._container.berekendjaarpremie )
	{
		this.jaarpremie = document.createElement( "INPUT" );
		this.jaarpremie.type = "hidden";
		this.jaarpremie.id = "berekendjaarpremie";
		this.jaarpremie.name = "berekendjaarpremie";
		this.jaarpremie.value = ( iValue * 12 ).toFixed( 2 );
		
		this._oForm._container.appendChild( this.jaarpremie );
	}
	else
		this._oForm._container.berekendjaarpremie.value = ( iValue * 12 ).toFixed( 2 );
}
CalculatePrize.prototype.calculateParrot = function()
{
		if( this.animal.careType)
		{
			var iBasic = this.getBasicPriceParrot();
			if(iBasic === false)
				return -2;
			
			var iExtra = this.getExtraPriceParrot();
			if(iExtra === false)
				return -2;
			
			return this.getPaymentFactor( iBasic + iExtra );
		}
		
		return -1;
	}
	CalculatePrize.prototype.getExtraPriceParrot = function()
	{
		var iExtra = 0;
		
		if( this._oForm._container.stercas.checked )
			iExtra += 0.63;
		
		if( this._oForm._container.chemrad.checked )
			iExtra += 1.19;
		
		if( this._oForm._container.crem.checked )
			iExtra += 1.19;
		
		if( this._oForm._container.reisverz.checked && this._oForm._container.looptijdverz[ 0 ].checked )
			iExtra += 1.19;
		
		iExtra += this.getContribution();
		
		return iExtra;
	}
	CalculatePrize.prototype.getBasicPriceParrot = function()
	{
		switch( this.animal.careType )
		{
			case 'Basis Pakket':
				return 9.83;
				break;
			case 'Plus Pakket':
				return 13.13;
				break;
			case 'Totaal Pakket':
				return 16.88;
				break;
			default:
				return false;
				break;
		}
	}
