// JavaScript Document
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}


function request_to(element_id, url, method, param){ 
    var element = document.getElementById(element_id); 
    var str_method=method.toLowerCase();
    element.innerHTML = '<div align="center"><img src="images/loader.gif" border="0" width="16" height="16"></div>'; 
    xmlhttp.open(method, url, true); 
    if(str_method=="get"){

    }else{
    	if(str_method=="post"){
    		   	xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
    	}
    }

    xmlhttp.onreadystatechange = function() { 
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 
            element.innerHTML = xmlhttp.responseText; 
        } 
    } 
    xmlhttp.send(param); 
}