// JScript File function GetSearchResults() { var searchTerms = document.getElementById("SearchTermText").value; if (searchTerms.length < 3 || searchTerms.replace(/ /gi, "") == "") { alert("Please enter a keyword (of at least three characters) in the search box."); return false; } // form submit code goes here return true; } function region_jumpMenuGo(objId,targ,restore){ //v9.0 var selObj = null; with (document) { if (getElementById) selObj = getElementById(objId); if (selObj && selObj.value) eval(targ+".location='"+selObj.value+"'"); if (restore) selObj.selectedIndex=0; } } function SetMenuVisibility(evtSrcObj, itemID, visible) { document.getElementById(itemID).style.visibility = visible ? "visible" : "hidden"; //evtSrcObj.style.backgroundColor = visible ? "#15529A" : "transparent"; //evtSrcObj.style.backgroundImage = visible ? "url('')" : "url('/images/css/bg_mainNavItem.jpg')"; } function SetLanguage() { var langDDL = document.getElementById("ChooseLangSelect"); top.location.replace("?lang=" + langDDL.options[langDDL.selectedIndex].value); } function ToggleProdRow(linkObj, rowID) { var row = document.getElementById(rowID); row.className = row.className == "show" ? "hide" : "show"; linkObj.innerHTML = row.className == "show" ? "hide" : "show"; } function ProdViewMoreInfoTab_Click(linkObj, tabDivId) { var Div1 = document.getElementById("MoreInfo1"); var Div2 = document.getElementById("MoreInfo2"); var Div3 = document.getElementById("MoreInfo3"); var Div4 = document.getElementById("MoreInfo4"); var Div5 = document.getElementById("MoreInfo5"); var divArr = new Array (Div1,Div2,Div3,Div4,Div5); for (var i = 0; i < divArr.length; i++) { divArr[i].style.display = "none"; } var tabListItems = linkObj.parentNode.parentNode.getElementsByTagName("li"); for (var j = 0; j < tabListItems.length; j++ ) { tabListItems[j].className = j == 0 ? "first" : ""; } linkObj.parentNode.className = linkObj.parentNode.className.indexOf("first") > -1 ? "first selected" : "selected"; switch (tabDivId) { case "MoreInfo1": Div1.style.display = "block"; break; case "MoreInfo2": Div2.style.display = "block"; break; case "MoreInfo3": Div3.style.display = "block"; break; case "MoreInfo4": Div4.style.display = "block"; break; case "MoreInfo5": Div5.style.display = "block"; break; } } // SubNav fly outs - pbs function SetSubMenuVisibility(evtSrcObj, itemID, visible) { document.getElementById(itemID).style.visibility = visible ? "visible" : "hidden"; evtSrcObj.style.backgroundColor = visible ? "#0099cc" : "transparent"; //evtSrcObj.style.backgroundImage = visible ? "url('')" : "url('/images/css/bg_mainNavItem.jpg')"; } // Used in the CONTACT search Product Selector jump menu function ProductSelector_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } function checkOptInBox(OptInCheckbox) { if(OptInCheckbox == false){ msg = "You must check the opt in box in order to continue."; alert(msg); return false; }else{ return true; } } function toggleSubmission() { var checkbox = document.getElementById('OptInCheckbox'); if(!checkbox.checked){ alert('You must agree to receive e-mails in order to receive e-mails.') checkbox.checked = true; } } function checkemailSignup() { var firstName = jQuery.trim(document.getElementById('FirstNameTextBox').value); var lastName = jQuery.trim(document.getElementById('LastNameTextBox').value); var email = document.getElementById('EmailTextBox'); var errors = ""; var nameRegExp = /[^A-Za-z\- ]/; if(firstName == "") { errors += "Please enter a First Name\n"; } if(lastName == "") { errors += "Please enter a Last Name\n"; } if (firstName.search(nameRegExp) > -1 || lastName.search(nameRegExp) > -1) { errors += "First and last names may contain only alphabetical characters, spaces, and dashes.\n"; } if(jQuery.trim(email.value) == "") { errors += "Please enter an E-mail Address\n"; } else if (!isEmail(email)){ errors += "Please enter a valid E-mail Address\n"; } if(errors != "") { alert(errors); return false; } return true; } /** * Verify the syntax of the given e-mail address. * * Empty e-mail addresses are allowed. See RFC 2822 for details. */ function isEmail(formField) { return formField.value.search(/^[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~']+@((?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.?)+|(\[([0-9]{1,3}(\.[0-9]{1,3}){3}|[0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7})\]))$/) != -1; } function isPattern(formField,pattern) { var pattern = pattern || formField.getAttribute('pattern'); var regExp = new RegExp("^"+pattern+"$",""); var correct = regExp.test(formField.value); if (!correct && formField.getAttribute('patternDesc')) correct = formField.getAttribute('patternDesc'); return correct; } // http://www.dustindiaz.com/getelementsbyclass/ function getElementsByClass(node,searchClass,tag) { var classElements = new Array(); var els = node.getElementsByTagName(tag); // use "*" for all elements var elsLen = els.length; var pattern = new RegExp("\\b"+searchClass+"\\b"); for (i = 0, j = 0; i < elsLen; i++) { if ( pattern.test(els[i].className) ) { classElements[j] = els[i]; j++; } } return classElements; } function switchTab (link) { var oldTab = getElementsByClass(document, 'tab-active', 'div'); var oldLink = getElementsByClass(document,'tab-link-active','a'); if(oldTab.length>0){ oldTab[0].className="tab-inactive"; oldLink[0].className="tab-link-inactive"; } document.getElementById(link.href.split('#')[1]).className="tab-active"; link.className="tab-link-active"; var nifties = getElementsByClass(document, 'niftyfill', 'b'); for(i=0; i