function ElectionMemberPopup(Srno)
{
	window.open("/Election/vote_detail_view.asp?Srno="+Srno, Srno, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0,width=800 ,height=600");
}

function AuthenticationPopup()
{
	var Total=0;

	if (document.all["ElectionMember"].length == undefined)
	{
		if(document.all["ElectionMember"].checked)
		{
			Total = document.all["ElectionMember"].value;
		}
	}
	else
	{		
		for(i=0;i<document.all["ElectionMember"].length;i++)
		{
			if(document.all["ElectionMember"](i).checked)
			{
				Total = document.all["ElectionMember"](i).value;
			}
		}
	}

	if(Total>0)
	{
		window.open("/Election/vote_Authentication.asp?Srno="+Total, Total, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0,width=497 ,height=350");
		return false;
	}
	else
	{
		alert("ÈÄº¸¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä");
		return false;
	}
}

function MemberAuthentication()
{
//	if(!CheckValue('Mobile','ÇÚµåÆù¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;
	if(!CheckValue('Name','ÀÌ¸§À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;
    if(!CheckValue('Jumin1','ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;
    if(!CheckValue('Jumin2','ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;

}

function MemberAuthenticationCheck()
{
	if(!CheckValue('Authentication','ÀÎÁõ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;
}

function CheckValue(controlid,message)
{
	var thisValue = document.all[controlid];
	var temp = "";
	string = '' + thisValue.value;
	splitstring = string.split(" ");
	for(i = 0; i < splitstring.length; i++)
	temp += splitstring[i];

	if(temp=="")
	{
		alert(message);
		thisValue.value="";
		thisValue.focus();
		return false;
	}
	else
	{
		return true;
	}
}

function VoteSearch()
{
	if(!CheckValue('KeyWord','°Ë»ö³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;
}



function RegistForm() {
	if(!CheckValue('MemberSrno','±âÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;
	if(!CheckValue('MemberDept','°ú¸¦ ¼±ÅÃÇÏ¿© ÁÖ¼¼¿ä')) return false;
	if(!CheckValue('MemberName','ÀÌ¸§À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;
	if(!CheckValue('Conts','³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;
}

function DelBoard(srno) {
  if (confirm("»èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\n»èÁ¦ÈÄ¿¡´Â º¹±¸µÇÁö ¾Ê½À´Ï´Ù."))
	{
		window.location.href='EelectionMemberDelete_ok.asp?Srno=' + srno;
	}
}

function SettingRegistForm()
{
	if(!CheckValue('Title','Å¸ÀÌÆ²À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;
	if(!CheckValue('ElectionFromDate','¼±°Å½ÃÀÛÀÏÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä')) return false;
	if(!CheckValue('ElectionToDate','¼±°ÅÁ¾·áÀÏÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä')) return false;
	if(!CheckValue('ConfirmFromDate','°³Ç¥½ÃÀÛÀÏÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä')) return false;
	if(!CheckValue('ConfirmToDate','°³Ç¥Á¾·áÀÏÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä')) return false;
}

function DelSetting(srno) {
  if (confirm("»èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\n»èÁ¦ÈÄ¿¡´Â º¹±¸µÇÁö ¾Ê½À´Ï´Ù."))
	{
		window.location.href='EelectionSettingDelete_ok.asp?Srno=' + srno;
	}
}

function AuthenticationForm()
{
	if(!CheckValue('Name','ÀÌ¸§À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;
	if(!CheckValue('Mobile','ÇÚµåÆùÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä')) return false;
}

function DelAuthentication(srno) {
  if (confirm("»èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\n»èÁ¦ÈÄ¿¡´Â º¹±¸µÇÁö ¾Ê½À´Ï´Ù."))
	{
		window.location.href='EelectionAuthenticationDelete_ok.asp?Srno=' + srno;
	}
}

function certAuthentication()
{
	if (document.all["Authentication"].length == undefined)
	{
		if(document.all["Authentication"].value == "")
		{
			alert("ÀÎÁõ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
			document.all["Authentication"].focus();
			return false;
		}
		return true;
	}
	else
	{	
		for(i=0; i<document.all["Authentication"].length; i++)
		{
			if(document.all["Authentication"](i).value == "")
			{
				alert("ÀÎÁõ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
				document.all["Authentication"](i).focus();
				return false;
			}
		}
		return true;
	}
}

function ElectionSearch()
{
    link = "/Election/vote_search.asp?ElectionYear=" + document.all["EelectionYear"].value;

	window.open(link, "", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0,width=500 ,height=200");
}

function ElectionPop()
{
	window.open("/Election/Check.asp?type=A", "", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0,width=1024 ,height=768");
}

function ElectionResult()
{
	window.open("http://kaphd.drline.net/Election/vote_cert.asp", "", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0,width=1024 ,height=768");
}

function voterequest()
{
	window.location.href = "/Election/vote_request_ok.asp?ElectionYear=" + document.all["EelectionYear"].value;
}

//¼ýÀÚ Ã¼Å©
function onlyNumber( el ) {
    el.value = el.value.replace( /\D/g, '' );

    //onkeyup="onlyNumber(this);"
}