
var var_number = /[^0-9]/gi; 
var var_numEng = /[^0-9a-z]/gi; 

function goAjax(URL, parm)   
{
	var xmlhttp = null;
	var responseText = "";

	if(window.ActiveXObject) {
		try{
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e1) {
			try{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}catch (e1){
				alert("XML¿¡·¯!");
				return '';				 
			}
		}
	}
	else {
		xmlhttp = new XMLHttpRequest();
	}


	xmlhttp.open('POST', URL, false);
	xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");  // POST ¹æ½ÄÀ¸·Î Àü¼Û½Ã ¹Ýµå½Ã ±â¼ú
	xmlhttp.send(parm);

	if(xmlhttp.readyState==4 ) {        // getAjaxResult ÇÔ¼ö·Î µû·Î »©µµ µÊ (´Ü, xmlhttp, responseText Àü¿ªÀ¸·Î ¼±¾ð)
		if(xmlhttp.status == 200 ) {
			responseText = xmlhttp.responseText;
		}
		else 
			alert("Ajax¿¡·¯ : "+xmlhttp.status);
	}

	return responseText;
}




function resizeHeight(pObj)
{
    pObj.style.height =pObj.contentWindow.document.body.scrollHeight + 20;
}


function checkNum(val)  // ¼ýÀÚ¸¸ ÀÔ·Â
{
	var var_testField = document.getElementById(val);
	var var_value = var_testField.value;

	if(var_value != ""){
		if (var_number.test(var_value) == true) {
			var_testField.value = var_value.replace(var_number,"");
		} 
	}
}

function checkNumEng(val)  // ¼ýÀÚ¿Í ¿µ¹®¸¸ ÀÔ·Â
{
	var var_testField = document.getElementById(val);
	var var_value = var_testField.value;

	if(var_value != ""){
		if (var_numEng.test(var_value) == true) {
			var_testField.value = var_value.replace(var_numEng,"");
		} 
	}
}


