function PhpLive(httpUrl)
{
       //Global varrible decloration for internal functions uses.
      this.httpResourceToSendTo = httpUrl;
      this.url = 'http://www.youadults.com/';
      this.httpFormName = "";
      this.httpParameters = [];
      this.httpParametersPath = [];
      this.httpParameterCount = 0;
      this.updateElement = "";
      this.stringLoadingMessage = '<div style="float:left;width:100%;text-align:center;font-size:15px;padding:20px 0px 10px 0px;font-size:10px;">  <img src="'+ this.url +'/images/loading.gif"/> <br/> Loading...  </div>';
      this.executeEvent = "";
      var that = this;
      this.ResponseText = "";
      //This function builds query strings, encodes them, and
      //sends them off to the correct page with correct POST[] information
      //varibles are declared localy for internal function use, to make the varibles private
      this.SendRequest = function()
      {
            // defining update panel
            var UpdatePanel = null;
            UpdatePanel = this.updateElement;
            var httpRequestToSend = null;
            // load panels with loading message
            //build http post string
            httpRequestToSend = this.BuildHttpPost().toString();
            // remove & from http post string
            if(httpRequestToSend.toString().substring(0,1) == "&")
            {
                  httpRequestToSend = httpRequestToSend.substring(1,httpRequestToSend.length);
            }

            this.ShowLoadingMessage();

             $.post
            (
                this.httpResourceToSendTo,
                httpRequestToSend,
                function(dataSentBack){
                    document.getElementById(UpdatePanel).innerHTML = dataSentBack;
                    that.ResponseText = dataSentBack;
                }

            );
      }
      // showing loading message in the update panel place
      this.ShowLoadingMessage = function()
      {
          document.getElementById(this.updateElement).innerHTML = this.stringLoadingMessage;
      }
      //out all of the paremters that have been put in place, building query string
      this.BuildHttpPost = function()
      {
           var i = 0;
           var stringParameters  = "";
           for(i = 0; i < this.httpParameterCount; i++)
           {
               stringParameters = stringParameters + "&" + this.httpParameters[i] + "=" + encodeURI(this.httpParametersPath[i].value);
           }
           return stringParameters+"&ajaxstate=true"+"&"+this.executeEvent+"=1&panelname="+this.updateElement+"&random="+Math.ceil(1000*Math.random());
      }
      //add parameter to library
      this.AddParameter = function(elementID,elementPath)
      {
            this.httpParameters[this.httpParameterCount] = elementID;
            this.httpParametersPath[this.httpParameterCount] = elementPath;
            this.httpParameterCount++;
      }
      //set update panel
      this.SetUpdatePanel = function(elementID)
      {
            this.updateElement = elementID;

      }
      //set execute event, to send as post
      this.SetExecuteEvent = function(eventName)
      {
          this.executeEvent = eventName;
      }
      //trying to resolve what object should be assigned,
      //different browsers support different classes
      this.GetXmlHttpObject = function()
      {
          var HttpGateway = null;
          try
           {
               //initilize firefox, safari, opera
              HttpGateway = new XMLHttpRequest();
           }
          catch (e)
           {
                //if fails then initlize for IE 6 & 7
               try
                {
                    HttpGateway = new ActiveXObject("Msxml2.XMLHTTP");
                }
               catch (e)
                {
                    HttpGateway = new ActiveXObject("Microsoft.XMLHTTP");
                }
           }
           //return assigned gateway
           return HttpGateway;
      }
}