
function illfrance()
{
    var illfrance=0;
    var theForm = document.forms["abo"];
    var includeInscription1 = theForm.elements["illfrance"];
    if(includeInscription1.checked==true){
        illfrance=1.99;
    }
    return illfrance;
}
function illmobiles()
{
    var illmobiles=0;
    var theForm = document.forms["abo"];
    var includeInscription3 = theForm.elements["illmobiles"];
    if(includeInscription3.checked==true){
        illmobiles=6.99;
	
    }
    return illmobiles;
					if(document.form.abo.illfrance.checked==false){
        alert ('La souscription du forfait illimité France est oblogatoire avec le forfait illimité mobiles');
    }
}



function illmonde()
{
    var illmonde=0;
    var theForm = document.forms["abo"];
    var includeInscription2 = theForm.elements["illmonde"];
    if(includeInscription2.checked==true){
        illmonde=1.99;
    }
    return illmonde;
}

function iptv()
{
    var iptv=0;
    var theForm = document.forms["abo"];
    var includeInscription4 = theForm.elements["iptv"];
    if(includeInscription4.checked==true){
        iptv=1.99;
    }
    return iptv;
}

        
function calculateTotal(abo)
{
	
if ( (abo.illmobiles.checked) == true && (abo.illfrance.checked) == false)
{ 
abo.illfrance.checked = true;
}

if ( (abo.illmonde.checked) == true && (abo.illfrance.checked) == false)
{ 
abo.illfrance.checked = true;
}
	
	
    var totalabo = 29.99 + illfrance() + illmobiles() + illmonde() + iptv();
	var totalabo = Math.round(totalabo*100)/100
    
    var divobj = document.getElementById('totalPrice');
    divobj.style.display='block';
    divobj.innerHTML = "Mon abonnement: "+totalabo+"€";
	


}

function showTotal()
{
    var divobj = document.getElementById('totalPrice');
	divobj.style.display='block';
}



