// JavaScript Document





/***********************************************

* DEBUT js page contact

***********************************************/



var selectedtablink=""

var tcischecked=false



function handlelink(aobject){

selectedtablink=aobject.href

tcischecked=(document.tabcontrol && document.tabcontrol.tabcheck.checked)? true : false

if (document.getElementById && !tcischecked){

var tabobj=document.getElementById("tablist")

var tabobjlinks=tabobj.getElementsByTagName("A")

for (i=0; i<tabobjlinks.length; i++)

tabobjlinks[i].className=""

aobject.className="current"

document.getElementById("tabiframe").src=selectedtablink

return false

}

else

return true

}



function handleview(){

tcischecked=document.tabcontrol.tabcheck.checked

if (document.getElementById && tcischecked){

if (selectedtablink!="")

window.location=selectedtablink

}

}

/***********************************************

* FIN js page contact

***********************************************/





/***********************************************

* DEBUT js calcul herbergement

***********************************************/

function ChangeDom(ValueDom){

	var valdom = document.getElementById("valuedom");

	valdom.value= ValueDom;

	if(valdom.value == "oui"){

	document.getElementById('saisidom').style.display = "block";

	document.getElementById('nomdomok').style.display = "block";

	document.getElementById('nomdomno').style.display = "none";

	}else if(valdom.value == "non"){

	  document.getElementById('saisidom').style.display = "block";

	  document.getElementById('nomdomok').style.display = "none";

	  document.getElementById('nomdomno').style.display = "block";

	}else{

		document.getElementById('saisidom').style.display = "none";

		document.getElementById('nomdomok').style.display = "none";

	    document.getElementById('nomdomno').style.display = "none";

		document.getElementById('showmontant').style.display = "none";

	}

}





function returndiambar(valeur){

	var valdome = document.getElementById("valuedom");

	var saisidom = document.getElementById("domainename");

	var seldom = document.getElementById("dom");

	var selemail = document.getElementById("adrssemail");

	var typherb = document.getElementById("type_herg");

	var montant = document.getElementById("montant");

	

	if(valeur == 201){

	  tval = "<p style='text-align:center'><strong>Nous vous proposons le pack suivant : </strong></p><p><ul><li><strong>Nom de domaine :</strong> <br>";

	tval+= saisidom.value + seldom.value;

	tval+="</li><li>Un nombre d\'adresses mail illimité<br>Consultation : webmail / Outlook</li><li><strong>5 </strong>Go d\'espace web (html, php, CGI) </li><li><strong>25 </strong>Go d\'espace email </li><li><strong>10 </strong>Bases de données MySQL, PHP MyAdmin </li><li>Statistiques détaillées</li><li><strong> + domaine en .sn</strong></li></ul> </p><p>Montant : <strong>";

	tval+= 249500 + 60000;

	tval+=" FCFA HT / AN</strong></p>";

	document.getElementById("showmontant").style.display='block';

	return tval;

	}else if(valeur == 202){

	  tval = "<p style='text-align:center'><strong>Nous vous proposons le pack suivant : </strong></p><p><ul><li><strong>Nom de domaine :</strong> <br>";

	tval+= saisidom.value + seldom.value;

	tval+="</li><li>Un nombre d\'adresses mail illimité<br>Consultation : webmail / Outlook</li><li><strong>5 </strong>Go d\'espace web (html, php, CGI) </li><li><strong>25 </strong>Go d\'espace email </li><li><strong>10 </strong>Bases de données MySQL, PHP MyAdmin </li><li>Statistiques détaillées</li></ul> </p><p>Montant : <strong>";

	   tval+= 249500;

	   tval+=" FCFA HT / AN</strong></p>";

	   document.getElementById("showmontant").style.display='block';

	return tval;

	}

}



