
function openPopup(file,width,height)
{
	//var width = 200;
	var height = screen.height;
  var left = (screen.width-width) / 2;
  //var top =  (screen.height-height) / 2;
  var top = 0;

  //alert(width +', '+ height +', '+ top +', '+ left +', sw: '+ screen.width+', sh: '+screen.height);

	win = window.open(file, "hoschid_popup", "width="+width+",height="+height+",scrollbars=yes,toolbar=no,resizable=yes,scrolling=yes,left="+left+",top="+top);
	win.focus();
}

/* ~~~ Ajax ~~~ */

function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
        ro = new XMLHttpRequest();
    }
    return ro;
}

var http = createRequestObject();

function sndReq(url,paras)
{
	http.open('get', url+'?'+paras);
	http.onreadystatechange = handleResponse;
	http.send(null);
}

function handleResponse()
{
	if(http.readyState == 4)
  {
		var responseText = http.responseText;
	}
}