function showQuickSearch(str)
{
	//document.getElementById("search-results").innerHTML="Søger...";
	if (str.length<1 || str.value=='Find produkter')
	{ 
		document.getElementById("search-results").style.display='none';
		document.getElementById("search-results").innerHTML="";
		return;
	}
	xmlHttpSearch=GetXmlHttpObject();
	if (xmlHttpSearch==null)
	{
		//alert ("Your browser does not support AJAX!");
		return;
	} 
	var url="/quicksearch.aspx";
	url=url+"?search="+escape(str);
	url=url+"&sid="+Math.random();
	xmlHttpSearch.onreadystatechange=searchStateChanged;
	xmlHttpSearch.open("GET",url,true);
	xmlHttpSearch.send(null);
	//document.getElementById("search-debug").innerHTML=url;
}

function searchStateChanged() 
{ 
	if (xmlHttpSearch.readyState==4)
	{ 
		document.getElementById("search-results").innerHTML=xmlHttpSearch.responseText;
		document.getElementById("search-results").style.display='block';
	}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("txtCart").innerHTML=xmlHttp.responseText;
}
}

