function openWin(url,title,attrib) {wref=window.open(url,title,attrib);if(MSIE_VER()>=5)wref.focus()}
function openInnewWindow(url,width,height,toolbar,left,top) {if(toolbar==1) {openWin(url,'MAZIKANA','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+width+',height='+height+',left='+left+',top='+top)} else {openWin(url,'MAZIKANA','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,movable=yes,resizable=yes,width='+width+',height='+height+',left='+left+',top='+top)}}

    function createRequestObject() {  

       var req;  
     
       if(window.XMLHttpRequest){  
          req = new XMLHttpRequest();  
       } else if(window.ActiveXObject) {  
          // Internet Explorer 5+  
          req = new ActiveXObject("Microsoft.XMLHTTP");  
       } else {  
          // There is an error creating the object,  
          // just as an old browser is being used.  
          alert('Problem creating the XMLHttpRequest object');  
       }  
     
       return req;  
     
    }  
     
    // Make the XMLHttpRequest object  
    var http = createRequestObject();  
     
    function sendRequest(q) {  
     if (q != '') {
       // Open PHP script for requests  
       http.open('get', 'suggest1.asp?q='+q);  
       http.onreadystatechange = handleResponse;  
       http.send(null);
       document.getElementById("searchResults").style.visibility = 'visible' 
       } else { 
       document.getElementById("searchResults").style.visibility = 'hidden' 
       
       }
       
     
    }  
     
    function clickedon(q) {
    document.getElementById("searchResults").style.visibility = 'hidden'
    document.getElementById("q").value = q
    
    
    }
    function handleResponse() {  
     
       if(http.readyState == 4 && http.status == 200){  
     
          // Text returned FROM the PHP script  
          var response = http.responseText;  
     
          if(response) {  
             // UPDATE ajaxTest content  
             document.getElementById("searchResults").innerHTML = response;  
          }  
     
       }  
     
    }  
