﻿function onchange(i){
childsort=document.all("child" + i);
	if(childsort.style.display=="none"){
		childsort.style.display="";}
	else{
		childsort.style.display="none";}
}

function $(id)
{
    return document.getElementById(id);
}

function SearchProduct(type)
{
           var kind,keyname;
           kind=$("ddlkind").options[$("ddlkind").selectedIndex].value;
           keyname=$("keyword").value;
           var url="";
           if (type==1)
              url="product.aspx";
           else
              url="product-e.aspx";
           url=url+"?productsort="+kind+"&name="+encodeURI(keyname);
           window.location.href=url;
           return false;
}

function menuFix() {
var sfEls = document.getElementById("catelog").getElementsByTagName("li");
for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
    this.className+=(this.className.length>0? " ": "") + "sfhover";
    }
    sfEls[i].onMouseDown=function() {
    this.className+=(this.className.length>0? " ": "") + "sfhover";
    }
    sfEls[i].onMouseUp=function() {
    this.className+=(this.className.length>0? " ": "") + "sfhover";
    }
    sfEls[i].onmouseout=function() {
    this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), 

"");
    }
}
}
