if(window.ActiveXObject&&!window.XMLHttpRequest){
window.XMLHttpRequest=function(){
var _1=new Array("Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP");
for(var i=0;i<_1.length;i++){
try{
return new ActiveXObject(_1[i]);
}
catch(e){
}
}
return null;
};
}
if(window.opera&&!window.XMLHttpRequest){
window.XMLHttpRequest=function(){
this.readyState=0;
this.status=0;
this.statusText="";
this._headers=[];
this._aborted=false;
this._async=true;
this._defaultCharset="ISO-8859-1";
this._getCharset=function(){
var _3=_defaultCharset;
var _4=this.getResponseHeader("Content-type").toUpperCase();
val=_4.indexOf("CHARSET=");
if(val!=-1){
_3=_4.substring(val);
}
val=_3.indexOf(";");
if(val!=-1){
_3=_3.substring(0,val);
}
val=_3.indexOf(",");
if(val!=-1){
_3=_3.substring(0,val);
}
return _3;
};
this.abort=function(){
this._aborted=true;
};
this.getAllResponseHeaders=function(){
return this.getAllResponseHeader("*");
};
this.getAllResponseHeader=function(_5){
var _6="";
for(var i=0;i<this._headers.length;i++){
if(_5=="*"||this._headers[i].h==_5){
_6+=this._headers[i].h+": "+this._headers[i].v+"\n";
}
}
return _6;
};
this.getResponseHeader=function(_8){
var _9=getAllResponseHeader(_8);
var i=_9.indexOf("\n");
if(i!=-1){
_9=_9.substring(0,i);
}
return _9;
};
this.setRequestHeader=function(_b,_c){
this._headers[this._headers.length]={h:_b,v:_c};
};
this.open=function(_d,_e,_f,_10,_11){
this.method=_d;
this.url=_e;
this._async=true;
this._aborted=false;
this._headers=[];
if(arguments.length>=3){
this._async=_f;
}
if(arguments.length>3){
opera.postError("XMLHttpRequest.open() - user/password not supported");
}
this.readyState=1;
if(this.onreadystatechange){
this.onreadystatechange();
}
};
this.send=function(_12){
if(!navigator.javaEnabled()){
alert("XMLHttpRequest.send() - Java must be installed and enabled.");
return;
}
if(this._async){
setTimeout(this._sendasync,0,this,_12);
}else{
this._sendsync(_12);
}
};
this._sendasync=function(req,_14){
if(!req._aborted){
req._sendsync(_14);
}
};
this._sendsync=function(_15){
this.readyState=2;
if(this.onreadystatechange){
this.onreadystatechange();
}
var url=new java.net.URL(new java.net.URL(window.location.href),this.url);
var _17=url.openConnection();
for(var i=0;i<this._headers.length;i++){
_17.setRequestProperty(this._headers[i].h,this._headers[i].v);
}
this._headers=[];
if(this.method=="POST"){
_17.setDoOutput(true);
var wr=new java.io.OutputStreamWriter(_17.getOutputStream(),this._getCharset());
wr.write(_15);
wr.flush();
wr.close();
}
var _1a=false;
var _1b=false;
var _1c=false;
var _1d=false;
var _1e=false;
var _1f=false;
for(var i=0;;i++){
var _20=_17.getHeaderFieldKey(i);
var _21=_17.getHeaderField(i);
if(_20==null&&_21==null){
break;
}
if(_20!=null){
this._headers[this._headers.length]={h:_20,v:_21};
switch(_20.toLowerCase()){
case "content-encoding":
_1a=true;
break;
case "content-length":
_1b=true;
break;
case "content-type":
_1c=true;
break;
case "date":
_1d=true;
break;
case "expires":
_1e=true;
break;
case "last-modified":
_1f=true;
break;
}
}
}
var val;
val=_17.getContentEncoding();
if(val!=null&&!_1a){
this._headers[this._headers.length]={h:"Content-encoding",v:val};
}
val=_17.getContentLength();
if(val!=-1&&!_1b){
this._headers[this._headers.length]={h:"Content-length",v:val};
}
val=_17.getContentType();
if(val!=null&&!_1c){
this._headers[this._headers.length]={h:"Content-type",v:val};
}
val=_17.getDate();
if(val!=0&&!_1d){
this._headers[this._headers.length]={h:"Date",v:(new Date(val)).toUTCString()};
}
val=_17.getExpiration();
if(val!=0&&!_1e){
this._headers[this._headers.length]={h:"Expires",v:(new Date(val)).toUTCString()};
}
val=_17.getLastModified();
if(val!=0&&!_1f){
this._headers[this._headers.length]={h:"Last-modified",v:(new Date(val)).toUTCString()};
}
var _23="";
var _24=_17.getInputStream();
if(_24){
var _25=new java.io.BufferedReader(new java.io.InputStreamReader(_24,this._getCharset()));
var _26;
while((_26=_25.readLine())!=null){
if(this.readyState==2){
this.readyState=3;
if(this.onreadystatechange){
this.onreadystatechange();
}
}
_23+=_26+"\n";
}
_25.close();
this.status=200;
this.statusText="OK";
this.responseText=_23;
this.readyState=4;
if(this.onreadystatechange){
this.onreadystatechange();
}
if(this.onload){
this.onload();
}
}else{
this.status=404;
this.statusText="Not Found";
this.responseText="";
this.readyState=4;
if(this.onreadystatechange){
this.onreadystatechange();
}
if(this.onerror){
this.onerror();
}
}
};
};
}
if(!window.ActiveXObject&&window.XMLHttpRequest){
window.ActiveXObject=function(_27){
switch(_27.toLowerCase()){
case "microsoft.xmlhttp":
case "msxml2.xmlhttp":
case "msxml2.xmlhttp.3.0":
case "msxml2.xmlhttp.4.0":
case "msxml2.xmlhttp.5.0":
return new XMLHttpRequest();
}
return null;
};
}

