function Currentcondition(command) {

 var ajax=getAjax();

 if(command == "request"){
	var position1 = document.getElementById("Position");
	var magnificant = document.getElementById("Magnificant");
	var brightness = document.getElementById("Brightness");
	var contrast = document.getElementById("Contrast");
	var forcus = document.getElementById("Forcus");
	var voltage = document.getElementById("Voltage");
	}else {
	var position1 = document.anchorsgetElementById("result");
	}

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

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


			try {
				 ajax.send(null);
			}catch (e) {
				position1.innerHTML ="send error";
			}

		}else {
			position1.innerHTML = "you cannot use ajax....";
		}

				function getData() {
						if (ajax.readyState==4) {
								if (ajax.status==200) {
											 console.log("Hello!");
											 var resultjson = ajax.responseText;
											 resultjson=JSON.parse(resultjson);
												console.log(typeof resultjson);
				/*
												 for (key in resultjson) {
												 console.log(key+":"+resultjson(key));
											}
											*/
												 //position1.innerHTML=resultjson;
											 position1.innerHTML = "x="+resultjson["Current_stageX"]+" y="+resultjson['Current_stageY']+" z="+resultjson['Current_stageZ']+" a="+resultjson['Current_stageA'];
											magnificant.innerHTML = "Magnificant:"+resultjson['Magnificant'];
										 	brightness.innerHTML = "Brightness:"+resultjson['Brightness'];
										 	contrast.innerHTML = "Contrast:"+resultjson['Contrast'];
										 	forcus.innerHTML = "Forcus:"+resultjson['Forcus'];
										 	voltage.innerHTML = "Voltage:"+resultjson['Voltage'];
 											//   result.innerHTML = ajax.responseText;
									 }else {
										 position1.innerHTML = "HTTP transmission....";
									}
						 }
				}
 }