
//<!--
var app = navigator.appVersion.charAt(0);


function checkForm(n, cnt, selfCheck)
{
	var start_index = 1;
	
	for (i=start_index; i<=cnt; i++)
	{
		var bChecked = false;
		for (j=1; j<=n; j++)
		{
			rdo = document.getElementById("ra" + i + "_" + j);
			if (rdo.checked) 
			{
				bChecked = true;
			}
		}
		
		if (!bChecked) 
		{
			document.getElementById("ra" + i + "_1").focus();
			alert("[¹®Á¦] " + (i) +" ¹ø¿¡ ´äÀ» ÇÏ¿© ÁÖ½Ê½Ã¿À.");
			return false;
		}
	}
	
	//document.Form1.action = "/bp/healthinfo/healthcheck_t1r.aspx?SelfCheck=" + selfCheck;
	//document.Form1.submit();
	
	
	var Form1 = document.getElementById("Form1");
	Form1.action = "/bp/healthinfo/healthcheck_t1r.aspx?SelfCheck=" + selfCheck;
	Form1.submit();
}

function checkForm_Wave(n, cnt, selfCheck)
{
	var start_index = 1;
	
	for (i=start_index; i<=cnt; i++)
	{
		var bChecked = false;
		for (j=1; j<=n; j++)
		{
			rdo = document.getElementById("ra" + i + "_" + j);
			if (rdo.checked) 
			{
				bChecked = true;
			}
		}
		
		if (!bChecked) 
		{
			document.getElementById("ra" + i + "_1").focus();
			alert("[¹®Á¦] " + (i) +" ¹ø¿¡ ´äÀ» ÇÏ¿© ÁÖ½Ê½Ã¿À.");
			return false;
		}
	}	
	
	var Form1 = document.getElementById("Form1");
	Form1.action = "/BP/NW/C_HealthSelfCheck_Sub_T1R.aspx?SelfCheck=" + selfCheck;
	Form1.submit();
}

function checkForm_Women(n, cnt, selfCheck,womenid)
{
	var start_index = 1;
	
	for (i=start_index; i<=cnt; i++)
	{
		var bChecked = false;
		for (j=1; j<=n; j++)
		{
			rdo = document.getElementById("ra" + i + "_" + j);
			if (rdo.checked) 
			{
				bChecked = true;
			}
		}
		
		if (!bChecked) 
		{
			document.getElementById("ra" + i + "_1").focus();
			alert("[¹®Á¦] " + (i) +" ¹ø¿¡ ´äÀ» ÇÏ¿© ÁÖ½Ê½Ã¿À.");
			return false;
		}
	}	
	
	var Form1 = document.getElementById("Form1");
	Form1.action = "/bp/women/selfcheck_sub_TR2.aspx?wid="+womenid+"&SelfCheck=" + selfCheck;	
	Form1.submit();
}

function Test_checkForm_Women(n, cnt, selfCheck,womenid)
{
	var start_index = 1;
	
	for (i=start_index; i<=cnt; i++)
	{
		var bChecked = false;
		for (j=1; j<=n; j++)
		{
			rdo = document.getElementById("ra" + i + "_" + j);
			if (rdo.checked) 
			{
				bChecked = true;
			}
		}
		
		if (!bChecked) 
		{
			document.getElementById("ra" + i + "_1").focus();
			alert("[¹®Á¦] " + (i) +" ¹ø¿¡ ´äÀ» ÇÏ¿© ÁÖ½Ê½Ã¿À.");
			return false;
		}
	}	
	
	var Form1 = document.getElementById("Form1");
	Form1.action = "/bp/women/Test_selfcheck_sub_TR2.aspx?wid="+womenid+"&SelfCheck=" + selfCheck;
	Form1.submit();
}


function check_radio(num)
{
	if (app >= 3)
	{
		check_img = "imgcheck" + num;
		document.images[check_img].src= "/img/healthinfo/check_on.gif";
		return;
	}
}

function dummy()
{
	return;
}

function checkFormPalsy()
{
	//var weight = document.form_check.weight.value;
	var weight = document.Form1.weight.value;
	if(weight == "")
	{
		alert("¹®Á¦ 2¹ø¿¡ Ã¼ÁßÀ» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä.");
		//document.form_check.weight.focus();
		document.Form1.weight.focus();
		return;
	}
	if(isnumeric(weight) == false)
	{
		alert("¹®Á¦ 2¹ø¿¡ Ã¼ÁßÀ» ¼ýÀÚ·Î ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä."); 
		//document.form_check.weight.focus();
		document.Form1.weight.focus();
		return;
	}
	if(weight == "0")
	{
		alert("¹®Á¦ 2¹ø¿¡ Ã¼Áß¿¡ '0'°ªÀ» ÀÔ·ÂÇÏ½Ã¸é ¾ÈµË´Ï´Ù.");
		//document.form_check.weight.focus();
		document.Form1.weight.focus();
		return;
	}

	//var height = document.form_check.height.value;
	var height = document.Form1.height.value;
	if(height == "")
	{
		alert("¹®Á¦ 3¹ø¿¡ Å°¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä.");
		//document.form_check.height.focus();
		document.Form1.height.focus();
		return;
	}
	if(isnumeric(height) == false)
	{
		alert("¹®Á¦ 3¹ø¿¡ Å°¸¦ ¼ýÀÚ·Î ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä."); 
		//document.form_check.height.focus();
		document.Form1.height.focus();
		return;
	}
	if(height == "0")
	{
		alert("¹®Á¦ 3¹ø¿¡ Å°¿¡ '0'°ªÀ» ÀÔ·ÂÇÏ½Ã¸é ¾ÈµË´Ï´Ù.");
		//document.form_check.height.focus();
		document.Form1.height.focus();
		return;
	}
	
	//document.form_check.submit();
	document.Form1.submit();
}



function isnumeric(str)
{
	var str0 = "0123456789.";

	for (i=0; i<str.length; i++)
	{
		ch = str.charAt(i);
		for (j=0;  j< str0.length; j++)
      		if (ch == str0.charAt(j))
       			 break;
    	if (j == str0.length)			// ¿µ¹®¼ýÀÚ°¡ ¾Æ´Ñ°ÍÀÌ ÀÖÀ½
      		return false;
  	}
  	return true;
}

//-->
