/*********** func_defaultJS **********************/
	var browserName = navigator.appName;
	var browserVer = parseInt(navigator.appVersion);
	var version = "";
	var msie4 = (browserName == "Microsoft Internet Explorer" && browserVer >= 4);
	if ((browserName == "Netscape" && browserVer >= 3) || msie4 || browserName=="Konqueror" || browserName=="Opera") {version = "n3";} else {version = "n2";}
	// Blurring links:
	function blurLink(theObject)    {       //
		if (msie4)      {theObject.blur();}
	}



jQuery(document).ready(function () {
/*********** content-script-29 **********************/
if(jQuery("#form20").length > 0){
  jQuery(".contact_pro").css("display","none");
  jQuery(".contact_part").css("display","none");
  jQuery(".contact_common2").css("display","none");
  jQuery("#tx_decadvforms_pi1-form20-company").parents("p").css("display","none");
  jQuery("#tx_decadvforms_pi1-form20-PAdelai_projet").css("margin-top","10px");

  var v =  jQuery("#tx_decadvforms_pi1-form20-PRcompany_type").val();
  if(v == "Autre (spécifier)"){
    jQuery("#tx_decadvforms_pi1-form20-PRcompany_type2").parents("p").css("display","block");
  }
  else{
    jQuery("#tx_decadvforms_pi1-form20-PRcompany_type2").parents("p").css("display","none");
  }

  var v =  jQuery("#tx_decadvforms_pi1-form20-PRprojet").val();
  if(v == "Autre (spécifier)"){
    jQuery("#tx_decadvforms_pi1-form20-PRprojet2").parents("p").css("display","block");
  }
  else{
    jQuery("#tx_decadvforms_pi1-form20-PRprojet2").parents("p").css("display","none");
  }
}
function interet(type){
	var liste = document.form20["tx_decadvforms_pi1-form20-interet_produit"];
	for(i=0;i<liste.length;i++){
		 liste.options[i] = null;
	 }
	if(type == "pro"){
		 nouvel_element = new Option("","",false,false);
		 liste.options[0] = nouvel_element;
		 nouvel_element = new Option("Thermopierre","Thermopierre",false,false);
		 liste.options[1] = nouvel_element;
		 nouvel_element = new Option("mi335","mi335",false,false);
		 liste.options[2] = nouvel_element;
		 nouvel_element = new Option("Multipor","Multipor",false,false);
		 liste.options[3] = nouvel_element;
		 nouvel_element = new Option("Caropro","Caropro",false,false);
		 liste.options[4] = nouvel_element;
		 nouvel_element = new Option("Coupe feu","Coupe feu",false,false);
		 liste.options[5] = nouvel_element;
	}else{
		 nouvel_element = new Option("","",false,false);
		 liste.options[0] = nouvel_element;
		 nouvel_element = new Option("Je ne sais pas","Je ne sais pas",false,false);
		 liste.options[1] = nouvel_element;
		 nouvel_element = new Option("Thermopierre","Thermopierre",false,false);
		 liste.options[2] = nouvel_element;
		 nouvel_element = new Option("mi335","mi335",false,false);
		 liste.options[3] = nouvel_element;
		 nouvel_element = new Option("Multipor","Multipor",false,false);
		 liste.options[4] = nouvel_element;
		 nouvel_element = new Option("Caropro","Caropro",false,false);
		 liste.options[5] = nouvel_element;
		 nouvel_element = new Option("Coupe feu","Coupe feu",false,false);
		 liste.options[6] = nouvel_element;
	}
}
if(jQuery("#tx_decadvforms_pi1-form20-type_user-PRO").get(0).checked){
  jQuery(".contact_pro").css("display","block");
  jQuery(".contact_common2").css("display","block");
  jQuery("#tx_decadvforms_pi1-form20-company").parents("p").css("display","block");
  jQuery("#tx_decadvforms_pi1-form20-choix_constructeur").parents("p").css("display","none");
  jQuery("#tx_decadvforms_pi1-form20-choix_constructeur_oui").parents("p").css("display","none");
  interet("pro");
}

if(jQuery("#tx_decadvforms_pi1-form20-type_user-PART").get(0).checked){
  jQuery(".contact_part").css("display","block");
  jQuery(".contact_common2").css("display","block");
  jQuery("#tx_decadvforms_pi1-form20-company").parents("p").css("display","none");
  jQuery("#tx_decadvforms_pi1-form20-choix_constructeur").parents("p").css("display","block");
  jQuery("#tx_decadvforms_pi1-form20-choix_constructeur_oui").parents("p").css("display","block");
  interet("part");
}

jQuery("#tx_decadvforms_pi1-form20-type_user-PRO").click( 
function() {
  jQuery(".contact_pro").css("display","block");
  jQuery(".contact_part").css("display","none");
  jQuery(".contact_common2").css("display","block");
  jQuery("#tx_decadvforms_pi1-form20-company").parents("p").css("display","block");
  jQuery("#tx_decadvforms_pi1-form20-choix_constructeur").parents("p").css("display","none");
  jQuery("#tx_decadvforms_pi1-form20-choix_constructeur_oui").parents("p").css("display","none");
  interet("pro");
}
);

jQuery("#tx_decadvforms_pi1-form20-type_user-PART").click( 
function() {
  jQuery(".contact_part").css("display","block");
  jQuery(".contact_pro").css("display","none");
  jQuery(".contact_common2").css("display","block");
  jQuery("#tx_decadvforms_pi1-form20-company").parents("p").css("display","none");
  jQuery("#tx_decadvforms_pi1-form20-choix_constructeur").parents("p").css("display","block");
  jQuery("#tx_decadvforms_pi1-form20-choix_constructeur_oui").parents("p").css("display","none");
  interet("part");
}
);


jQuery("#tx_decadvforms_pi1-form20-PRcompany_type").change( 
function() {
  var v =jQuery(this).val();
  if(v == "Autre (spécifier)"){
    jQuery("#tx_decadvforms_pi1-form20-PRcompany_type2").parents("p").css("display","block");
  }
  else{
    jQuery("#tx_decadvforms_pi1-form20-PRcompany_type2").parents("p").css("display","none");
  }
}
);

jQuery("#tx_decadvforms_pi1-form20-PRprojet").change( 
function() {
  var v =jQuery(this).val();
  if(v == "Autre (spécifier)"){
    jQuery("#tx_decadvforms_pi1-form20-PRprojet2").parents("p").css("display","block");
  }
  else{
    jQuery("#tx_decadvforms_pi1-form20-PRprojet2").parents("p").css("display","none");
  }
}
);
jQuery("#tx_decadvforms_pi1-form20-choix_constructeur").change( 
function() {
  var v =jQuery(this).val();
  if(v == "Oui"){
    jQuery("#tx_decadvforms_pi1-form20-choix_constructeur_oui").parents("p").css("display","block");
  }
  else{
    jQuery("#tx_decadvforms_pi1-form20-choix_constructeur_oui").parents("p").css("display","none");
  }
}
);


/*********** tx_decstdcontent_hideFileTypeDescrByDefault **********************/
//this file is inserted in global js file via lib.stdcontent_headerData.51
jQuery(".dsc-file-type-description").hide();
jQuery(".dsc-file-type-description-header").after('<p class="dsc-file-type-description-header"><a href="#" class="dsc-file-type-description-header-link">' + jQuery(".dsc-file-type-description-header").text() + "</a></p>").remove();
jQuery(".dsc-file-type-description-header-link").click(function(){ jQuery(this).parents(".dsc-uploads-file").find(".dsc-file-type-description").toggle(); return false;});


});
