 function onRegistration(flag)
{
	var frm = document.form1;
	var fullBirthDate = "";
	
	if(flag == 'E')
	{
		
		if(document.getElementById("pSexMw1").checked == false && document.getElementById("pSexMw2").checked == false && 
		document.getElementById("pSexMw3").checked == false && document.getElementById("pSexMw4").checked == false)
		{
			alert("This information is required.");
			document.getElementById("pSexMw1").focus();
			return;
		}
	
		///////////////////////////////////
		if(document.getElementById("pMbrClassCd1").checked == false && document.getElementById("pMbrClassCd2").checked == false && document.getElementById("pMbrClassCd3").checked == false)
		{
			alert("This information is required.");
			document.getElementById("pMbrClassCd1").focus();
			return;
		}
		/////////////////////////////////////////////////
		
		if(document.getElementById("pSmrCd1").checked == false && document.getElementById("pSmrCd2").checked == false && document.getElementById("pSmrCd3").checked == false)
		{
			alert("This information is required.");
			document.getElementById("pSmrCd1").focus();
			return;
		}
		/////////////////////////////////
		if(document.getElementById("pEvtCd1").checked == false && document.getElementById("pEvtCd2").checked == false && document.getElementById("pEvtCd3").checked == false && document.getElementById("pEvtCd4").checked == false)
		{
			alert("This information is required.");
			document.getElementById("pEvtCd1").focus();
			return;
		}
	
		
		
		///////////////////
		/*
		if(document.getElementById("pFstNm").value == '')
		{
			alert("This information is required.");
			document.getElementById("pFstNm").focus();
			return;
		}
		if(document.getElementById("pScndNm").value == '')
		{
			alert("This information is required.");
			document.getElementById("pScndNm").focus();
			return;
		}
		if(document.getElementById("pTrdNm").value == '')
		{
			alert("This information is required.");
			document.getElementById("pTrdNm").focus();
			return;
		}
		*/
		if(document.getElementById("pCtyNm").value == '')
		{
			alert("This information is required.");
			document.getElementById("pCtyNm").focus();
			return;
		}
	
		if(document.getElementById("pBirYear").value == '' && document.getElementById("pBirMonth").value == '' && document.getElementById("pBirDay").value == '')
		{
			alert("This information is required.");
			document.getElementById("pBirYear").focus();
			return;
		}
		
		
		
		if(document.getElementById("pDsnationNm").value == '')
		{
			alert("This information is required.");
			document.getElementById("pDsnationNm").focus();
			return;
		}
		
		if(document.getElementById("pInsttuNm").value == '')
		{
			alert("This information is required.");
			document.getElementById("pInsttuNm").focus();
			return;
		}
		
		
		
		if(document.getElementById("pTelNo").value == '')
		{
			alert("This information is required.");
			document.getElementById("pTelNo").focus();
			return;
		}
		
	
		
		
		
		if(document.getElementById("pEmail").value == '')
		{
			alert("This information is required.");
			document.getElementById("pEmail").focus();
			return;
		}
		
	
		
		
		
		var mailexp = /[a-z0-9]{2,}@[a-z0-9-]{2,}\.[a-z0-9]{2,}/i; 
 		if(!mailexp.test(form1.pEmail.value))
		 {
 			 alert("Check email format");
  			form1.pEmail.focus();
  			return;
 		 }
 		 	//»ý³â¿ùÀÏ ¼ÂÆÃ
 		 	fullBirthDate = frm.pBirYear.value + frm.pBirMonth.value + frm.pBirDay.value;
 		 	frm.pBdayDt.value = fullBirthDate;
			
			//±¹°¡¼±ÅÃ 		 	
			frm.action = "/eropa/main/EropaRegAction.do?method=save";
			frm.submit();		
		
	}
	else
	{
		if(document.getElementById("pFstNm").value == '')
		{
			alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿ä");
			document.getElementById("pFstNm").focus();
			return;
		}
		
		
		
		if(document.getElementById("pInsttuNm").value == '')
		{
			alert("¼Ò¼ÓÀ» ÀÔ·ÂÇÏ¼¼¿ä");
			document.getElementById("pInsttuNm").focus();
			return;
		}
		
		if(document.getElementById("pDsnationNm").value == '')
		{
			alert("Á÷À§¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
			document.getElementById("pDsnationNm").focus();
			return;
		}
		
		
		
		if(document.getElementById("pTelNo").value == '')
		{
			alert("Á÷Àå ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
			document.getElementById("pTelNo").focus();
			return;
		}
		
	
		
		if(document.getElementById("pEmail").value == '')
		{
			alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦  ÀÔ·ÂÇÏ¼¼¿ä");
			document.getElementById("pEmail").focus();
			return;
		}
		if(document.getElementById("pSmrCd1").checked == false && document.getElementById("pSmrCd2").checked == false && document.getElementById("pSmrCd3").checked == false)
		{
			alert("ÇÐ¼úÈ¸ÀÇ ÁÖÁ¦¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä");
			document.getElementById("pMbrClassCd1").focus();
			return;
		}
		var mailexp = /[a-z0-9]{2,}@[a-z0-9-]{2,}\.[a-z0-9]{2,}/i; 
 		if(!mailexp.test(form1.pEmail.value))
		 {
 			 alert("ÀÌ¸ÞÀÏ Çü½ÄÀÌ Æ²·È½À´Ï´Ù");
  			form1.pEmail.focus();
  			return;
 		 }
		
		//»ý³â¿ùÀÏ ¼ÂÆÃ
 		 	fullBirthDate = frm.pBirYear.value + frm.pBirMonth.value + frm.pBirDay.value;
 		 	frm.pBdayDt.value = fullBirthDate;
		frm.action = "/eropa/main/EropaRegAction.do?method=savekor";
		frm.submit();		
	}
	

	
	
}

function onOffCheckbox1(obj)
{
	var obj1 = document.getElementById("pSexMw1");
	var obj2 = document.getElementById("pSexMw2");
	
	if(obj1.checked == true && obj2.checked == true)
	{
		obj1.checked = false;
		obj2.checked = false;
		alert("Please choose only one");
	}
}

function onOffCheckbox2(obj)
{
	var obj1 = document.getElementById("pJobCd1");
	var obj2 = document.getElementById("pJobCd2");
	
	if(obj1.checked == true && obj2.checked == true)
	{
		obj1.checked = false;
		obj2.checked = false;
		alert("Please choose only one");
	}
}

function onOffCheckbox3(obj)
{
	var obj1 = document.getElementById("sMbrClassCd1");
	var obj2 = document.getElementById("sMbrClassCd2");
	var obj3 = document.getElementById("sMbrClassCd3");
	
	if(obj1.checked == true && obj2.checked == true || obj1.checked == true && obj3.checked == true || obj2.checked == true && obj3.checked )
	{
		obj1.checked = false;
		obj2.checked = false;
		obj3.checked = false;
		alert("Please choose only one");
	}
}

function onRegPop(flag)
{
	var url = "";
		if(flag == 'K')
		{
			url = "/eropa/main/EropaRegAction.do?method=listkor";
		}
		else
		{
			url = "/eropa/main/EropaRegAction.do?method=list";
		}
		LeftPosition = (screen.width) ? (screen.width-1024)/2 : 0; 
		TopPosition = (screen.height) ? (screen.height-768)/2 : 0; 		
		var regPop = window.open(url,"regPop","scrollbars=yes,resizable=yes,top="+TopPosition+",left="+LeftPosition+",width=800,height=1000");
		regPop.focus();		
}

function onConfpopClose(flag)
{
	var msg ="";
	if(flag == 'K')
	{
		msg = "Ã¢À» ´Ý½À´Ï±î?";
	}
	else
	{
		msg = "Continue?";
	}
	
	if(confirm(msg))
	{
		self.close();
	}	
}

function onConfPrint()
{
	var obj = document.getElementById("printArea");
	window.print(obj);
}

function onRegCancel(flag)
{
	var msg = "";
	if(flag == 'K')
	{
		msg = "µî·ÏÀ» Ãë¼ÒÇÏ½Ã°Ú½À´Ï±î?";
		if(confirm(msg))
		{
			self.close();
		}
	}
	else
	{
		msg = "Continue?";
		if(confirm(msg))
		{
			self.close();
		}
	}
}

function goHotel()
{

	var url = "http://www.ambatel.com/sofitel";
	LeftPosition = (screen.width) ? (screen.width-1024)/2 : 0; 
	TopPosition = (screen.height) ? (screen.height-768)/2 : 0; 		
	var hotelPop = window.open(url,"hotelPop","scrollbars=yes,resizable=yes,top="+TopPosition+",left="+LeftPosition+",width=800,height=800");
	hotelPop.focus();		
		
}


  