function gebid(id){
	return document.getElementById(id);
}
function getHTTPObject(){
	if(!b_ptf){
		var b_ptf = "";
	}
	if(b_ptf == "w"){
		var xmlhttp = window.ActiveXObject ? new ActiveXObject("MSXML2.XMLHTTP.3.0") : new XMLHttpRequest();
	}else{
		var xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0");
	}
	return xmlhttp;
}
var http = getHTTPObject();
var loadUrl = "http://www.jeducomm.net/shared_resources/scripts/load.php";
var num_res = "";
function js_load(toload,ch_nch){
	for(i=1;i<=num_res;i++){
		var script = document.createElement('script');
		script.src = toload[i];
		script.type = 'text/javascript';
		var head = document.getElementsByTagName('head').item(0);
		head.appendChild(script);
		if(i >= num_res && ch_nch != "NC"){
			img_chk();
		}
	}
}
function send(urlink,info,ret){
	http.open("POST", urlink, true);
	http.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=Shift_JIS");
	http.onreadystatechange = function(){alertContents(ret);};
	http.setRequestHeader("Connection", "close");
	http.send(info);
}
function handle(v){
	for(i=1;i<v.length - 1;i++){
		eval(v[i]);
	}
}
function alertContents(ret){
	if(http.readyState == 4){
		if(http.status == 200){
			result = http.responseText.split("<spt />");
			if(ret == "add"){
				num_res = result.length - 2;
				js_load(result,null);
			}else if(ret == "add_nc"){
				num_res = result.length - 2;
				js_load(result,'NC');
			}else if(ret == null){
				handle(result);
			}else{
				alert('There was a problem with the request. ' + http.status + ret);
			}
		}
	}
}
function all_bsc(){
	var c_height = gebid('container').offsetHeight;
	var b_height = gebid('body').offsetHeight
	if(c_height + 140 > b_height){
		gebid('container').style.height = b_height - 140+"px";
	}
}
