var Domain='http://' + document.domain + '/Ajax/'
function findPosX(obj)
{
var curleft = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (obj.x)
curleft += obj.x;
return curleft;
}

function findPosY(obj)
{
var curtop = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (obj.y)
curtop += obj.y;
return curtop;
}





function QuickSearch(obj)
{
if (navigator.userAgent.indexOf("MSIE")!=-1) {xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP");} else {xmlHttp1=new XMLHttpRequest();}
xmlHttp1.onreadystatechange=function()
	
      {
      if(xmlHttp1.readyState==4)
        {
	//	alert (xmlHttp1.responseText)

		
		
		   AddTop=30
	AddLeft=4
  if (navigator.userAgent.indexOf("MSIE")!=-1){AddTop=28;AddLeft=-5}
 if (navigator.userAgent.indexOf("Chrome")!=-1){AddTop=30;AddLeft=-5}
  if (navigator.userAgent.indexOf("Firefox")!=-1){AddTop=27;AddLeft=-7}
  

document.getElementById("QSearchResult").style.left=findPosX(obj) + AddLeft + 'px'
document.getElementById("QSearchResult").style.top=findPosY(obj)+AddTop + 'px'

//document.getElementById("QSearchResult").style.left=findPosY(obj)+ 'px'
document.getElementById('QSearchResult').innerHTML=xmlHttp1.responseText

document.getElementById("QSearchResult").style.display='block'
	  if (Key==''){CloseResults()}

	         }
      }


	  var Key=document.getElementById('Search').value
	  


    xmlHttp1.open("GET",Domain + 'qsearch.asp?Key=' + Key,true);
    xmlHttp1.send(null);  


}




function CloseResults()
{
document.getElementById("QSearchResult").style.display='none'
}


