var moopop={width:0,height:0,captureByRel:function(a,b){this.capture((b||document).getElements("a[rel*="+(a||"popup")+"]"))},capture:function(c,b,a){if($defined(b)&&$defined(a)){this.width=b;this.height=a}switch($type(c)){case"string":c=$$(c);case"element":case"array":$splat(c).each(this.add_pop_to,this)}this.width=null;this.height=null},add_pop_to:function(c){c.addEvent("click",function(d){d.stop();this.popup(c)}.bind(this));var b=c.get("rel").match(/\[(\d+),\s*(\d+)/)||["",this.width,this.height];var a=c.get("rel").match(/,(r)/)||[];if(b[1]){c.store("popupprops","top=0, left=0, scrollbars=yes, width="+b[1]+", height="+b[2]+(a[1]?", scrollbars=yes, resizable=yes":""))}},popup:function(a){window.open(a.get("href"),a.get("name")||"",a.retrieve("popupprops")||"")}};window.addEvent("domready",function(){moopop.captureByRel("popup")});var Mediabox;(function(){var au,aN,ae,am,af,aH,ao,aJ,aI,aK,ak,aw,aB,av=new Image(),Y=new Image(),aD=false,ay=false,ab,aT,aL,aS,Z,ap,ah,aa,X,aQ,aq,ad,an,ax,at,aG,aM="none",aP,aR="mediaBox",ar;window.addEvent("domready",function(){$(document.body).adopt($$([ab=new Element("div",{id:"mbOverlay"}).addEvent("click",ag),aT=new Element("div",{id:"mbCenter"})]).setStyle("display","none"));aL=new Element("div",{id:"mbImage"}).injectInside(aT);aS=new Element("div",{id:"mbBottom"}).injectInside(aT).adopt(new Element("a",{id:"mbCloseLink",href:"#"}).addEvent("click",ag),aQ=new Element("a",{id:"mbNextLink",href:"#"}).addEvent("click",aO),aa=new Element("a",{id:"mbPrevLink",href:"#"}).addEvent("click",aj),ap=new Element("div",{id:"mbTitle"}),X=new Element("div",{id:"mbNumber"}),ah=new Element("div",{id:"mbCaption"}));aw={overlay:new Fx.Tween(ab,{property:"opacity",duration:360}).set(0),image:new Fx.Tween(aL,{property:"opacity",duration:360,onComplete:al}),bottom:new Fx.Tween(aS,{property:"opacity",duration:240}).set(0)}});Mediabox={close:function(){ag()},open:function(a,b,c){au=$extend({loop:false,stopKey:true,overlayOpacity:0.6,resizeOpening:true,resizeDuration:240,resizeTransition:false,initialWidth:320,initialHeight:180,defaultWidth:640,defaultHeight:360,showCaption:true,showCounter:true,counterText:"({x} of {y})",imgBackground:false,imgPadding:70,scriptaccess:"true",fullscreen:"true",fullscreenNum:"1",autoplay:"true",autoplayNum:"1",autoplayYes:"yes",volume:"100",medialoop:"true",bgcolor:"#000000",wmode:"opaque",useNB:true,playerpath:"/js/NonverBlaster.swf",controlColor:"0xFFFFFF",controlBackColor:"0x000000",showTimecode:"false",JWplayerpath:"/js/player.swf",backcolor:"000000",frontcolor:"999999",lightcolor:"000000",screencolor:"000000",controlbar:"over",controller:"true",flInfo:"true",revverID:"187866",revverFullscreen:"true",revverBack:"000000",revverFront:"ffffff",revverGrad:"000000",usViewers:"true",ytBorder:"0",ytColor1:"000000",ytColor2:"333333",ytQuality:"&ap=%2526fmt%3D18",ytRel:"0",ytInfo:"1",ytSearch:"0",vuPlayer:"basic",vmTitle:"1",vmByline:"1",vmPortrait:"1",vmColor:"ffffff"},c||{});if((Browser.Engine.gecko)&&(Browser.Engine.version<19)){aD=true;au.overlayOpacity=1;ab.className="mbOverlayFF"}if(typeof a=="string"){a=[[a,b,c]];b=0}aN=a;au.loop=au.loop&&(aN.length>1);if((Browser.Engine.trident)&&(Browser.Engine.version<5)){ay=true;ab.className="mbOverlayIE";ab.setStyle("position","absolute");ai()}aE();aC(true);aH=window.getScrollTop()+(window.getHeight()/2);aJ=window.getScrollLeft()+(window.getWidth()/2);aw.resize=new Fx.Morph(aT,$extend({duration:au.resizeDuration,onComplete:ac},au.resizeTransition?{transition:au.resizeTransition}:{}));aT.setStyles({top:aH,left:aJ,width:au.initialWidth,height:au.initialHeight,marginTop:-(au.initialHeight/2),marginLeft:-(au.initialWidth/2),display:""});aw.overlay.start(au.overlayOpacity);return aU(b)}};Element.implement({mediabox:function(b,a){$$(this).mediabox(b,a);return this}});Elements.implement({mediabox:function(d,b,a){b=b||function(e){ax=e.rel.split(/[\[\]]/);ax=ax[1];return[e.href,e.title,ax]};a=a||function(){return true};var c=this;c.addEvent("contextmenu",function(e){if(this.toString().match(/\.gif|\.jpg|\.png/i)){e.stop()}});c.removeEvents("click").addEvent("click",function(){var f=c.filter(a,this);var e=[];var g=[];f.each(function(h,i){if(g.indexOf(h.toString())<0){e.include(f[i]);g.include(f[i].toString())}});return Mediabox.open(e.map(b),g.indexOf(this.toString()),d)});return c}});function ai(){ab.setStyles({top:window.getScrollTop(),left:window.getScrollLeft()})}function aE(){aK=window.getWidth();ak=window.getHeight();ab.setStyles({width:aK,height:ak})}function aC(b){["object",window.ie?"select":"embed"].forEach(function(c){Array.forEach(document.getElementsByTagName(c),function(d){if(b){d._mediabox=d.style.visibility}d.style.visibility=b?"hidden":d._mediabox})});ab.style.display=b?"":"none";var a=b?"addEvent":"removeEvent";if(ay){window[a]("scroll",ai)}window[a]("resize",aE);document[a]("keydown",aA)}function aA(a){switch(a.code){case 27:case 88:case 67:ag();break;case 37:case 80:aj();break;case 39:case 78:aO()}if(au.stopKey){return false}}function aj(){return aU(am)}function aO(){return aU(af)}function aU(a){if(a>=0){aL.set("html","");ae=a;am=((ae||!au.loop)?ae:aN.length)-1;af=ae+1;if(af==aN.length){af=au.loop?0:-1}az();aT.className="mbLoading";if(!aN[a][2]){aN[a][2]=""}ad=aN[a][2].split(" ");an=ad.length;if(an>1){at=(ad[an-2].match("%"))?(window.getWidth()*((ad[an-2].replace("%",""))*0.01))+"px":ad[an-2]+"px";aG=(ad[an-1].match("%"))?(window.getHeight()*((ad[an-1].replace("%",""))*0.01))+"px":ad[an-1]+"px"}else{at="";aG=""}aq=aN[a][0];aq=encodeURI(aq).replace("(","%28").replace(")","%29");Z=aN[ae][1].split("::");if(aq.match(/quietube\.com/i)){aP=aq.split("v.php/");aq=aP[1]}else{if(aq.match(/\/\/yfrog/i)){aM=(aq.substring(aq.length-1));if(aM.match(/b|g|j|p|t/i)){aM="image"}if(aM=="s"){aM="flash"}if(aM.match(/f|z/i)){aM="video"}aq=aq+":iphone"}}if(aq.match(/\.gif|\.jpg|\.png|twitpic\.com/i)||aM=="image"){aM="img";aq=aq.replace(/twitpic\.com/i,"twitpic.com/show/full");aB=new Image();aB.onload=aF;aB.src=aq}else{if(aq.match(/\.flv|\.mp4/i)||aM=="video"){aM="obj";at=at||au.defaultWidth;aG=aG||au.defaultHeight;if(au.useNB){aB=new Swiff(""+au.playerpath+"?mediaURL="+aq+"&allowSmoothing=true&autoPlay="+au.autoplay+"&buffer=6&showTimecode="+au.showTimecode+"&loop="+au.medialoop+"&controlColor="+au.controlColor+"&controlBackColor="+au.controlBackColor+"&defaultVolume="+au.volume+"&scaleIfFullScreen=true&showScalingButton=true&crop=false",{id:"MediaboxSWF",width:at,height:aG,params:{wmode:au.wmode,bgcolor:au.bgcolor,allowscriptaccess:au.scriptaccess,allowfullscreen:au.fullscreen}})}else{aB=new Swiff(""+au.JWplayerpath+"?file="+aq+"&backcolor="+au.backcolor+"&frontcolor="+au.frontcolor+"&lightcolor="+au.lightcolor+"&screencolor="+au.screencolor+"&autostart="+au.autoplay+"&controlbar="+au.controlbar,{id:"MediaboxSWF",width:at,height:aG,params:{wmode:au.wmode,bgcolor:au.bgcolor,allowscriptaccess:au.scriptaccess,allowfullscreen:au.fullscreen}})}aF()}else{if(aq.match(/\.mp3|\.aac|tweetmic\.com|tmic\.fm/i)||aM=="audio"){aM="obj";at=at||au.defaultWidth;aG=aG||"20px";if(aq.match(/tweetmic\.com|tmic\.fm/i)){aq=aq.split("/");aq[4]=aq[4]||aq[3];aq="http://media4.fjarnet.net/tweet/tweetmicapp-"+aq[4]+".mp3"}if(au.useNB){aB=new Swiff(""+au.playerpath+"?mediaURL="+aq+"&allowSmoothing=true&autoPlay="+au.autoplay+"&buffer=6&showTimecode="+au.showTimecode+"&loop="+au.medialoop+"&controlColor="+au.controlColor+"&controlBackColor="+au.controlBackColor+"&defaultVolume="+au.volume+"&scaleIfFullScreen=true&showScalingButton=true&crop=false",{id:"MediaboxSWF",width:at,height:aG,params:{wmode:au.wmode,bgcolor:au.bgcolor,allowscriptaccess:au.scriptaccess,allowfullscreen:au.fullscreen}})}else{aB=new Swiff(""+au.JWplayerpath+"?file="+aq+"&backcolor="+au.backcolor+"&frontcolor="+au.frontcolor+"&lightcolor="+au.lightcolor+"&screencolor="+au.screencolor+"&autostart="+au.autoplay,{id:"MediaboxSWF",width:at,height:aG,params:{wmode:au.wmode,bgcolor:au.bgcolor,allowscriptaccess:au.scriptaccess,allowfullscreen:au.fullscreen}})}aF()}else{if(aq.match(/\.swf/i)||aM=="flash"){aM="obj";at=at||au.defaultWidth;aG=aG||au.defaultHeight;aB=new Swiff(aq,{id:"MediaboxSWF",width:at,height:aG,params:{wmode:au.wmode,bgcolor:au.bgcolor,allowscriptaccess:au.scriptaccess,allowfullscreen:au.fullscreen}});aF()}else{if(aq.match(/\.mov|\.m4v|\.m4a|\.aiff|\.avi|\.caf|\.dv|\.mid|\.m3u|\.mp3|\.mp2|\.mp4|\.qtz/i)||aM=="qt"){aM="qt";at=at||au.defaultWidth;aG=(parseInt(aG)+16)+"px"||au.defaultHeight;aB=new Quickie(aq,{id:"MediaboxQT",width:at,height:aG,container:"mbImage",attributes:{controller:au.controller,autoplay:au.autoplay,volume:au.volume,loop:au.medialoop,bgcolor:au.bgcolor}});aF()}else{if(aq.match(/\#mb_/i)){aM="inline";at=at||au.defaultWidth;aG=aG||au.defaultHeight;URLsplit=aq.split("#");aB=$(URLsplit[1]).get("html");aF()}else{au.showCaption=false;au.showCounter=false;aM="url";at=at||au.defaultWidth;aG=aG||au.defaultHeight;aR="mediaId_"+new Date().getTime();aB=new Element("iframe",{src:aq,id:aR,width:at,height:aG,frameborder:0});aF()}}}}}}}return false}function aF(){if(aM=="img"){at=aB.width;aG=aB.height;if(au.imgBackground){aL.setStyles({backgroundImage:"url("+aq+")",display:""})}else{if(aG>=ak-au.imgPadding&&(aG/ak)>=(at/aK)){aG=ak-au.imgPadding;at=aB.width=parseInt((aG/aB.height)*at);aB.height=aG}else{if(at>=aK-au.imgPadding&&(aG/ak)<(at/aK)){at=aK-au.imgPadding;aG=aB.height=parseInt((at/aB.width)*aG);aB.width=at}}if(Browser.Engine.trident){aB=$(aB)}aB.addEvent("mousedown",function(a){a.stop()}).addEvent("contextmenu",function(a){a.stop()});aL.setStyles({backgroundImage:"none",display:""});aB.inject(aL)}}else{if(aM=="obj"){if(Browser.Plugins.Flash.version<8){aL.setStyles({backgroundImage:"none",display:""});aL.set("html",'<div id="mbError"><b>Error</b><br/>Adobe Flash is either not installed or not up to date, please visit <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" title="Get Flash" target="_new">Adobe.com</a> to download the free player.</div>');at=au.DefaultWidth;aG=au.DefaultHeight}else{aL.setStyles({backgroundImage:"none",display:""});aB.inject(aL)}}else{if(aM=="qt"){aL.setStyles({backgroundImage:"none",display:""});aB}else{if(aM=="inline"){aL.setStyles({backgroundImage:"none",display:""});aL.set("html",aB)}else{if(aM=="url"){aL.setStyles({backgroundImage:"none",display:""});aB.inject(aL)}else{aL.setStyles({backgroundImage:"none",display:""});aL.set("html",'<div id="mbError"><b>Error</b><br/>A file type error has occoured, please visit <a href="iaian7.com/webcode/mediaboxAdvanced" title="mediaboxAdvanced" target="_new">iaian7.com</a> or contact the website author for more information.</div>');at=au.defaultWidth;aG=au.defaultHeight}}}}}aL.setStyles({width:at,height:aG});ap.set("html",(au.showCaption)?Z[0]:"");ah.set("html",(au.showCaption&&(Z.length>1))?Z[1]:"");X.set("html",(au.showCounter&&(aN.length>1))?au.counterText.replace(/{x}/,ae+1).replace(/{y}/,aN.length):"");if((am>=0)&&(aN[am][0].match(/\.gif|\.jpg|\.png|twitpic\.com/i))){av.src=aN[am][0].replace(/twitpic\.com/i,"twitpic.com/show/full")}if((af>=0)&&(aN[af][0].match(/\.gif|\.jpg|\.png|twitpic\.com/i))){Y.src=aN[af][0].replace(/twitpic\.com/i,"twitpic.com/show/full")}at=aL.offsetWidth;aG=aL.offsetHeight+aS.offsetHeight;if(aG>=aH+aH-10){ao=-(aH-10)}else{ao=-(aG/2)}if(at>=aJ+aJ-10){aI=-(aJ-10)}else{aI=-(at/2)}if(au.resizeOpening){aw.resize.start({width:at,height:aG,marginTop:ao,marginLeft:aI})}else{aT.setStyles({width:at,height:aG,marginTop:ao,marginLeft:aI});ac()}}function ac(){aw.image.start(1)}function al(){aT.className="";if(aM!="url"){if(am>=0){aa.style.display=""}if(af>=0){aQ.style.display=""}}else{aa.style.display="none";aQ.style.display="none"}aw.bottom.start(1)}function az(){if(aB){aB.onload=$empty}aw.resize.cancel();aw.image.cancel().set(0);aw.bottom.cancel().set(0);$$(aa,aQ).setStyle("display","none")}function ag(){if(ae>=0){aB.onload=$empty;aL.set("html","");for(var a in aw){aw[a].cancel()}aT.setStyle("display","none");aw.overlay.chain(aC).start(0)}return false}})();Mediabox.scanPage=function(){var b=$$("a").filter(function(a){return a.rel&&a.rel.test(/^lightbox/i)});$$(b).mediabox({},null,function(f){var a=this.rel.replace(/[[]|]/gi," ");var e=a.split(" ");return(this==f)||((this.rel.length>8)&&f.rel.match(e[1]))})};window.addEvent("domready",Mediabox.scanPage);var p=window.location.pathname.split("/");if(p[p.length-1].substr(-1)!=="/"){p[p.length-1]=""}var relative_path_spanish=p.join("/");var relative_path=p.join("/");var relative_path=relative_path.replace("sp/","");var relative_path=relative_path.replace("fall-protection-blog/","");function validateLogin(a){if(!checkEmail(a.Login_Email)){alert("Enter a valid email address to login.");a.Login_Email.focus();return false}else{if(a.Login_Password.value===""){alert("Enter your password to login.");a.Login_Password.focus();return false}else{return true}}}function validateForgottenPassword(a){if(!checkEmail(a.Email)){alert("Please enter your valid email address.");a.Email.focus();return false}else{return true}}function validateRegistration(a){if(!checkEmail(a.Email)){alert("Please enter a valid email address.");a.Email.focus();return false}else{if(a.FirstName.value===""){alert("Please enter your first name.");a.FirstName.focus();return false}else{if(a.LastName.value===""){alert("Please enter your last name.");a.LastName.focus();return false}else{if(a.Company.value===""){alert("Please enter the name of your company.");a.Company.focus();return false}else{if(a.Phone.value===""){alert("Please enter your phone number.");a.Phone.focus();return false}else{if(a.Category.value===""){alert("Please select a category.");a.Category.focus();return false}else{return true}}}}}}}function executeSubmitForm(){var a=$$("div.content_wrapper form.ContentForm,div.content_wrapper_sidebar form.ContentForm");if(a.length){a.each(function(c,b){c.removeEvents("submit");$(c.id).addEvent("submit",function(e){if(validateForm(c.id)){if($("FormLang")&&$("FormLang").value=="sp"){var f=relative_path_spanish}else{var f=relative_path}var d=new Request({method:"post",url:f+"ajax_processing.cfm",evalScripts:true,onRequest:function(){$("submitBtn").addClass("hide");$("submitWait").removeClass("hide");$(c.id+"_Form").tween("opacity","0.3")},onSuccess:function(h){if(h.indexOf("There was an error")>-1){if($("form_response")){$("form_response").destroy()}var i=new Element("div");i.set("id","form_response");i.set("html",h);i.inject($(c.id+"_Wrapper"),"top");$("submitBtn").removeClass("hide");$("submitWait").addClass("hide");$(c.id+"_Form").tween("opacity","1");var g=new Fx.Scroll(window).toElement("form_response")}else{$(c.id+"_Wrapper").set("html",h);var g=new Fx.Scroll(window).toElement(c.id+"_Wrapper")}},onFailure:function(){alert("Something went wrong... we couldn't submit this form. Please try again.");$("submitBtn").removeClass("hide");$("submitWait").addClass("hide");$(c.id+"_Form").tween("opacity","1")}}).send({data:$(c.id)});e.stop()}})})}}function validateForm(a){if($$(".required")){var d=0;var b=1;var f=$$("div.content_wrapper form#"+a+" .required");if(f.length){for(d=0;d<f.length;d++){if(f[d].id.split("_")[0]=="mmmultiple"){var g=false;var e=f[d].id.split("_")[1];for(var c=0;c<e;c++){if($(f[d].name+"_"+c).checked==true){g=true;break}}if(!g){alert("The "+f[d].name.replace(/_/g," ")+" field is a required field.");$(f[d].name+"_0").focus();b=0;break}}else{if(f[d].getProperty("min")!=null&&f[d].value.length<parseInt(f[d].getProperty("min"))){alert("The "+f[d].id.replace("_"," ")+" field is a requires at least a "+f[d].getProperty("min")+" character minimum.");f[d].focus();b=0;break}else{if(f[d].value==""||f[d].value==f[d].name||(f[d].name.toLowerCase().indexOf("email",0)!=-1&&!checkEmail(f[d]))){alert("The "+f[d].id.replace("_"," ")+" field is a required field.");f[d].focus();b=0;break}}}}}}else{b=0}if(b){b=checkECommerce()}return b}function checkECommerce(){var a=1;if($("BillingFirstName")){if(!checkNumeric($("DollarAmount"))){alert("Please enter the numeric dollar amount without the '$' or ','");$("DollarAmount").value="";$("DollarAmount").focus();a=0}else{if($("DollarAmount_Min")&&$("DollarAmount").value<$("DollarAmount_Min").value){alert("The minimum amount allowed is $"+$("DollarAmount_Min").value);$("DollarAmount").focus();a=0}}}return a}function checkEmail(a){if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(a.value))){return false}else{return true}}function checkNumeric(a){if(!(/^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$/.test(a.value.trim()))){return false}else{return true}}String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"")};function initialize(){executeSubmitForm();updateEcommerceTotal();if($("DollarAmount")&&$("Quantity")&&$("EcommerceTotal")){$("EcommerceTotal").set("html","$"+($("DollarAmount").value*$("Quantity").value).toFixed(2))}}function checkMax(b,a){if(b.get("max")==0){return true}else{return b.get("value").length<=b.get("max")}}function validateSendToAFriend(){$("SendToAFriendForm").removeEvents("submit");$("SendToAFriendForm").addEvent("submit",function(b){if($("Name").value==""){alert("Please enter your name.");$("Name").focus()}else{if(!checkEmail($("Email"))){alert("Please enter your valid email address.");$("Email").focus()}else{if($("FriendName").value==""){alert("Please enter your friend's name.");$("FriendName").focus()}else{if(!checkEmail($("FriendEmail"))){alert("Please enter your friend's valid email address.");$("FriendEmail").focus()}else{if($("TheField").value==""){var a=new Request({method:"post",url:relative_path+"ajax_processing.cfm",onRequest:function(){$("ContentForm_Form").morph({height:$("ContentForm_Response").getSize().y});$("ContentForm_Form").tween("opacity","0");$("ContentForm_Loading").tween("opacity","1")},onComplete:function(){$("ContentForm_Loading").morph({height:0});$("ContentForm_Loading").tween("opacity","0");$("ContentForm_Response").tween("opacity","1");Initialize()}}).send({data:$("SendToAFriendForm")})}}}}}b.stop()})}function updateEcommerceTotal(){if($("DollarAmount")&&$("Quantity")&&$("EcommerceTotal")){$("DollarAmount").removeEvents("change");$("Quantity").removeEvents("change");$("DollarAmount").addEvent("change",function(a){$("EcommerceTotal").set("html","$"+($("DollarAmount").value*$("Quantity").value).toFixed(2));a.stop()});$("Quantity").addEvent("change",function(a){$("EcommerceTotal").set("html","$"+($("DollarAmount").value*$("Quantity").value).toFixed(2));a.stop()})}}var FeaturedProducts=new Class({initialize:function(){this.pos=0;this.products=$$("#home_feature .product");this.total=this.products.length;$("pos").set("text",(this.pos+1)+" OF "+this.total);$("prev").addEvent("click",function(a){this.fadeProductOut("prev");a.stop()}.bind(this));$("next").addEvent("click",function(a){this.fadeProductOut("next");a.stop()}.bind(this))},fadeProductOut:function(b){$("prev").removeEvents("click");$("next").removeEvents("click");var a=new Fx.Tween(this.products[this.pos],{onComplete:function(){this.products[this.pos].setStyle("display","none");this.updatePos(b)}.bind(this)}).start("opacity",0)},updatePos:function(a){if(a=="prev"){(this.pos==0)?this.pos=this.total-1:this.pos--}else{(this.pos==(this.total-1))?this.pos=0:this.pos++}$("pos").set("text",(this.pos+1)+" OF "+this.total);this.fadeProductIn()},fadeProductIn:function(){this.products[this.pos].setStyles({display:"block",opacity:0});var a=new Fx.Tween(this.products[this.pos],{onComplete:function(){$("prev").addEvent("click",function(b){this.fadeProductOut("prev");b.stop()}.bind(this));$("next").addEvent("click",function(b){this.fadeProductOut("next");b.stop()}.bind(this))}.bind(this)}).start("opacity",1)}});var InputClearAndReplace=new Class({options:{InputElement:".clear_replace"},initialize:function(){var b=$$(this.options.InputElement);var a=new Array();b.each(function(d,c){a.push(b[c].value);d.onfocus=function(){if(this.value==a[c]){this.value=""}},d.onblur=function(){if(this.value==""){this.value=a[c]}}})}});function ie6NavFix(){var a=$$("#nav li");for(var b=0;b<a.length;b++){if(a[b].getChildren("div").length>0){a[b].addEvent("mouseenter",function(){this.getChildren("div")[0].setStyle("display","block")});a[b].addEvent("mouseleave",function(){this.getChildren("div")[0].setStyle("display","none")})}}}function ValidateBlogComment(){if($("Name").value==""||$("Name").value=="Name"){alert("Please enter your name.");$("Name").focus();return false}else{if(!checkEmail(document.BlogCommentForm.Email)){alert("Please enter your valid email address.");$("Email").focus();return false}else{if($("Comment").value==""||$("Comment").value=="Comment"){alert("Please enter a comment.");$("Comment").focus();return false}else{if($("THP").value==""){var b=new Fx.Tween($("BlogCommentForm"),{duration:"500",link:"chain"});if($("comment_form")){b.start("opacity","1","1")}var a=new Fx.Tween($("comment_processing"),{duration:"500",link:"chain"});if($("comment_processing")){a.start("opacity","0","0")}var c=new Fx.Tween($("comment_complete"),{duration:"500",link:"chain"});if($("comment_complete")){c.start("opacity","0","0")}new Request({method:"post",url:relative_path+"AJAX_processing.cfm?AJAXRequest=blog_comment",link:"cancel",onRequest:function(){b.start("opacity","1","0");b.start("display","block","none");a.start("opacity","0","1")},onFailure:function(){a.start("opacity","1","0");$("comment_complete").set("html","<p>There was an error processing your comment.<br /><br />Please try again.</p>");c.start("opacity","0","1");$("Name").value="Name";$("Email").value="Email (Will Not Display)";$("Link").value="Website";$("Comment").value="Comment"},onSuccess:function(){a.start("opacity","1","0");$("comment_complete").set("html","<p>Comment submitted successfully!<br /><br />Your comment will appear pending approval.</p>");c.start("opacity","0","1");$("Name").value="Name";$("Email").value="Email (Will Not Display)";$("Link").value="Website";$("Comment").value="Comment"}}).send($("BlogCommentForm"));return false}}}}}function ValidateSearch(){$$("#blog_search").removeEvents("submit");$$("#portal_search").removeEvents("submit");$$("#blog_search, #portal_search").each(function(b,a){$(b.id).addEvent("submit",function(c){var d=$$("#"+b.id+" input.keywords")[0];if(d.value==""||d.value==d.title){alert("Please enter your search terms.");d.focus()}else{$(b.id).submit()}c.stop()})})}function fetchSalesContacts(f){var b=f.substring(0,f.lastIndexOf("_"));if(b.indexOf("_")!=-1){b=b.substr(0,b.indexOf("_"))+" "+b.substr(b.indexOf("_")+1)}var g=f.lastIndexOf("_");var c=f.substring(0,g);var a=c.replace("_"," ");var e="/locate-a-sales-rep.html - "+a;_gaq.push(["_setAccount","UA-17316964-1"]);_gaq.push(["_trackPageview",e]);var d=new Request.HTML({url:relative_path+"map.html&AjaxRequest=true&State="+b,method:"get",evalScripts:true,update:"content-text",}).send()}function setCharAt(c,a,b){if(a>c.length-1){return c}return c.substr(0,a)+b+c.substr(a+1)}window.addEvent("domready",function(){initialize();if(Browser.Engine.trident4){ie6NavFix()}var d=new InputClearAndReplace();if($("home_feature")){var c=new FeaturedProducts()}if($("login_wrap")&&$("toggle_login")){$("login_wrap").setStyle("height","auto");var e=new Fx.Slide("login_wrap").hide();$("toggle_login").addEvent("click",function(h){e.toggle();h.stop();var g=$("login_arrow").get("src");if(g=="images/icon_arrow_white_down.gif"){$("login_arrow").set("src","images/icon_arrow_white_up.gif")}else{$("login_arrow").set("src","images/icon_arrow_white_down.gif")}})}if($("SendToAFriendForm")){validateSendToAFriend()}if($("blog_search")||$("portal_search")){ValidateSearch()}if($("sales_map")){var a={};var f={};f.wmode="transparent";f.menu="false";f.allowscriptaccess="always";var b={};swfobject.embedSWF(relative_path+"flash/map.swf","sales_map","716","700","9.0.0",relative_path+"expressInstall_PW.fla",a,f,b)}if($("home_flash")){var a={};var f={};f.wmode="transparent";f.menu="false";f.allowscriptaccess="always";var b={};swfobject.embedSWF(relative_path+"flash/intro.swf","flash_intro","485","250","9.0.0",relative_path+"expressInstall_PW.fla",a,f,b)}if($("rep_select")){$("rep_select").addEvent("change",function(g){g.stop();fetchSalesContacts($("rep_select").value)})}});
