/** AjaxConn*/
function AjaxConn()
{
  var xmlhttp, bComplete = false;
  try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
  catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
  catch (e) { try { xmlhttp = new XMLHttpRequest(); }
  catch (e) { xmlhttp = false; }}}
  if (!xmlhttp) return null;
  this.connect = function(sURL, sMethod, sVars, fnDone)
  {
    if (!xmlhttp) return false;
    bComplete = false;
    sMethod = sMethod.toUpperCase();

    try {
      if (sMethod == "GET")
      {
        xmlhttp.open(sMethod, sURL+"?"+sVars, true);
        sVars = "";
      }
	  else if(sMethod=="IFRAME") {
		document.domain="96990.com";
		function getIFrameDoc(id) {
			 var iframe = document.getElementById(id);
			 iframe.style.display='block';
			 var doc = (iframe.contentWindow || iframe.contentDocument);
			 if (doc.document) {
				 doc = doc.document;
			 }
			 return doc;
		}
		function init(frame) {
			var d=getIFrameDoc("iframeProxy").body;
			//var txt=d.body.innerHTML;
			fnDone(d);
			//alert(d.body.innerHTML);
			frame.document.execCommand('stop');
			document.body.removeChild(frame);
		}			
		var f=document.createElement("iframe");
		f.src=sURL+"?"+sVars;
		f.id="iframeProxy";
		f.style.border="0px";
		f.style.width="0px";
		f.style.height="0px";
		f.onload = function(){ init(f);};
		if ( f.attachEvent != null )
			f.attachEvent( 'onload', function() { init(f); });
		document.body.appendChild(f);
	  }
	  else {
        xmlhttp.open(sMethod, sURL, true);
        xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1");
        xmlhttp.setRequestHeader("Content-Type",
          "application/x-www-form-urlencoded");
      }
      xmlhttp.onreadystatechange = function(){
        if (xmlhttp.readyState == 4 && !bComplete)
        {
          bComplete = true;
          fnDone(xmlhttp);
        }};
      xmlhttp.send(sVars);
    }
    catch(z) { return false; }
    return true;
  };
  return this;
}
function Goto() {
}
function $(id) {
	return document.getElementById(id);
}
/*Àý×Ó
var myConn = new AjaxConn();
if (!myConn) alert("XMLHTTP not available. Try a newer/better browser.");
var fnWhenDone = function (oXML) { alert(oXML.responseText); };
myConn.connect("mypage.php", "POST", "foo=bar&baz=qux", fnWhenDone);
*/
