var _urlSearch="search.do";var _urlCategorySearch="search_category.do";var _urlSubCategorySearch="search_subCategory.do";var _urlModifyHistory="modify_history.do";var _urlModifyHistoryTopCat="modify_history_top_category.do";var _urlCompare="compare.do";var _urlUpdate="update_prefs.do";var _historyParam="jmdvs9rg|other|page~GRID^freeText~teakoil^prodPage~15^user_att_name0~UserType^user_att_value0~NewUser";var _page="GRID"; function performSearch(){var url=_urlSearch;for(var n=0;n0)window.location.href=appendHistory(url+params,false);else alert("Please select a product to compare")} function performSort(sortField){performSearch("sort_field", sortField, "refine", "1"); } function goToResults(){var url=appendHistory(_urlSearch+"?",true);window.location.href=url}function buildCompareParams(){var compares=document.results.compareCheck;var params="";if(compares!=null&&compares.length>0){params="(";for(var n=0;n1)params+="|";params+="'"+compares[n].value+"'"}params+=")"}if(params.length<=2)return"";else return params} function switchStyle(tableItm,buttonItm,sumItm){if(tableItm.style.display==""){tableItm.style.display="none";buttonItm.src="images/arrow_down.gif";if(sumItm!=null)sumItm.style.display=""}else{tableItm.style.display="";buttonItm.src="images/arrow_up.gif";if(sumItm!=null)sumItm.style.display="none"}} function switchStyleByLink(tableItm,linkItm,sumItm){if(tableItm.style.display==""){tableItm.style.display="none";linkItm.style.display="";if(sumItm!=null)sumItm.style.display=""}else{tableItm.style.display="";linkItm.style.display="none";if(sumItm!=null)sumItm.style.display="none"}} function switchRefinementStyleByLink(itmBaseName,expandLinkItm,colapseLinkItm,startIdx,endIdx){if("undefined"!=startIdx&&"undefined"!=endIdx)for(i=startIdx;i=0){var elem=form.elements[j]; if(elem.type=="select-one"&&(elem.name=="adduom0"||elem.name=="addpnum0"))elem.selectedIndex=0}}} function clearHistoryCookie(){var exdate=new Date;document.cookie="searchHist=; path=/; expires="+exdate.toGMTString()}; function onHelp(elementId, parent){ clearhidehelp(); if(document.getElementById(elementId)){ var popup = document.getElementById(elementId); var eventX = getHelpX(parent); var eventY = getHelpY(parent); popup.style.left = eventX - 200; popup.style.top = eventY + 45; Effect.Appear(elementId); } else { //alert("Element: "+ elementId +" not found in existing document"); } } function onPriceMatchHelp(elementId, parent){ clearhidehelp(); if(document.getElementById(elementId)){ var popup = document.getElementById(elementId); var eventX = getHelpX(parent); var eventY = getHelpY(parent); popup.style.left = eventX - 10; popup.style.top = eventY + 20; Effect.Appear(elementId); } else { //alert("Element: "+ elementId +" not found in existing document"); } } function dynamicOffHelp(elementId) { delayhidehelp = setTimeout ( "offHelp('" + elementId + "')", 250); } function offHelp(elementId){ clearhidehelp(); if(document.getElementById(elementId)){ var popup = document.getElementById(elementId); popup.style.display = "none"; } else { //alert("Element: "+ elementId +" not found in existing document"); } } function clearhidehelp(){ if (typeof delayhidehelp!="undefined") clearTimeout(delayhidehelp) } function keepOpenHelp(ele){ clearhidehelp(); ele.style.display = ""; } function closeHelp(ele){ clearhidehelp(); ele.style.display = "none"; } function getHelpX( oElement ){ var iReturnValue = 0; while( oElement != null ) { iReturnValue += oElement.offsetLeft; oElement = oElement.offsetParent; } return iReturnValue; } function getHelpY( oElement ){ var iReturnValue = 0; while( oElement != null ) { iReturnValue += oElement.offsetTop; oElement = oElement.offsetParent; } return iReturnValue; } function handleClickEvent(element) { return true; }