
var SR_xmlHttp;
var SR_xmlHttp_targer_id;

function createSR_XMLHttpRequest() {
	if (window.ActiveXObject) {
		SR_xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	} 
	else if (window.XMLHttpRequest) {
		SR_xmlHttp = new XMLHttpRequest();
	}
}

function SR_startRequest(url,query,targer_id) {
	SR_xmlHttp_targer_id = targer_id;
	createSR_XMLHttpRequest();
	SR_xmlHttp.onreadystatechange = handleStateChange;
	SR_xmlHttp.open("POST", url, true);
	SR_xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8;");
	SR_xmlHttp.send(query);
}
	
function handleStateChange(target_id) {
	if(SR_xmlHttp.readyState == 4) {
		if(SR_xmlHttp.status == 200) {
			if(SR_xmlHttp_targer_id!="[object]"){
				document.getElementById(SR_xmlHttp_targer_id).innerHTML = SR_xmlHttp.responseText;
			}else{
				SR_xmlHttp_targer_id.innerHTML = SR_xmlHttp.responseText;
			}
		}
	}
}


function SR_Favorite() {                                  //Æû°ªµé Á¤ÀÇ  
		var stringa = "";
		var url = "/portal3.asp"
		SR_startRequest(url,stringa,"rank");
	}
	