function getSuggs()
{  
	var xmlHttp;
	try
    {    // Firefox, Opera 8.0+, Safari    
		xmlHttp=new XMLHttpRequest();    
    }
	catch (e)
    {    // Internet Explorer    
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	    }
	    catch (e)
		{
		      try
				{
				        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        
				}
				catch (e)
				{        
					alert("Your browser does not support AJAX!");        
					return false;
				}      
		}    
		window.status = ex.message;
	}  


	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			//document.myForm.time.value=xmlHttp.responseText;
			document.getElementById("suggs").innerHTML = xmlHttp.responseText;
			
		}
		else
		{
			//document.getElementById("suggs").innerHTML = document.frmQ.q.value + " " + xmlTttp.readyState;
		}
	}

	//xmlHttp.open("GET","time.asp",true);
	//try
	{
		xmlHttp.open("GET","/mb/searchsugs.asp?q="+document.frmQ.q.value,true);
		xmlHttp.send(null);
	}
	//catch(ex)
	{
	}
    //document.myForm.test.value="TEST";
    
}

function getSrchSuggs()
{  
	var xmlHttp;
	try
    {    // Firefox, Opera 8.0+, Safari    
		xmlHttp=new XMLHttpRequest();    
    }
	catch (e)
    {    // Internet Explorer    
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	    }
	    catch (e)
		{
		      try
				{
				     xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        
				}
				catch (e)
				{        
					//alert("Your browser does not support AJAX!");        
					return false;
				}      
		}    
		window.status = ex.message;
	}  


	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			//document.myForm.time.value=xmlHttp.responseText;
			document.getElementById("QSuggs").innerHTML = xmlHttp.responseText;
			
		}
		else
		{
			//document.getElementById("suggs").innerHTML = document.frmQ.q.value + " " + xmlTttp.readyState;
		}
	}

	//xmlHttp.open("GET","time.asp",true);
	//try
	{
		xmlHttp.open("GET","/mb/searchsugs.asp?q="+document.frmQ1.q.value,true);
		xmlHttp.send(null);
	}
	//catch(ex)
	{
	}
    //document.myForm.test.value="TEST";
    
}

function submitMainsearch()
{ 
	var oForm = document.getElementById("frmMainSearch");
	oForm.submit();
	var oQ = oForm.getElementById("q");
	
	try
	{
		var qs = "?q=" + oQ.value
		+ "&cartId=" + oForm.getElementById("cartid").value;
		
		oForm.action += qs;
		try
		{
			location.href = "/mb/searchresultjs.asp" + qs; 
		}
		catch(ex)
		{
		}
		
		
		if(navigator.userAgent.indexOf("Netscape") > -1)
		{
			oForm.submit();
			return(true);
		}
		else
		{
			oForm.submit();
		}
	}
	catch(ex)
	{
	}

	return true;
}

