
function change_texte_produit(numOnglet)
{
	for(i=1; i<4; i++)
	{
		if(i==numOnglet)
		{
			$("#onglet"+i).addClass("active");			
		}
		else
		{
			$("#onglet"+i).removeClass("active");
		}
		
		
	}
	switch(numOnglet)
	{	
		case 1:
		$("#chapo-produit").css("display","block");
		$("#texte-produit").css("display","none");
		$("#ps-produit").css("display","none");
		break;
		
		case 2:
		$("#chapo-produit").css("display","none");
		$("#texte-produit").css("display","block");
		$("#ps-produit").css("display","none");
		break;
		
		case 3:
		$("#chapo-produit").css("display","none");
		$("#texte-produit").css("display","none");
		$("#ps-produit").css("display","block");
		break;
		
	}
}


function affichersurvolDocument(urldocument)
{
	document.getElementById("visuel-produit").style.backgroundImage = 'url(' + urldocument + ')';
	
}

/* fonction video .exe */
function TutorialPopup( TutorialID )
{
    var aurl = 'http://www.dentrek.com/console/flashConsole.asp?x_slidetype=4&x_classid=' + TutorialID
             + '&x_url=' + escape(document.location.href) + '&dummy=' + (new Date).getTime();
var GetConsoleWindow = window.open( aurl, '_blank', 'width=740,height=480,scrollbars=no,status=no,resizable=no,directories=no');
}
/******/

function check_contact(form_name) {  

  error = false;
  form = form_name;
  error_message = "Merci de remplir ou corriger les champs suivants.\n\n";

  check_radio("civilite", "Civilite\n");
  check_input("nom", '1', "Nom\n", true);
  check_input("prenom", '1', "Prenom\n", true);
    
  check_input("adresse", '1', "Adresse\n", true);
  check_input_codepostal("postal", "Code postal\n", true); 
  check_input("ville", '1', "Ville\n", true);
  check_select("pays", 'default', "Pays\n", true);
  check_input("captcha", '1', "Captcha\n", true);
 
  check_input_email("email", "Email\n", true);
  
  check_input("message", '1', "Message\n", true);
 
  if (error == true) {
    //alert(error_message);
	document.getElementById('alert').style.display = 'block';
	
    return false;
  } else {
	document.getElementById('alert').style.display = 'none';
    submitted = true;
    return true;
  }
}
