var is=new Object(); var display_menus=true; is.version = new
Number(navigator.appVersion.substr(0,1)); is.netscape =
(navigator.appName == "Netscape"); is.netscape6 = (is.netscape &&
is.version >= 5); is.ie =
(navigator.appVersion.toLowerCase().indexOf("msie") >= 0); is.opera =
(navigator.appName == "Opera"); var get_menus =
WM_readCookie("GracoMenus"); if (get_menus == false) { display_menus =
true; } else if (get_menus == "off") { display_menus = false; } function
FlashWrite(url,width,height) { document.write(''); document.write(' ');
document.write(' '); document.write(' '); document.write(' '); }
function startSearch(type, key) { var f = document.forms[type]; }
function checkAction(type, key) { var f = document.forms[type]; if
(f.q.value == "") { alert("You must supply a search query!"); return
false; } else if (f.action != "") { f.action =
"http://www.graco.com/Internet/SiteSearch.nsf/Search?OpenAgent&Mode="+escape(key)+"&Query="+encodeURIComponent(f.q.value);
return true; } else { return false; } } var WM_acceptsCookies = false;
if(document.cookie == '') { document.cookie = 'WM_acceptsCookies=yes';
// Try to set a cookie.
if(document.cookie.indexOf('WM_acceptsCookies=yes') != -1) {
WM_acceptsCookies = true; }// If it succeeds, set variable } else { //
there was already a cookie WM_acceptsCookies = true; } function
WM_setCookie (name, value, hours, path, domain, secure) { if
(WM_acceptsCookies) { var not_NN2 = (navigator && navigator.appName &&
(navigator.appName == 'Netscape') && navigator.appVersion &&
(parseInt(navigator.appVersion) == 2))?false:true; if(hours && not_NN2)
{ // NN2 cannot handle Dates, so skip this part if ( (typeof(hours) ==
'string') && Date.parse(hours) ) { // already a Date string var numHours
= hours; } else if (typeof(hours) == 'number') { // calculate Date from
number of hours var numHours = (new Date((new Date()).getTime() +
hours*3600000)).toGMTString(); } } document.cookie = name + '=' +
escape(value) + ((numHours)?(';expires=' + numHours):'') +
((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') +
((secure && (secure == true))?'; secure':''); } } // WM_setCookie
function WM_readCookie(name) { if(document.cookie == '') { // there's no
cookie, so go no further return false; } else { // there is a cookie var
firstChar, lastChar; var theBigCookie = document.cookie; firstChar =
theBigCookie.indexOf(name); // find the start of 'name' var NN2Hack =
firstChar + name.length; if((firstChar != -1) &&
(theBigCookie.charAt(NN2Hack) == '=')) { // if you found the cookie
firstChar += name.length + 1; // skip 'name' and '=' lastChar =
theBigCookie.indexOf(';', firstChar); // Find the end of the value
string (i.e. the next ';'). if(lastChar == -1) lastChar =
theBigCookie.length; return unescape(theBigCookie.substring(firstChar,
lastChar)); } else { // If there was no cookie of that name, return
false. return false; } } } // WM_readCookie function WM_killCookie(name,
path, domain) { var theValue = WM_readCookie(name); // We need the value
to kill the cookie if(theValue) { document.cookie = name + '=' +
theValue + '; expires=Fri, 13-Apr-1970 00:00:00 GMT' + ((path)?';path='
+ path:'') + ((domain)?';domain=' + domain:''); // set an
already-expired cookie } } // WM_killCookie function switchMenu(op) {
WM_killCookie("GracoMenus", "/", "graco.com") ; WM_setCookie
("GracoMenus", op, null, "/", "graco.com") ; location.reload(); }
function setColor(el, bg) { if (el.style) el.style.backgroundColor = bg;
} var bgBad = "#CCCCCC"; var bgGood = "white"; function trim(arg,func) {
var trimvalue = ""; arglen = arg.length; if (arglen < 1) return
trimvalue; if (func == "left" || func== "both") { i = 0; pos = -1; while
(i < arglen) { if (arg.charCodeAt(i) != 32 && !isNaN(arg.charCodeAt(i)))
{ pos = i; break; } i++; } } if (func == "right" || func== "both") { var
lastpos = -1; i = arglen; while (i >= 0) { if (arg.charCodeAt(i) != 32
&& !isNaN(arg.charCodeAt(i))) { lastpos = i; break; } i--; } } if (func
== "left") { trimvalue = arg.substring(pos,arglen-1); } if (func ==
"right") { trimvalue = arg.substring(0,lastpos+1); } if (func == "both")
{ trimvalue = arg.substring(pos,lastpos + 1); } return trimvalue; }
function checkFinancialForm() { var msg; msg = ""; form =
document.forms["fin_info"]; if (trim(form.FirstName.value, "both") ==
"") { msg = msg+"\nYour first name." ; form.FirstName.focus() ;
setColor(form.FirstName, bgBad) ; } else { setColor(form.FirstName,
bgGood); } if (trim(form.LastName.value, "both") == "") { msg =
msg+"\nYour last name." ; form.LastName.focus() ;
setColor(form.LastName, bgBad) ; } else { setColor(form.LastName,
bgGood); } if (trim(form.AddressOne.value, "both") == "") { msg =
msg+"\nYour address." ; form.AddressOne.focus() ;
setColor(form.AddressOne, bgBad) ; } else { setColor(form.AddressOne,
bgGood); } if (trim(form.City.value, "both") == "") { msg = msg+"\nYour
city." ; form.City.focus() ; setColor(form.City, bgBad) ; } else {
setColor(form.City, bgGood); } s_find =
form.State.options[form.State.selectedIndex].text ; p_find =
form.Province.options[form.Province.selectedIndex].text ; c_find =
form.Country.options[form.Country.selectedIndex].text ; if ((s_find ==
"Choose State" | s_find == "") & c_find == "UNITED STATES") { msg = msg
+ "\nYour state." ; setColor(form.State, bgBad); form.State.focus(); }
else { setColor(form.State, bgGood); } if (p_find == "Choose Province" &
c_find == "CANADA") { msg = msg + "\nYour province." ;
setColor(form.Province, bgBad); form.Province.focus(); } else {
setColor(form.Province, bgGood); } if (trim(form.Zip.value, "both") ==
"") { msg = msg+"\nYour zip/postal code." ; form.Zip.focus() ;
setColor(form.Zip, bgBad) ; } else { setColor(form.Zip, bgGood); } if
(msg != "") { alert("Please provide: "+msg) ; return false ; } else {
return true ; } } function popWinUp(URL, atts) { if (atts == "") {
DEF_ATTRIB = "height=500,width=500,scrollbars,resizable"; } else {
DEF_ATTRIB = atts; } child = window.open(URL, "spawn", DEF_ATTRIB);
child.opener = self; child.focus(); } function buySearch(form) { s_find
= form.State.options[form.State.selectedIndex].value; form.action =
"/Internet/T_IEDDst.nsf/Search?OpenAgent&Query="+s_find; if (s_find ==
"Select Location" | s_find == "------------------------" | s_find == "")
{ return false; } else { return true; } } function buyCEDSearch(form) {
//form=this.document.forms[0]; s_find =
form.State.options[form.State.selectedIndex].value; form.action =
"/Internet/T_CEDDst.nsf/Search?OpenAgent&Query="+s_find; if (s_find ==
"Select Location" | s_find == "------------------------" | s_find == "")
{ return false; } else { return true; } } function buyLEDSearch(form) {
s_find = form.State.options[form.State.selectedIndex].value; if
(form.RepType[0].checked == true) form.action =
"/Internet/LED_SalesReps.nsf/Search?OpenAgent&Type="+form.RepType[0].value+"Query="+s_find
else form.action =
"/Internet/LED_SalesReps.nsf/Search?OpenAgent&Type="+form.RepType[1].value+"Query="+s_find;
if (s_find == "Select Location" | s_find == "------------------------" |
s_find == "") { return false; } else { return true; } } function
checkLitForm(form) { var msg; msg = ""; form =
document.forms["fin_info"]; //if (trim(form.Companyname.value, "both")
== "") { //msg = msg+"\nYour company name." ; //form.Companyname.focus()
; //setColor(form.Companyname, bgBad) ; //} else {
//setColor(form.Companyname, bgGood); //} if (trim(form.Name.value,
"both") == "") { msg = msg+"\nYour name." ; form.Name.focus() ;
setColor(form.Name, bgBad) ; } else { setColor(form.Name, bgGood); } if
(trim(form.Address.value, "both") == "") { msg = msg+"\nYour address." ;
form.Address.focus() ; setColor(form.Address, bgBad) ; } else {
setColor(form.Address, bgGood); } if (trim(form.City.value, "both") ==
"") { msg = msg+"\nYour city." ; form.City.focus() ; setColor(form.City,
bgBad) ; } else { setColor(form.City, bgGood); } s_find =
form.State.options[form.State.selectedIndex].text ; p_find =
form.Province.options[form.Province.selectedIndex].text ; c_find =
form.Country.options[form.Country.selectedIndex].text ; if ((s_find ==
"Choose State" | s_find == "") & c_find == "UNITED STATES") { msg = msg
+ "\nYour state." ; setColor(form.State, bgBad); form.State.focus(); }
else { setColor(form.State, bgGood); } if (p_find == "Choose Province" &
c_find == "CANADA") { msg = msg + "\nYour province." ;
setColor(form.Province, bgBad); form.Province.focus(); } else {
setColor(form.Province, bgGood); } if (trim(form.ZipCode.value, "both")
== "") { msg = msg+"\nYour zip/postal code." ; form.ZipCode.focus() ;
setColor(form.ZipCode, bgBad) ; } else { setColor(form.ZipCode, bgGood);
} if (trim(form.Email.value, "both") == "") { msg = msg+"\nYour Email."
; form.Email.focus() ; setColor(form.Email, bgBad) ; } else {
setColor(form.Email, bgGood); } if (msg != "") { alert("Please provide:
"+msg) ; return false ; } else { return true ; } } function
MM_swapImgRestore() { //v3.0 if (display_menus) { var
i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i
