<!--
//basic ajax request 
      function postRequest(strURL,id,action) { 
        var xmlHttp; 
        if (window.XMLHttpRequest) { // Mozilla, Safari, ... 
          var xmlHttp = new XMLHttpRequest(); 
        } 
        else if (window.ActiveXObject) { // IE 
          var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
        } 
        xmlHttp.open('POST', strURL, true); 
        xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 
        xmlHttp.onreadystatechange = function() { 
          if (xmlHttp.readyState == 4) { 
            updatepage(xmlHttp.responseText,id,action); 
          } 
        } 
        xmlHttp.send(strURL); 
      } 
      //update target 
      function updatepage(str,id,action){ 
          if (action == "add"){ 
          document.getElementById(id).innerHTML +=str; 
          } 
          else if (action == "replace"){ 
              document.getElementById(id).innerHTML =str; 
          } 
          else if (action == "formfield"){ 
              document.getElementById(id).value =str; 
          } 
          else if (action == "execute"){ 
              eval(str); 
          } 
      } 
      //fetch data for onclick/onchange events 
      function eventfetch(url,id,action){ 
        postRequest(url,id,action); 
      } 
      //fetch data for timebased events 
      function timefetch(url,id,action,milliseconds) { 
          eventfetch(url,id,action); 
        setTimeout(function () { timefetch(url,id,action,milliseconds); },milliseconds); 
      } 
      //generic fetch function, accepts 5 parameters (first 4 mandatory). 
      //url = script to access on the server 
      //id = html id (for example of a div, a form field etc.., works with all tags which accept an id) 
      //action = add, replace, execute or formfield, add adds up content at the end of the original content in the id element, replace replaces the complete content in the id element, execute evaluates javascript, formfield replaces a form field value 
      //base = time or event, time based means script will autoexecute itself every amount of milliseconds specified via the 5th (millisecdons) parameter, event based means you are calling the funtion with something like onclick, onchange, onmouseover etc.... 
      //milliseconds = time in milliseconds till the script should autoexecute itself again (only needed when base==time) 
      function fetch(url,id,action,base,milliseconds){ 
          if(base == "event"){ 
              eventfetch(url,id,action); 
          } 
          else if(base == "time"){ 
              timefetch(url,id,action,milliseconds); 
          } 
      } 	  
//-->