var xmlHttp

function showUser(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="http://www.nikstroi.com/building-materials/view-products.php"   
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("txtHint").innerHTML=xmlHttp.responseText  
 } 
}

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;
}

paWin = null;
function pop_ap(num) {
num += 0; // level upF
url = "http://www.nikstroi.com/media/.news/image" + num + ".jpg";
features = 'width=640,height=640,top='+((screen.height/2)-(290))+',left='+((screen.width/2)-(300))+',toolbar=no,scrollbars=no,resizable=yes,menubar=no,status=no,directories=no,location=no';
paWin = window.open(url, "paWin", features);
paWin.focus();
}