
function ShowMenu(num, menu)
        {
		var menu2 = menu + 1;
		if  (num=="Product information" || num=="Product support"){
		document.getElementById(menu2).style.display = 'block';
		document.getElementById('subjects_empty').style.display = 'none';
		 }
		 
		 else{
		 document.getElementById(menu2).style.display = 'none';
		 }	 
		 
		 if  (num=="Printed material request"){
		document.getElementById('notice').style.display = 'inline';
		 }
		 else{document.getElementById('notice').style.display = 'none';
		 }
		}


function report2HBX(fstatus){
	//alert(fstatus+" >> HBX");
	var checkHBX = hbx.pn+'_'+fstatus+'_'+vID;
	//alert(checkHBX);
	//alert(hbx.pn+' '+fstatus+' '+vID);
	//_hbSet('c3','+checkHBX+');_hbSend();
	}	  
	  
   
    <!-- java script field validation -->

	
function FormValidator(theForm)
{
if (theForm.firstname.value == "")
  {
	//report2HBX("firstname_error");
	//document.getElementById('firstname_empty').style.display = 'block';
	document.getElementById('firstname').className = 'FormElement_Error';
	//alert("Please enter your first name.");
    theForm.firstname.focus();
	theForm.firstname.select();
   return (false);  
  }
  document.getElementById('firstname').className = 'FormElement';
	//document.getElementById('firstname_empty').style.display = 'none';
  
 if (theForm.lastname.value == "")
  {
    //alert("Please enter your last name."); 
	//document.getElementById('lastname_empty').style.display = 'block';
	document.getElementById('lastname').className = 'FormElement_Error';
    theForm.lastname.focus();
    return (false);
  }
   //document.getElementById('lastname_empty').style.display = 'none';
   document.getElementById('lastname').className = 'FormElement';
if (theForm.email.value != "") {
document.getElementById('email').className = 'FormElement';
			if (!check_email(theForm.email.value)) {
				//alert("The \"email\" field must contain an \"@\" and a \".\".");
				document.getElementById('email').className = 'FormElement_Error_p2';
				//document.getElementById('email_wrong').style.display = 'block';
				//document.getElementById('email_check').className = 'field_empty';
				theForm.email.focus();
				theForm.email.select();
				return false;
			}	
			//else 
			document.getElementById('email').className = 'FormElement';	
			/*document.getElementById('email_check').className = 'EEMC_style input';	*/
		} else {
			//alert ("Please enter your email address.");
			document.getElementById('email').className = 'FormElement_Error';
			//document.getElementById('email_check').className = 'field_empty';
			theForm.email.focus();
			return false;
			}			
			document.getElementById('email').className = 'FormElement';	
			/*document.getElementById('email_check').className = 'EEMC_style input';*/
			
if (theForm.country.value == "Select")
  {
  	//  alert("Please select a country.");
  	document.getElementById('countryList').className = 'FormElement_Error';
    theForm.country.focus();
    return (false);
  }
  document.getElementById('countryList').className = 'FormElement';
  
if (theForm.city.value == "")
  {
  	//  alert("Please select a city.");
  	document.getElementById('city').className = 'FormElement_Error';
    theForm.city.focus();
    return (false);
  }
  document.getElementById('city').className = 'FormElement';
  
if (theForm.subject.value == "Select")
  {
    //alert("Please select a subject.");
	//document.getElementById('subjects_empty').style.display = 'block';
	document.getElementById('subjectList').className = 'FormElement_Error';
    theForm.subject.focus();
    return (false);
  }
    //document.getElementById('subjects_empty').style.display = 'none';
	document.getElementById('subjectList').className = 'FormElement';
  
  if (theForm.product.value == "Select")
  {
    //alert("Please select a product or therapy");
	//document.getElementById('product_empty').style.display = 'block';
	document.getElementById('divprod1').className = 'FormElement_Error';
    theForm.product.focus();
    return (false);
  }
    //document.getElementById('product_empty').style.display = 'none';
	document.getElementById('divprod1').className = 'FormElement';
  
if (theForm.message.value == "")
  {
    //alert("Please enter your message.");
	//document.getElementById('message_empty').style.display = 'block';
	document.getElementById('messageBox').className = 'FormElement_Error';
    theForm.message.focus();
    return (false);
  }
    //document.getElementById('message_empty').style.display = 'none';

	document.getElementById('messageBox').className = 'FormElement';
	
if (!(theForm.checkbox1.checked ))
  {
  
  document.getElementById('disclaimer').className = 'FormElement_Error';
  //document.getElementById('checkbox_error').style.display = 'block';
    //alert("Please check the box to agree with the Medtronic Privacy Statement. If you donīt agree to the terms of the Medtronic Privacy Statement, you will not be able to use this application of the site.");
    theForm.checkbox1.focus();
    return false;
  }
  //document.getElementById('checkbox_error').style.display = 'none';
  document.getElementById('disclaimer').className = 'FormElement';

//return (true);
// HBX tracking
var subjectval = theForm.subject.value;
var productval = theForm.product.value;
var countryval = theForm.country.value;

var formHBX = subjectval+"_"+productval+"_"+countryval;
//alert("form completed - "+formHBX );
//_hbSet('c3','"+formHBX+"');_hbSend();
//_hbSet('c3','+formHBX+');_hbSend();
_hbSet('c3',formHBX);_hbSend();
//alert("tage hbx SET"+_hbSet('c3','+formHBX+'));

//alert("form completed and tag HBX sent");
}
	// check email
	function check_email(emailstr) {
			// test if valid email address, must have @ and .
			var checkEmail = "@.";
			var checkStr = emailstr;
			var EmailValid = false;
			var EmailAt = false;
			var EmailPeriod = false;
			for (i = 0;  i < checkStr.length;  i++) {
			     ch = checkStr.charAt(i);
			     for (j = 0;  j < checkEmail.length;  j++) {
			          if (ch == checkEmail.charAt(j) && ch == "@")
			              EmailAt = true;
			              if (ch == checkEmail.charAt(j) && ch == ".")
						      EmailPeriod = true;
			                  if (EmailAt && EmailPeriod)
			                      break;
			                  if (j == checkEmail.length)
			                      break;
			      }
				  // if both the @ and . were in the string
			      if (EmailAt && EmailPeriod) {
			          EmailValid = true
			          break;
			      }
			} // end of for loop.
			if (!EmailValid) {
					return false;
			}
			return true;
	} // end of email validation...