// Script used to retrieve Google Blog links
// Copyright Ayashi 2k7
// - Released under FOU [ Free Of Use ] -
//

function DigGoogleBlog(Keywords)
 {
  var SaveString = "?Action=DigGoogleBlog&Keywords="+Keywords;

  // Show the waiting div
  document.getElementById("ShowGoogleBlog").style.display = "none";
  document.getElementById("PreLoadingGoogleBlog").style.display = "inline";

  // Save the comment on the server
  SendDataGoogleBlog(SaveString);
 }

 function SendDataGoogleBlog(SaveString)
  {
   var xmlhttp=false;
   /*@cc_on @*/
   /*@if (@_jscript_version >= 5)
    try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } }
   @end @*/
   if (!xmlhttp && typeof XMLHttpRequest!='undefined')
    {
     try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; }
    }
   if (!xmlhttp && window.createRequest)
    {
     try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; }
    }

   xmlhttp.open("GET", "Ajax.php"+SaveString,true);
   xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==4)
     {
      document.getElementById("PreLoadingGoogleBlog").style.display = "none";

      // Show answers
      document.getElementById("ShowGoogleBlog").innerHTML=xmlhttp.responseText;
      document.getElementById("ShowGoogleBlog").style.display = "inline";
     }
    }
   xmlhttp.send(null)
  }
