
function calculateQuote(){if(document.insurance_form.insurance_exp.value==1){if(document.insurance_form.licence_type.value==1){if(document.insurance_form.location.value==7){insured_only_prov_dublin();}else
{insured_only_prov_ex_dublin();}}else if(document.insurance_form.licence_type.value==2){if(document.insurance_form.location.value==7){insured_only_full_dublin();}else
{insured_only_full_ex_dublin();}}}else if(document.insurance_form.insurance_exp.value==2){if(document.insurance_form.licence_type.value==1){if(document.insurance_form.location.value==7){insured_named_prov_dublin();}else
{insured_named_prov_ex_dublin();}}else if(document.insurance_form.licence_type.value==2){if(document.insurance_form.location.value==7){insured_named_full_dublin();}else{insured_named_full_ex_dublin();}}}}function occupationDiscount(quoteAmount){quoteAmount-=(quoteAmount*(0.15));return quoteAmount;}function promo_1(insurance_type,no_claims_bonus,quote_amount){insurance_qualify=new Boolean();claims_qualify=new Boolean();if(insurance_type==1){insurance_qualify=true;}else if(insurance_type==2){insurance_qualify=false;}if(no_claims_bonus==1||no_claims_bonus==2){claims_qualify=true;}else{claims_qualify=false;}if(claims_qualify==true&&insurance_qualify==true){quote_amount-=(quote_amount*0.20);quote_amount-=200;if(quote_amount<850){quote_amount=850;}}return quote_amount;}function promo_2(insurance_type,no_claims_bonus,quote_amount){insurance_qualify=new Boolean();claims_qualify=new Boolean();if(insurance_type==2){insurance_qualify=true;}else if(insurance_type==1){insurance_qualify=false;}if(no_claims_bonus==1){claims_qualify=false;}else{claims_qualify=true;}if(insurance_qualify==true&&claims_qualify==true){quote_amount-=(quote_amount*0.20);quote_amount-=200;if(quote_amount<950){quote_amount=950;}}return quote_amount;}function introNoClaimsDiscount(quoteAmount,drivingExp){if(drivingExp==1){}else if(drivingExp==2){quoteAmount-=(quoteAmount*(0.20));}else if(drivingExp==3){quoteAmount-=(quoteAmount*(0.30));}return quoteAmount;}function noClaimBonusDiscount(quoteAmount,noClaimsAmount){if(noClaimsAmount==1){}else if(noClaimsAmount==2){quoteAmount-=(quoteAmount*(0.20));}else if(noClaimsAmount==3){quoteAmount-=(quoteAmount*(0.30));}else if(noClaimsAmount==4){quoteAmount-=(quoteAmount*(0.40));}else if(noClaimsAmount==5){quoteAmount-=(quoteAmount*(0.50));}return quoteAmount;}function insured_only_prov_dublin(){var quoteAmount=new Number(0);quoteAmount=startingAmountIOPD(document.insurance_form.age.value,document.insurance_form.insurance_type.value,document.insurance_form.engine_size.value);quoteAmount=introNoClaimsDiscount(quoteAmount,document.insurance_form.named_driving_experience.value);quoteAmount=noClaimBonusDiscount(quoteAmount,document.insurance_form.no_claims_bonus.value);quoteAmount=Math.round(quoteAmount);quoteAmount=set_min_premium(quoteAmount);document.getElementById('loadingScreen').style.display="None";document.getElementById('quoteResults').innerHTML='<p><b>Your Quote</b><br /><br />&euro;'+quoteAmount+'</p>';document.getElementById('quoteResults').style.display="Inline";document.getElementById('quoteOptions').style.display="Inline";}function set_min_premium(quoteAmount){if(quoteAmount<850){quoteAmount=850;}return quoteAmount;}function insured_only_prov_ex_dublin(){var quoteAmount=new Number(0);quoteAmount=startingAmountIOPEXD(document.insurance_form.age.value,document.insurance_form.insurance_type.value,document.insurance_form.engine_size.value);quoteAmount=introNoClaimsDiscount(quoteAmount,document.insurance_form.named_driving_experience.value);quoteAmount=noClaimBonusDiscount(quoteAmount,document.insurance_form.no_claims_bonus.value);quoteAmount=Math.round(quoteAmount);quoteAmount=set_min_premium(quoteAmount);document.getElementById('loadingScreen').style.display="None";document.getElementById('quoteResults').innerHTML='<p><b>Your Quote</b><br /><br />&euro;'+quoteAmount+'</p>';document.getElementById('quoteResults').style.display="Inline";document.getElementById('quoteOptions').style.display="Inline";}function insured_only_full_dublin(){var quoteAmount=new Number(0);quoteAmount=startingAmountIOFD(document.insurance_form.age.value,document.insurance_form.insurance_type.value,document.insurance_form.engine_size.value);quoteAmount=introNoClaimsDiscount(quoteAmount,document.insurance_form.named_driving_experience.value);quoteAmount=noClaimBonusDiscount(quoteAmount,document.insurance_form.no_claims_bonus.value);quoteAmount=Math.round(quoteAmount);quoteAmount=set_min_premium(quoteAmount);document.getElementById('loadingScreen').style.display="None";document.getElementById('quoteResults').innerHTML='<p><b>Your Quote</b><br /><br />&euro;'+quoteAmount+'</p>';document.getElementById('quoteResults').style.display="Inline";document.getElementById('quoteOptions').style.display="Inline";}function insured_only_full_ex_dublin(){var quoteAmount=new Number(0);quoteAmount=startingAmountIOFEXD(document.insurance_form.age.value,document.insurance_form.insurance_type.value,document.insurance_form.engine_size.value);quoteAmount=introNoClaimsDiscount(quoteAmount,document.insurance_form.named_driving_experience.value);quoteAmount=noClaimBonusDiscount(quoteAmount,document.insurance_form.no_claims_bonus.value);quoteAmount=Math.round(quoteAmount);quoteAmount=set_min_premium(quoteAmount);document.getElementById('loadingScreen').style.display="None";document.getElementById('quoteResults').innerHTML='<p><b>Your Quote</b><br /><br />&euro;'+quoteAmount+'</p>';document.getElementById('quoteResults').style.display="Inline";document.getElementById('quoteOptions').style.display="Inline";}function insured_named_prov_dublin(){var quoteAmount=new Number(0);quoteAmount=startingAmountINPD(document.insurance_form.age.value,document.insurance_form.insurance_type.value,document.insurance_form.engine_size.value);quoteAmount=introNoClaimsDiscount(quoteAmount,document.insurance_form.named_driving_experience.value);quoteAmount=noClaimBonusDiscount(quoteAmount,document.insurance_form.no_claims_bonus.value);quoteAmount=Math.round(quoteAmount);quoteAmount=set_min_premium(quoteAmount);document.getElementById('loadingScreen').style.display="None";document.getElementById('quoteResults').innerHTML='<p><b>Your Quote</b><br /><br />&euro;'+quoteAmount+'</p>';document.getElementById('quoteResults').style.display="Inline";document.getElementById('quoteOptions').style.display="Inline";}function insured_named_prov_ex_dublin(){var quoteAmount=new Number(0);quoteAmount=startingAmountINPEXD(document.insurance_form.age.value,document.insurance_form.insurance_type.value,document.insurance_form.engine_size.value);quoteAmount=introNoClaimsDiscount(quoteAmount,document.insurance_form.named_driving_experience.value);quoteAmount=noClaimBonusDiscount(quoteAmount,document.insurance_form.no_claims_bonus.value);quoteAmount=Math.round(quoteAmount);quoteAmount=set_min_premium(quoteAmount);document.getElementById('loadingScreen').style.display="None";document.getElementById('quoteResults').innerHTML='<p><b>Your Quote</b><br /><br />&euro;'+quoteAmount+'</p>';document.getElementById('quoteResults').style.display="Inline";document.getElementById('quoteOptions').style.display="Inline";}function insured_named_full_dublin(){var quoteAmount=new Number(0);quoteAmount=startingAmountINFD(document.insurance_form.age.value,document.insurance_form.insurance_type.value,document.insurance_form.engine_size.value);quoteAmount=introNoClaimsDiscount(quoteAmount,document.insurance_form.named_driving_experience.value);quoteAmount=noClaimBonusDiscount(quoteAmount,document.insurance_form.no_claims_bonus.value);quoteAmount=Math.round(quoteAmount);quoteAmount=set_min_premium(quoteAmount);document.getElementById('loadingScreen').style.display="None";document.getElementById('quoteResults').innerHTML='<p><b>Your Quote</b><br /><br />&euro;'+quoteAmount+'</p>';document.getElementById('quoteResults').style.display="Inline";document.getElementById('quoteOptions').style.display="Inline";}function insured_named_full_ex_dublin(){var quoteAmount=new Number(0);quoteAmount=startingAmountINFEXD(document.insurance_form.age.value,document.insurance_form.insurance_type.value,document.insurance_form.engine_size.value);quoteAmount=introNoClaimsDiscount(quoteAmount,document.insurance_form.named_driving_experience.value);quoteAmount=noClaimBonusDiscount(quoteAmount,document.insurance_form.no_claims_bonus.value);quoteAmount=Math.round(quoteAmount);quoteAmount=set_min_premium(quoteAmount);document.getElementById('loadingScreen').style.display="None";document.getElementById('quoteResults').innerHTML='<p><b>Your Quote</b><br /><br />&euro;'+quoteAmount+'</p>';document.getElementById('quoteResults').style.display="Inline";document.getElementById('quoteOptions').style.display="Inline";}