function ajaxFunction(sFile, sTarget, fMethod) { 
  var xmlHttp;
  try {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
  }
  catch (e) {
    // Internet Explorer
    try {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e) {
      try {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
      catch (e) {
        alert("Your browser is not able to display this data.");
        return false;
      }
    }
  }

  xmlHttp.onreadystatechange = function() {
    if(xmlHttp.readyState == 4)
    {
      var oTarget = document.getElementById(sTarget);
      if (!oTarget){
        oTarget = parent.document.getElementById(sTarget);
      }
      if (oTarget) {
        oTarget.innerHTML = xmlHttp.responseText;
        if (fMethod) {
          fMethod();
        }
      }
      else {
        alert('No element to place the file data in.');
      }
    }
  }
  xmlHttp.open("GET", "http://www.else.co.nz/view.php?ref=" + sFile);
  //xmlHttp.open("GET", sFile);
  xmlHttp.send(null);
}