function returnpack(nomdom,nbremails,espaceweb,espacemail,typesite,typedom,montant){

	 document.getElementById("montant").value = montant;

	 

	if(espacemail == ''){

	  tval = "<p style='text-align:center'><strong>Nous vous proposons le pack : </strong></p><p><ul><li><strong>Nom de domaine :</strong> <br>"+ nomdom +"</li><li><strong>"+  espaceweb + "</strong> Go d\'espace disque </li>";

	   if(nbremails == 10){

		  tval+="<li><strong>10 </strong> comptes emails  personnalisé<br>Consultation : webmail / Outlook</li>";
		  tval+="<li><strong>2 Go </strong>   d\’espace de stockage mail</li>";
		  tval+="<li><strong>100 Go </strong>   Trafic (entrant et sortant)</li>";
		  tval+="<li><strong>1</strong> Base de données MYSQL</li><br>";
          tval+="<li><strong> PACK (49.500)</strong></li>";
	  /*}else{

		  tval+="<li><strong> + "+  nbremails + " comptes mails</strong><br>Consultation : webmail / Outlook</li>";
*/
	  }else if(nbremails == 100){
		  
		  tval+="<li><strong>100 </strong> comptes emails  personnalisé<br>Consultation : webmail / Outlook</li>";
		  tval+="<li><strong>2 Go </strong>   d\’espace de stockage mail</li>";
		  tval+="<li><strong>500 Go </strong>   Trafic (entrant et sortant)</li>";
		  tval+="<li><strong>10</strong> Base de données MYSQL</li><br>";
          tval+="<li><strong> PACK (129.500)</strong></li>";
		  
	  }else if(nbremails == 500){
			   
		  tval+="<li><strong>500 </strong> comptes emails  personnalisé<br>Consultation : webmail / Outlook</li>";
		  tval+="<li><strong>3 Go </strong>   d\’espace de stockage mail</li>";
		  tval+="<li><strong>1000 Go </strong>   Trafic (entrant et sortant)</li>";
		  tval+="<li><strong>50</strong> Base de données MYSQL</li><br>";
          tval+="<li><strong> PACK (249.500)</strong></li>";
	  }

       
	  if(typedom == '.sn'){

		  tval+="<li><strong> + domaine en "+  typedom + " (30 000)</strong></li>";

	  }
	  
	   if(typesite == 1){

		  tval+="<li><strong> + Assistance technique (25 000) </strong></li>";

	  }
       tval+="<li><strong> + Frais d'installation du PACK (15 000)</strong></li>";
	 tval+="</ul> </p><p>  Montant : <strong>" +  montant +" FCFA HT / AN</strong></p>";

	 document.getElementById("showmontant").style.display='block';

	return tval;

	}else{

		tval = "<p style='text-align:center'><strong>Nous vous proposons le pack: </strong></p><p><ul><li><strong>Nom de domaine :</strong> <br>"+ nomdom +"</li><li><strong>" + espaceweb + "</strong> Go d\'espace web (html) </li><li><strong>"+ espacemail +"</strong> Go d\'espace mail (2Go/mail) </li>";

		if(nbremails == 101){

		   tval+="<li><strong>10 </strong> comptes emails personnalisés<br>Consultation : webmail / Outlook</li>";

	  }else{

		 tval+="<li><strong> + "+  nbremails + " comptes mails</strong><br>Consultation : webmail / Outlook</li>";

	  }

		if(typesite == 'dynamique'){

		  tval+="<li><strong> + Site "+  typesite + "</strong></li>";

	  }

	  if(typedom == '.sn'){

		  tval+="<li><strong> + domaine en "+  typedom + "</strong></li>";

	  }

		tval+="</ul> </p><p>Montant : <strong>" +  montant +" FCFA HT / AN</strong></p>";

		document.getElementById("showmontant").style.display='block';

	return tval;

	}

	

}



