var xmlHttp = createXmlHttpRequestObject();   var id = null;      function createXmlHttpRequestObject()   {    var xmlHttp;    try     {      xmlHttp = new XMLHttpRequest();     }     catch(e)     {      var XmlHttpVersions = new Array("MSXML2.XMLHTTP.6.0",   "MSXML2.XMLHTTP.5.0",   "MSXML2.XMLHTTP.4.0",   "MSXML2.XMLHTTP.3.0",   "MSXML2.XMLHTTP",   "Microsoft.XMLHTTP");      for (var i=0; i<XmlHttpVersions.length && !xmlHttp; i++)   {     try     {      xmlHttp = new ActiveXObject(XmlHttpVersions[i]);     }     catch (e) {}   }     }    if (xmlHttp)     return xmlHttp;   }        function vForm()   {      id = null;         if(!xmlHttp)      {   return;            }         try{         id = "answer";         var a = new Array();      a[0] = -1;      a[1] = -1;      a[2] = -1;      a[3] = -1;      a[4] = -1;            for(index = 1; index < 6; index++)      {         var e = document.getElementsByName("q" + index);           if(e != null)           {    for(t = 0; t < e.length; t++)       if( e[t].checked )     a[index - 1] = t;           }      }           var pa = "&xas="+tok+"&a="+a[0]+"&b="+a[1]+"&c="+a[2]+"&d="+a[3]+"&e="+a[4];     xmlHttp.open("GET", "/uCode/lcm/lcm.php?" + pa, true);     xmlHttp.onreadystatechange = handleRequestStateChange;     xmlHttp.send(null);        }   catch(e)   {      alert("Oops. We had an Error. Please ensure Javascript is Enabled and Try Again.");   }       }     function xq1(value, oValue)   {     id = null;    if (xmlHttp && value != null && oValue != null)     {      try   {          id = "d" + oValue ;     var pa = "&xas="+tok+"&q1="+value;         xmlHttp.open("GET", "/uCode/lcm/lcm.php?" + pa, true);     xmlHttp.onreadystatechange = handleRequestStateChange;     xmlHttp.send(null);   }      catch (e)   {     alert("Oops. We had an Error. Please ensure Javascript is Enabled and Try Again.");   }     }   }     function handleRequestStateChange()   {       if (xmlHttp.readyState == 4)     {      if (xmlHttp.status == 200)   {     try     {      handleServerResponse();     }     catch(e)     {           }   }   else   {         }     }   }      function resetForm()   {      try{   var qCount = 5;    cn = document.getElementsByName( "f1" )[0].childNodes;     for (var i = 0; i < cn.length; i++)      {         if(cn[i] == "[object HTMLDivElement]" )      {         cn[i].innerHTML = "";        }       if(i > 0)           {           var e = document.getElementsByName("q" + i);           if(e != null)           {           for(t = 0; t < e.length; t++)          e[t].checked = false;           }      }       }         document.getElementById("answer").innerHTML = "";         }   catch(e){      }      }          function handleServerResponse()   {    var xmlResponse = xmlHttp.responseXML;    if (!xmlResponse || !xmlResponse.documentElement)   throw("Invalid XML structure:\n" + xmlHttp.responseText);       var rootNodeName = xmlResponse.documentElement.nodeName;     if (rootNodeName == "parsererror")   throw("Invalid XML structure:\n" + xmlHttp.responseText);    xmlRoot = xmlResponse.documentElement;    if (rootNodeName != "response" || !xmlRoot.firstChild)   throw("Invalid XML structure:\n" + xmlHttp.responseText);       responseText = xmlRoot.firstChild.data;     if(id == null)   return;      mydiv = document.getElementById(id);      if(id == "answer")       {        mydiv.innerHTML = responseText;         return;      }      else   {document.getElementById('answer').innerHTML = "";}      if(responseText == "1")     {   mydiv.innerHTML = "";   return;    }      else   {         mydiv.innerHTML = responseText;   }   }      

