//<!-- 
	if(!document.layers)
	{
		document.writeln('<style type="text/css">');
		document.writeln('.clLevel1,.clLevel1over{text-align:left; }');
		document.writeln('</style>');
	}
	

function submitFromNewCategory(text)
{
	if(text != 'Lighting Category')
	{
		if(text == 'All')document.search.action = "/htmls/selection.asp";
		document.search.s.value = text;
		document.search.submit();
	}
}

function canSearch()
{
	if(document.forms[0].s.value==' keyword or item #')
	{
		return;
	}
	if( document.search.s.value.replace(/\s+/g,"") != "" )
	{
		document.search.submit();
	}
}

function needSubmit( oText, evt )
{
	if (window.event) { // IE
		if (evt.keyCode == 13){
			if( typeof( canSearchforAscx ) == 'function' )
				canSearchforAscx();
			else
				canSearch();
			return false;
		}
	} 
}


var path = "/";
var bs_path = "/htmls/best/";
var img = "<img src=\"" + path + "images/spacer.gif\" border=\"0\" width=\"5\" height=\"1\">";


function chatLink(){
 window.open('/htmls/6e-1contactus/chat.aspx','custclient', 'width=500,height=320,scrollbars=0');
}


//Extra code to find position:
function findPos(num){
  //alert(num)
  if(bw.ns4){   //Netscape 4
    x = document.layers["layerMenu"+num].pageX
    y = document.layers["layerMenu"+num].pageY
  }else{ //other browsers
    x=0; y=0; var el,temp
    el = bw.ie4?document.all["divMenu"+num]:document.getElementById("divMenu"+num);
 	if( !el )
	{
		return [0,0];
	}
    if(el.offsetParent){
      temp = el
      while(temp.offsetParent){ //Looping parent elements to get the offset of them as well
        temp=temp.offsetParent; 
        x+=temp.offsetLeft
        y+=temp.offsetTop;
      }
    }
    x+=el.offsetLeft
    y+=el.offsetTop
  }
  //Returning the x and y as an array
  return [x,y]
}

function placeElements(){
  //Changing the position of ALL top items:
  
  pos = findPos(0);
  oCMenu.m["top0"].b.moveIt(pos[0],pos[1]);
  pos = findPos(1);
  oCMenu.m["top1"].b.moveIt(pos[0],pos[1]);
  
  //Setting the fromtop value
  oCMenu.fromTop = pos[1]
  
  setTimeout("placeElements()",750);
}

/*//placeElements();
setTimeout("placeElements()",100);
// Do it once more at 1/2 second so IE5.0 MAC users don't see error.
setTimeout("placeElements()",500);
// Do it once more at 1 second so just to be sure.
setTimeout("placeElements()",1000);
// Do it once more at 2 seconds for good measure
setTimeout("placeElements()",2000);
//Setting it to re place the elements after resize - the resize is not perfect though..
//oCMenu.onafterresize="placeElements()"
//-->*/