function calculherb(){

	var valdome = document.getElementById("valuedom");

	var saisidom = document.getElementById("domainename");

	var seldom = document.getElementById("dom");

	var selemail = document.getElementById("adrssemail");

	var typherb = document.getElementById("type_herg");
	var asstechn = document.getElementById("asstechn");

	var affmontant = document.getElementById("showmontant");

	document.getElementById("showmontant").style.display='none';

	//alert(asstechn.checked);

	document.getElementById("coordonee").style.display='none';

	

	if(saisidom.value == "" && valdome.value == 'oui'){

	    alert('Veuillez saisir votre nom de domaine svp !!!');

		saisidom.focus();

		return false;

	}else if(saisidom.value == "" && valdome.value == 'non'){

		

		alert('Veuillez saisir le nom de domaine que vous souhaitez svp !!!');

		saisidom.focus();

		return false;

	}else if(saisidom.value != "" && seldom.value == ''){

	  alert('Sélectionnez une extension pour votre nom de domaine !!!');

		seldom.focus();

		return false;

	}

	document.getElementById('selherberg').style.display='block';

	if(selemail.value == ""){

		alert('Sélectionnez le nombre de mail que vous souhaitez !!!');

		selemail.focus();

	}else if(selemail.value == 10){
		affmontant.style.display = 'block';

		 if(asstechn.checked){

			if(seldom.value == '.sn'){

				//affmontant.innerHTML = 'jokko'  + 30000(.sn) + 15000(Frais d'installation du PACK) + 25000 (assistance technique)';

	t=returnpack(saisidom.value + seldom.value,selemail.value,1,'',1,seldom.value,'119 500');

				

				affmontant.innerHTML = t;

			}else{

				//affmontant.innerHTML = 'jokko' + + 15000(Frais d'installation du PACK)' +25000 (assistance technique);
         		t=returnpack(saisidom.value + seldom.value,selemail.value,1,'',1,seldom.value,'89 500');

				affmontant.innerHTML = t;

				

			}

			

		}else{

			if(seldom.value == '.sn'){

				//affmontant.innerHTML = 'jokko'  + 30000(.sn) + 15000(Frais d'installation du PACK) ;

				t=returnpack(saisidom.value + seldom.value,selemail.value,1,'',0,seldom.value,'94 500');

				affmontant.innerHTML = t;

			}else{

				//affmontant.innerHTML = 'jokko'  + 15000(Frais d'installation du PACK) ;

				t=returnpack(saisidom.value + seldom.value,selemail.value,1,'',0,seldom.value,'64 500');

				affmontant.innerHTML = t;

			}

		}

		

	}else if(selemail.value == 100){
		affmontant.style.display = 'block';

		 if(asstechn.checked){

			if(seldom.value == '.sn'){

				//affmontant.innerHTML = 'BIDEW +'  + 30000(.sn) + 15000(Frais d'installation du PACK) + 25000 (assistance technique)';

	t=returnpack(saisidom.value + seldom.value,selemail.value,100,'',1,seldom.value,'199 500');

				

				affmontant.innerHTML = t;

			}else{

				//affmontant.innerHTML = 'BIDEW +' + + 15000(Frais d'installation du PACK)' +25000 (assistance technique);
         		t=returnpack(saisidom.value + seldom.value,selemail.value,100,'',1,seldom.value,'169 500');

				affmontant.innerHTML = t;

				

			}

			

		}else{

			if(seldom.value == '.sn'){

				//affmontant.innerHTML = 'BIDEW +'  + 30000(.sn) + 15000(Frais d'installation du PACK) ;

				t=returnpack(saisidom.value + seldom.value,selemail.value,100,'',0,seldom.value,'174 500');

				affmontant.innerHTML = t;

			}else{

				//affmontant.innerHTML = 'BIDEW +'  + 15000(Frais d'installation du PACK) ;

				t=returnpack(saisidom.value + seldom.value,selemail.value,100,'',0,seldom.value,'144 500');

				affmontant.innerHTML = t;

			}

		}

		

	}else if(selemail.value == 500){
		affmontant.style.display = 'block';

		 if(asstechn.checked){

			if(seldom.value == '.sn'){

				//affmontant.innerHTML = 'DIAMBAR +'  + 30000(.sn) + 15000(Frais d'installation du PACK) + 25000 (assistance technique)';

	t=returnpack(saisidom.value + seldom.value,selemail.value,500,'',1,seldom.value,'319 500');

				

				affmontant.innerHTML = t;

			}else{

				//affmontant.innerHTML = 'DIAMBAR +'  + 15000(Frais d'installation du PACK)' +25000 (assistance technique);
         		t=returnpack(saisidom.value + seldom.value,selemail.value,500,'',1,seldom.value,'289 500');

				affmontant.innerHTML = t;

				

			}

			

		}else{

			if(seldom.value == '.sn'){

				//affmontant.innerHTML = 'DIAMBAR +'  + 30000(.sn) + 15000(Frais d'installation du PACK) ;

				t=returnpack(saisidom.value + seldom.value,selemail.value,500,'',0,seldom.value,'294 500');

				affmontant.innerHTML = t;

			}else{

				//affmontant.innerHTML = 'DIAMBAR +'  + 15000(Frais d'installation du PACK) ;

				t=returnpack(saisidom.value + seldom.value,selemail.value,500,'',0,seldom.value,'264 500');

				affmontant.innerHTML = t;

			}

		}

		

	}/*else if(selemail.value == 5){
		affmontant.style.display = 'block';

		if(typherb.value == ''){

			alert("Sélectionnez le type d'hebergement que vous désirez !!!");

		    typherb.focus();

		}else if(typherb.value == 'dynamique'){

			if(seldom.value == '.sn'){

				//affmontant.innerHTML = 'jokko + 50000(email)' + '50000(base de données) + 60000(.sn)';

				t=returnpack(saisidom.value + seldom.value,selemail.value,1,'',typherb.value,seldom.value,'209 500');

				

				affmontant.innerHTML = t;

			}else{

				t=returnpack(saisidom.value + seldom.value,selemail.value,1,'',typherb.value,seldom.value,'149 500');

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'jokko + 50000(email)' + '50000(base de données)';

			}

			

		}else if(typherb.value == 'statique'){

			if(seldom.value == '.sn'){

				t=returnpack(saisidom.value + seldom.value,selemail.value,1,'',typherb.value,seldom.value,'159 500');

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'jokko + 50000(email) + 60000(.sn)';

			}else{

				t=returnpack(saisidom.value + seldom.value,selemail.value,1,'',typherb.value,seldom.value,'99 500');

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'jokko + 50000(email)' ;

			}

		}

		

	}else if(selemail.value == 10){affmontant.style.display = 'block';

		if(typherb.value == ''){

			alert("Sélectionnez le type d'hebergement que vous désirez !!!");

		    typherb.focus();

		}else if(typherb.value == 'dynamique'){

			if(seldom.value == '.sn'){

				t=returnpack(saisidom.value + seldom.value,selemail.value,2,20,typherb.value,seldom.value,'239 500');

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'biddew' + '50000(base de données) + 60000(.sn)';

			}else{

				t=returnpack(saisidom.value + seldom.value,selemail.value,2,20,typherb.value,seldom.value,'299 500');

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'biddew' + '50000(base de données)';

			}

			

		}else if(typherb.value == 'statique'){

			if(seldom.value == '.sn'){

				t=returnpack(saisidom.value + seldom.value,selemail.value,2,20,typherb.value,seldom.value,'189 500');

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'biddew + 60000(.sn)';

			}else{

				t=returnpack(saisidom.value + seldom.value,selemail.value,2,20,typherb.value,seldom.value,'129 500');

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'biddew' ;

			}

		}

		

	}else if(selemail.value == 15){affmontant.style.display = 'block';

		if(typherb.value == ''){

			alert("Sélectionnez le type d'hebergement que vous désirez !!!");

		    typherb.focus();

		}else if(typherb.value == 'dynamique'){

			if(seldom.value == '.sn'){

				t=returnpack(saisidom.value + seldom.value,selemail.value,2,20,typherb.value,seldom.value,'289 500');

				affmontant.innerHTML = t;

	//affmontant.innerHTML = 'biddew + 50000(email)' + '50000(base de données) + 60000(.sn)';

			}else{

				t=returnpack(saisidom.value + seldom.value,selemail.value,2,20,typherb.value,seldom.value,'229 500');

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'biddew + 50000(email)' + '50000(base de données)';

			}

			

		}else if(typherb.value == 'statique'){

			if(seldom.value == '.sn'){

				t=returnpack(saisidom.value + seldom.value,selemail.value,2,20,typherb.value,seldom.value,'239 500');

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'biddew + 50000(email) + 60000(.sn)';

			}else{

				

				t=returnpack(saisidom.value + seldom.value,selemail.value,2,20,typherb.value,seldom.value,'179 500');

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'biddew + 50000(email)' ;

			}

		}

		

	}else if(selemail.value == 20 || selemail.value == 'plus'){

		affmontant.style.display = 'block';

		document.getElementById('selherberg').style.display='none';

		

		if(seldom.value == '.sn'){

			    t = returndiambar(201);

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'Diambar + 60000(.sn)';

			}else{

				t = returndiambar(202);

				affmontant.innerHTML = t;

				//affmontant.innerHTML = 'Diambar';

			}

	}*/

}





