
	var xmlHttp;

	function mailSend(str){
	
		var krand = Math.random();
		
		
		// フォームの値取得
		var text = document.getElementById("comment").value;
		var url = str + "/sendmail.php?comment=" + encodeURI(text) + "&krand=" + krand;

		if (window.XMLHttpRequest){
			xmlHttp = new XMLHttpRequest();
		}else{
			if (window.ActiveXObject){
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}else{
				xmlHttp = null;
			}
		}
		xmlHttp.onreadystatechange = checkStatus;
		xmlHttp.open("GET", url, true);
	
		xmlHttp.send(null);
	}

	function checkStatus(){
		if (xmlHttp.readyState == 4 && xmlHttp.status == 200){
			var kid = document.getElementById("sendmail");
			kid.innerHTML = xmlHttp.responseText;
		}
	}
	
