function TemControl(command,parameter){

	var ajax = getAjax();

	if(command == "Connect"){
		var result = document.getElementById("connection");
	}else{
		var result = document.getElementById("result");
	}

	if(ajax){
		try{
			ajax.onreadystatechange = getData;
		}catch(e){
			result.innerHTML = "onreadystate change error";
		}

		try{
			ajax.open("GET","//localhost:8000/cgi-bin/vemclient.rb?command="+encodeURIComponent(command)+"&parameter="+encodeURIComponent(parameter),true);
		}catch(e){
			result.innerHTML = "ajax open error";
		}

		try{
			ajax.send(null);
		}catch(e){
			result.innerHTML = "send error";
		}
	}else{
		result.innerHTML = "you cannot use ajax...";
	}

	function getData(){
		if(ajax.readyState == 4){
			if(ajax.status == 200){
	result.innerHTML = ajax.responseText;
	if(ajax.responseText.match(/Control/i)){
		a = ajax.responseText.split(" ");
		alert(a[1]+a[2]);
	}
			}else{
	result.innerHTML = "HTTP error";
			}
		}else{
			result.innerHTML = "HTTP Transmission...";
		}
	}

}