function reinit(){

	var selemail = document.getElementById("adrssemail");

	var typherb = document.getElementById("type_herg");

	var affmontant = document.getElementById("showmontant");

	

	document.getElementById("selherberg").style.display='block';

	selemail.value = ''; 

	typherb.value = '';

	affmontant.style.display = 'none';

	

}

/***********************************************

* FIN js calcul herbergement

***********************************************/



function demandeplan(ObjetType){

	//alert(ObjetType);

	if(ObjetType=="webplan"){

		for(i=1;i<15;i++){

			document.getElementById('webpro'+i).checked=false;

		}

		document.getElementById('showwebplan').style.display = 'block';

		document.getElementById('showwebpro').style.display = 'none';

		document.getElementById('enrg').style.display = 'block';

	}else if(ObjetType=="webpro"){

		for(i=1;i<3;i++){

			document.getElementById('webplan'+i).checked=false;

		}

	  document.getElementById('showwebplan').style.display = 'none';

		document.getElementById('showwebpro').style.display = 'block';

		document.getElementById('enrg').style.display = 'block';

	}

}





function Localpopup(CarteLink)

{ 

	var t = (screen.availHeight/2) - (600/2);

	var l = (screen.availWidth/2) - (800/2);

	var emailWin = window.open(CarteLink, "emailWin", "scrollbars=yes,toolbar=1,statusbar=0,width=800,height=600,top="+t+",left="+l);

}




