/*jslb_ajax050 2.652k @see http://jsgt.org/mt/archives/01/000409.html*/function chkAjaBrowser(){var a,ua=navigator.userAgent;this.bw={safari:((a=ua.split('AppleWebKit/')[1])?a.split('(')[0]:0)>=124,konqueror:((a=ua.split('Konqueror/')[1])?a.split(';')[0]:0)>=3.3,mozes:((a=ua.split('Gecko/')[1])?a.split(" ")[0]:0)>=20011128,opera:(!!window.opera)&&((typeof XMLHttpRequest)=='function'),msie:(!!window.ActiveXObject)?(!!createHttpRequest()):false};return(this.bw.safari||this.bw.konqueror||this.bw.mozes||this.bw.opera||this.bw.msie)};function createHttpRequest(){if(window.XMLHttpRequest){return new XMLHttpRequest();}else if(window.ActiveXObject){try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e2){return null;}}}else{return null;}};function sendRequest(callback,data,method,url,async,sload,user,password){sendRequest.prototype.README={url:"http://jsgt.org/mt/archives/01/000409.html",name:"sendRequest",version:0.50,license:"Public Domain",author:"Toshiro Takahashi http://jsgt.org/mt/01/",memo:""};var oj=createHttpRequest();if(oj==null)return null;var sload=(!!sendRequest.arguments[5])?sload:false;if(sload||method.toUpperCase()=='GET')url+="?";if(sload)url=url+"t="+(new Date()).getTime();var bwoj=new chkAjaBrowser();var opera=bwoj.bw.opera;var safari=bwoj.bw.safari;var konqueror=bwoj.bw.konqueror;var mozes=bwoj.bw.mozes;if(typeof callback=='object'){var callback_onload=callback.onload;var callback_onbeforsetheader=callback.onbeforsetheader}else{var callback_onload=callback;var callback_onbeforsetheader=null;};if(opera||safari||mozes){oj.onload=function(){callback_onload(oj);}}else{oj.onreadystatechange=function(){if(oj.readyState==4){callback_onload(oj);}}};data=uriEncode(data,url);if(method.toUpperCase()=='GET'){url+=data};oj.open(method,url,async,user,password);if(!!callback_onbeforsetheader)callback_onbeforsetheader(oj);setEncHeader(oj);oj.send(data);function setEncHeader(oj){var contentTypeUrlenc='application/x-www-form-urlencoded; charset=UTF-8';if(!window.opera){oj.setRequestHeader('Content-Type',contentTypeUrlenc);}else{if((typeof oj.setRequestHeader)=='function')oj.setRequestHeader('Content-Type',contentTypeUrlenc);};return oj};function uriEncode(data,url){var encdata=(url.indexOf('?')==-1)?'?dmy':'';if(typeof data=='object'){for(var i in data)encdata+='&'+encodeURIComponent(i)+'='+encodeURIComponent(data[i]);}else if(typeof data=='string'){if(data=="")return"";var encdata='';var datas=data.split('&');for(i=1;i<datas.length;i++){var dataq=datas[i].split('=');encdata+='&'+encodeURIComponent(dataq[0])+'='+encodeURIComponent(dataq[1]);}};return encdata;};return oj}
																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																			  function setOpacity(layName,arg) {
    var ua = navigator.userAgent,oj = document.getElementById(layName)
    if(window.opera){//o9bpr2+
       if((typeof oj.style.opacity)=='string') oj.style.opacity = arg
       else return
    } else if(ua.indexOf('Safari') !=-1 || ua.indexOf('KHTML') !=-1 || 
       (typeof oj.style.opacity)=='string') { //s,k,new m
        oj.style.opacity = arg
    } else if(document.all) {          //win-e4,win-e5,win-e6
        document.all(layName).style.filter="alpha(opacity=0)"
        document.all(layName).filters.alpha.Opacity  = (arg * 100)
    } else if(ua.indexOf('Gecko')!=-1) //n6,n7,m1
        oj.style.MozOpacity = arg
  }
  
 
  function fadeOpacity(layName,swt,stopOpacity){
    
    if(!window.fadeOpacity[layName]) 
      fadeOpacity[layName] =0 
   
    if(!arguments[1]) swt = -1
   
    if(swt==-1)        var f  = "9876543210"
    else if(swt==1)    var f  = "0123456789"
    else               var f  = "9876543210"
   
    if(!arguments[2] && swt==-1)     stopOpacity = 0
    else if(!arguments[2] && swt==1) stopOpacity = 10

   
    if( fadeOpacity[layName] < f.length-1 ){
      
      var opa = f.charAt(fadeOpacity[layName])/10
     
      if( opa == stopOpacity ){
        setOpacity(layName,stopOpacity)  
        fadeOpacity[layName] = 0 
        return
      }
     
      setOpacity(layName,opa)
      
      fadeOpacity[layName]++
      
      setTimeout('fadeOpacity("'+layName+'","'+swt+'","'+stopOpacity+'")',50)
    } else {
   
      setOpacity(layName,stopOpacity)
    
      fadeOpacity[layName] = 0
    }
  }
