function createAjaxRequest(){var D=false;try{D=new ActiveXObject("Msxml2.XMLHTTP")}catch(B){try{D=new ActiveXObject("Microsoft.XMLHTTP")}catch(A){try{D=new XMLHttpRequest()}catch(C){D=false}}}return D}function changeOpac(B,C){var A=document.getElementById(C).style;A.opacity=(B/100);A.MozOpacity=(B/100);A.KhtmlOpacity=(B/100);A.filter="alpha(opacity="+B+")"}function fadeColor(B,A){changeOpac(0,B);document.getElementById(B).style.display="block";opacity(B,0,100,A)}function opacity(F,D,A,B){var C=Math.round(B/100);var E=0;if(D>A){for(i=D;i>=A;i--){setTimeout("changeOpac("+i+",'"+F+"')",(E*C));E++}}else{if(D<A){for(i=D;i<=A;i++){setTimeout("changeOpac("+i+",'"+F+"')",(E*C));E++}}}}function formLogin(){var A=createAjaxRequest();A.onreadystatechange=function(){if(A.readyState==4){if(A.status==200){if(A.responseText=="true"){document.getElementById("loginForm").submit()}else{document.getElementById("loginError").innerHTML="Invalid login. Please try again."}}else{}}};A.open("GET","/ajax/auth.go?g=1&loginID="+document.getElementById("loginID").value+"&password="+document.getElementById("password").value,true);A.send(null);return false}function clearLogin(){var A=document.getElementById("loginID");if(A.value=="Email Address"){A.value=""}document.getElementById("password").value="";document.getElementById("loginError").innerHTML="&nbsp;"}function clearPassword(){var A=document.getElementById("password");A.value="";document.getElementById("loginError").innerHTML="&nbsp;"}function updateCartCount(){var A=createAjaxRequest();A.onreadystatechange=function(){if(A.readyState==4){if(A.status==200){document.getElementById("itemsInCart").innerHTML=A.responseText}}};A.open("GET","/ajax/getProductAddedToCartCount.go",true);A.send(null)}function updateCartTotal(){var A=createAjaxRequest();A.onreadystatechange=function(){if(A.readyState==4){if(A.status==200){document.getElementById("cartTotal").innerHTML=A.responseText}else{}}};A.open("GET","/ajax/getCartTotal.go",true);A.send(null)}function getNextLevel(B){var A=createXHR();A.onreadystatechange=function(){if(A.readyState==4){if(A.status==200){parseXML(A,B)}else{}}};A.open("GET","/ajaxLeftHandMenu.proc?g=1&parentCategoryID="+B);A.send(null)}function parseXML(G,F){var E=G.responseXML.getElementsByTagName("category");var A=document.getElementById("tableTree_"+F).getElementsByTagName("TBODY")[0];for(var C=0;C<E.length;C++){var H=document.createElement("TR");var D=document.createElement("TD");D.appendChild(document.createTextNode("column 1"));var B=document.createElement("TD");B.appendChild(document.createTextNode("column 2"));H.appendChild(D);H.appendChild(B);A.appendChild(H)}}function getNodeValue(B,A){return B.getElementsByTagName(A)[0].firstChild.nodeValue}function pauseComputer(C){var B=new Date();var A=null;do{A=new Date()}while(A-B<C)}function changeTreeMenu(A){if(document.getElementById("tree_"+A).style.display=="block"){document.getElementById("tree_"+A).style.display="none"}else{document.getElementById("tree_"+A).style.display="block"}}function updateDBTree(E,D,C){var A=0;if(document.getElementById("tree_"+C).style.display=="block"){A=1}var B=createAjaxRequest();B.onreadystatechange=function(){if(B.readyState==4){if(B.status==200){}}};B.open("GET","/ajax/updateOpenTreeItems.go?g=1&cfid="+E+"&cftoken="+D+"&treeID="+C+"&status="+A,true);B.send(null)};

function useSearchForm() {
	document.getElementById('searchForm').action = '/search.html?g=1&searchText=' + document.getElementById('searchText').value;
}