//¼ýÀÚÃ¼Å©ÇÔ¼ö =================================================
function CheckNum(val) {
	var num="0123456789";
	var check;

	for (var i=0;i<val.value.length; i++) {
		check=num.indexOf(val.value.charAt(i));
		if (check==-1) {
			alert("¼ýÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù");
			val.value="";
			val.focus();
			return false;
		}
		//¸¶Áö¸·±îÁö ·çÇÁ¸¦ µ·´Ù.
		if (i==val.value.length-1)	{
			return true;
		}
	}
}
// =========================================================


function chkEmail(strObj) {
	var email = strObj.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi); 
	if(!email)
		return false;
	return true;
}

// =========================================================

function chkUrl(strObj) {
	var homepage = strObj.match(/([\w]+)/gi); //Ã¹±ÛÀÚ´Â ¿µ¹®ÀÚ³ª ¼ýÀÚ
	if(!homepage)
		return false;
	return true;
}

// =========================================================

function onlyNum(obj) {
 var val = obj.value;
 var re = /[^0-9\.]/gi;
 obj.value = val.replace(re,"");
 obj.value = obj.value ? parseFloat(obj.value) : 0;
}
//====================================================================




function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';

  menubar_str = menubar ? 'yes' : 'no';

  statusbar_str = statusbar ? 'yes' : 'no';

  scrollbar_str = scrollbar ? 'yes' : 'no';

  resizable_str = resizable ? 'yes' : 'no';



  cookie_str = document.cookie;
  cookie_str.toString();


  pos_start  = cookie_str.indexOf(name);

  pos_start  = cookie_str.indexOf('=', pos_start);

  pos_end    = cookie_str.indexOf(';', pos_start);
  
  if (pos_end <= 0) pos_end = cookie_str.length;

  cookie_val = cookie_str.substring(pos_start + 1, pos_end);



  if (cookie_val  == "done")

    return;



  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);

}

// =========================================================
