// JavaScript Document
function handleHttpResponse() {
   if (http.readyState == 4) {
      // Split the comma delimited response into an array
      results = http.responseText;
      document.getElementById('popupmessage').innerHTML = results;
      }
   }
function updateMessage(compid, action) {
   http.open("GET", "http://live247support.com/messagedata.php?compid=" + compid + "&action=" + action, true);
   http.onreadystatechange = handleHttpResponse;
   http.send(null);
   }
function getHTTPObject() {
   var xmlhttp;
   /*
   @cc_on @if (@_jscript_version >= 5) try {
   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (e) {
   try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
   } catch (E) {
   xmlhttp = false;
   }
   } @else xmlhttp = false; @end @
   */
   if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
      try {
         xmlhttp = new XMLHttpRequest();
         }
      catch (e) {
         xmlhttp = false;
         }
      }
   return xmlhttp;
   }
var http = getHTTPObject();
// We create the HTTP Object
function delCookie() {
   var new_date = new Date() 
   new_date = new_date.toGMTString()
   var thecookie = document.cookie.split(";")
   for (var i = 0; i < thecookie.length; i++) {
      document.cookie = thecookie[i] + "; expires =" + new_date }
   }
function getCookie(c_name) {
   if (document.cookie.length > 0) {
      c_start = document.cookie.indexOf(c_name + "=");
      if (c_start !=- 1) {
         c_start = c_start + c_name.length + 1;
         c_end = document.cookie.indexOf(";", c_start);
         if (c_end ==- 1) c_end = document.cookie.length;
         return unescape(document.cookie.substring(c_start, c_end));
         }
      }
   return "";
   }
function setCookie(c_name, value, expiredays) {
   var exdate = new Date();
   exdate.setDate(exdate.getDate() + expiredays);
   document.cookie = c_name + "=" + escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());
   }

   function LaunchPopup(page,width,height) {
	OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,dependent=no,directories=no,width=" + width + ",height=" + height + ",x=50,y=50");
}