function disableEnterKey(e)
{
     var key;      
     if(window.event)
          key = window.event.keyCode; //IE
     else
          key = e.which; //firefox      

     return (key != 13);
}

function showBlock(id) {
	if (document.getElementById(id).style.display == "none") 
	{document.getElementById(id).style.display = "block"} 
	else 
	{document.getElementById(id).style.display = "none"}}


	
var xmlhttpAdd = false;
   try {
     xmlhttpAdd = new XMLHttpRequest();
	 
	 if (xmlhttpAdd.overrideMimeType) {
		 	xmlhttpAdd.overrideMimeType('text/xml');
	 									}
	 
    } catch (trymicrosoft) {
     try {
       xmlhttpAdd = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (othermicrosoft) {
       try {
         xmlhttpAdd = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (failed) {
         xmlhttpAdd = false;
       }  
     }
   }

function handleMessages (url, resultID) {
  
  var obj;
  xmlhttpAdd.open("GET", url, true);
  xmlhttpAdd.onreadystatechange=function() {
       if (xmlhttpAdd.readyState==4) {
		   		   
            obj = document.getElementById(resultID);
            obj.innerHTML = xmlhttpAdd.responseText;
		   
	   } 
  }
 xmlhttpAdd.send(null);
 return 0;
}

function getAd(ad) {
  url="/js/search_ad.php?q=" + encodeURIComponent(ad); 
    handleMessages(url, "go_ad");
}

