function popupWindow(F,C,B,E,A){var D=(screen.width-B)/2;var G=(screen.height-E)/2;winprops="height="+E+",width="+B+",top="+G+",left="+D+",scrollbars="+A+",resizable";win=window.open(F,C,winprops);if(parseInt(navigator.appVersion)>=4){win.window.focus()}}function popUp(A,B){id=new Date();window_name=id.getTime();var C=window.open(A,window_name,B)}function LC_SelectLink(){var B=document.all("LC_LinkKey").value;var A="/cftags/linkCreator/index.cfm?mode=input&linkKey="+B;popupWindow(A,"winGetLinks",700,350,1)}function onmouseStatus(A){window.status=A}function BIGPopup(E,C,B,D,A){popupWindow(E,C,B,D,A)}function popupHelp(E,C,B,D,A){popupWindow(E,C,B,D,A)}function popupPicker(E,C,B,D,A){popupWindow(E,C,B,D,A)}function LC_Popup(E,C,B,D,A){popupWindow(E,C,B,D,A)}function popupC(E,C,B,D,A){popupWindow(E,C,B,D,A)}function conjPopup(A,B){popUp(A,B)}function imagePreview(){xOffset=120;yOffset=50;$("a.preview").hover(function(A){this.t=this.title;this.title="";var B=(this.t!="")?"<br/>"+this.t:"";$("body").append("<p id='preview'><img src='"+this.rel+"' alt='"+this.title+"' />"+B+"</p>");$("#preview").css("top",(A.pageY-xOffset)+"px").css("left",(A.pageX+yOffset)+"px").fadeIn("fast")},function(){this.title=this.t;$("#preview").remove()});$("a.preview").mousemove(function(A){$("#preview").css("top",(A.pageY-xOffset)+"px").css("left",(A.pageX+yOffset)+"px")})}function openForgottenPasswordBox(A){$("#PasswordSubmitBox").dialog({autoOpen:true,modal:true,width:500,height:200,draggable:false,resizable:false,bgiframe:true,title:A,overlay:{backgroundColor:"#000",opacity:0.5}});$("#PasswordSubmitBox").dialog("open")}function hideSortByBox(){if($("#singleProducTypeSortBy").length>0){$("#singleProducTypeSortBy").hide()}}function showSortByBox(){if($("#singleProducTypeSortBy").length>0){$("#singleProducTypeSortBy").show()}}(function(A){A.fn.watermark=function(){inputVals=new Array();A(this).each(function(B){inputVals[B]=A(this).val()});return this.each(function(D){var B=A(this);var C=inputVals[D];A(B).focus(function(){if(B.val()==inputVals[D]){A(B).val("")}A(this).addClass("focus")});A(B).blur(function(){if(A(B).val()==""){A(B).val(C);A(B).removeClass("validText")}else{A(B).addClass("validText")}A(this).removeClass("focus")})})}})(jQuery);$(document).ready(function(){var I=$("#strChange").attr("data-defaultText");$("#strChange").val("0");$("#strChange").sSelect({defaultText:I});if($("#searchProductType")!=null){$("#searchProductType").val("0");$("#searchProductType").sSelect({defaultText:I,ddMaxHeight:1000})}$("html").removeClass("no-js");$("a[href=#top]").click(function(){$("html, body").animate({scrollTop:0},"slow");return false});$(".in-text").watermark();function E(){$(".focus").removeClass("focus")}function D(){$(".newList").hide()}$(document).bind("click focus",function(K){var J=$(K.target);if(!J.parents().hasClass("search")&&J.parent("#region")){$(".newListSelected ul").hide();$(".search").removeClass("focus");$("#region-changer").removeClass("shadow-5").removeClass("focus");$("#region-changer-block").hide();$("#change-region").slideUp(200)}});$(".in-text").bind({click:function(){E();D();$(this).addClass("focus").parents(".search").addClass("focus")},focus:function(){E();D();$(this).addClass("focus").parents(".search").addClass("focus")}});$(".selectedTxt").bind({click:function(J){E();$(this).parents(".search").addClass("focus")},focus:function(J){E();$(this).parents(".search").addClass("focus")}});$(".in-submit").hover(function(){$(this).toggleClass("hover")});function G(){var J=$(this).find(".sub");J.stop().fadeTo("fast",1).show();(function(K){jQuery.fn.calcSubWidth=function(){rowWidth=0;K(this).find("ul").each(function(){rowWidth+=K(this).outerWidth()})}})(jQuery);$(this).calcSubWidth();J.css("width",rowWidth)}function A(){var J=$(this).find("ul").length;if(J>0){$(this).find(".nav-fire").addClass("hover").end().find("ul").show()}}function H(){$(this).find(".nav-fire").removeClass("hover").end().find("ul").hide()}function F(){$(this).find(".sub").stop().fadeTo("fast",0,function(){$(this).hide()})}var B={sensitivity:2,interval:100,over:G,timeout:500,out:F};var C={sensitivity:2,interval:100,over:A,timeout:500,out:H};$("#mainNavigation .sub").css({opacity:"0"});$("ul#mainNavigation > li").hoverIntent(B);$("#nav > li").hoverIntent(C);$(".slideToggleThis").hide();$("#browseNav a").click(function(){$("#browseNav a").removeClass("active");$(this).addClass("active");$(".tab").hide();var J=$(this).find("a").attr("href");$(J).slideToggle();return false});$("#region-changer").click(function(){if($(this).hasClass("focus")){$(this).removeClass("shadow-5").removeClass("focus");$("#region-changer-block").toggle();$("#change-region").slideToggle(200)}else{$(this).addClass("shadow-5").addClass("focus");$("#region-changer-block").toggle();$("#change-region").slideToggle(200)}return false});$("#change-region a").bind("click",bindCountryClick);$("#alert-close").click(function(){$("#alert").slideUp(200,function(){$("#call-for-help strong").removeClass("red").addClass("dark-blue")});return false})});function bindCountryClick(){var D=$("#change-region .selected");var B=$("#change-region .selected").text();var A=$("#change-region .selected").attr("id");var C=$(this).text();if(C!=""){changeCountry($(this).parent("li").attr("id"),$("#reloadAfterChange").text());$("#change-region .selected").text("").append('<a href="'+A+'">'+B+"</a>").removeClass("selected");$("#region-changer").html(C+"<span></span>");$(this).parent().text(C).addClass("selected");$("#"+A+" a").bind("click",bindCountryClick)}return false}function suggestBox_init(){aj_ssr="/assets/aj/suggest/suggestAjax.cfc";setSearchTermsBox(undefined);cc=-1;oeSST="";reqId=0;cto=750;iaorq=0;aorq=[]}function setSearchTermsBox(A){if(A==undefined){eSB=document.getElementById("suggestBox");eSST=document.getElementById("searchfieldtop");eBS=document.getElementById("btnSearch");eSF=document.getElementById("suggestFrame");eSuggestBoxOffsetLeft=eSST.getAttribute("data-leftOffset");eSuggestBoxOffsetTop=eSST.getAttribute("data-topOffset")}else{eSB=document.getElementById("suggestBoxHome");eSST=document.getElementById("searchfield");eBS=document.getElementById("btnSearchHome");eSF=document.getElementById("suggestFrameHome");eSuggestBoxOffsetLeft=eSST.getAttribute("data-leftOffset");eSuggestBoxOffsetTop=eSST.getAttribute("data-topOffset")}}function aST(A,B){setSearchTermsBox(B);if(A!=27&&A!=37&&A!=39&&A!=38&&A!=40&&A!=13){if(eSST.value.length>0){caorq()}else{clearSuggestionDropdown()}}else{if(eSB.childNodes.length){if(A==38){if(navigator.appName!="Microsoft Internet Explorer"){eSST.setSelectionRange(eSST.value.length,eSST.value.length)}}else{if(A==13){clearSuggestionDropdown()}}}}}function caorq(){var C=eSST.value;var B=-1;if(reqId){clearTimeout(reqId);reqId=0}if(iaorq){for(var A=0;A<iaorq;A++){if(aorq[A].eSST==C){B=A;break}}}if(B<0){reqId=setTimeout("aRQ ();",cto)}else{piaorq(B)}}function aRQ(){reqId=0;$.AjaxCFC({useDefaultErrorHandler:false,type:"GET",url:aj_ssr,method:"gs",data:{sst:eSST.value},dataType:"html",success:function(A){hgs(A)}})}function udmct(A,B){setSearchTermsBox(B);if(A==40){selectNext(eSF.id,eSST.id)}if(A==38){selectPrevious(eSF.id,eSST.id)}}function selectNext(B,A){if($("#"+B+" ul li").length>0){if($("#"+B+" .hiLite").length>0){if($("#"+B+" ul li.hiLite").text()!=$("#"+B+" ul li").last().text()){$("#"+B+" ul li.hiLite").removeClass("hiLite").next().addClass("hiLite")}}else{$("#"+B+" ul li").first().addClass("hiLite")}$("#"+A).val($("#"+B+" ul li.hiLite a").text())}}function selectPrevious(B,A){if($("#"+B+" ul li").length>0){if($("#"+B+" .hiLite").length>0){if($("#"+B+" ul li.hiLite").text()!=$("#"+B+" ul li").first().text()){$("#"+B+" ul li.hiLite").removeClass("hiLite").prev().addClass("hiLite")}}else{$("#"+B+" ul li").last().addClass("hiLite")}$("#"+A).val($("#"+B+" ul li.hiLite a").text())}}function piaorq(C){var D=aorq[C].d;var B=aorq[C].l;var E,A;clearSuggestionDropdown();if((B>1)||((B==1)&&(eSST.value!=D[0]))){$("#"+eSF.id).html(generateSuggestionsHtml(D));eSST.onblur=function(){clearSuggestionDropdown()}}}function hgs(D){var E=D;var F=(E.S);var G,A;var B=[];var C=[];clearSuggestionDropdown();if((F.recordcount>1)||((F.recordcount==1)&&(eSST.value!=F.data.stn[0]))){$("#"+eSF.id).html(generateSuggestionsHtml(F.data.stn));eSST.onblur=function(){$("#"+eSF.id).hide()};if($("#"+eSST.id).hasClass("focus")){$("#"+eSF.id).show()}else{$("#"+eSF.id).hide()}siaorq(E.sst,B,F.recordcount)}else{if((F.recordcount==1)&&(eSST.value==F.data.stn[0])){B[0]=F.data.stn[0];siaorq(E.sst,B,1)}else{siaorq(E.sst,"",0)}}}function generateSuggestionsHtml(C){var B="<ul>";for(var A=0;A<C.length;A++){B+='<li><a href="#" onmousedown="populateName(this);">'+C[A]+"</a></li>"}B+="</ul>";return B}function siaorq(C,D,A){var B=[];B.eSST=C;B.d=D;B.l=A;aorq[iaorq]=B;iaorq++}function populateName(A){eSST.value=A.firstChild.nodeValue;if(reqId){clearTimeout(reqId);reqId=0}aRQ();clearSuggestionDropdown();eSST.focus()}function clearSuggestionDropdown(){$("#"+eSF.id).html("");$("#"+eSF.id).hide()};
