//ID Áßº¹Ã¼Å©
function id_check() {
	document.reg_form.idcheckclick.value=0;
	if (document.reg_form.id.value=="")	{
		alert('Input ID');
		document.reg_form.id.focus();
		return;
	}else if(document.reg_form.id.value.length<4 || document.reg_form.id.value.length>12){
		alert('ID should be more than 4 letters and less than 12 letters');
		document.reg_form.id.focus();
		return;
	}else{
		open('/eng/member/popup_idcheck.asp?id='+document.reg_form.id.value,'','width=200,height=200')
		return;
	}
}

function id_check_1() {
	document.reg_form.idcheckclick.value=0;
	if (document.reg_form.id.value=="")	{
		alert('Input ID');
		document.reg_form.id.focus();
		return;
	}else if(document.reg_form.id.value.length<4 || document.reg_form.id.value.length>12){
		alert('ID should be more than 4 letters and less than 12 letters');
		document.reg_form.id.focus();
		return;
	}else{
		location.href('popup_idcheck.asp?id='+document.reg_form.id.value)
		return;
	}
}


//È¸¿ø °¡ÀÔ½Ã °¢°¢ÀÇ ¿ä¼Òµé Ã¼Å©
function member_reg_check() {
mform = document.reg_form

	//ID Ã¼Å©
		if(mform.id.value==""){
		alert('Please enter the ID');
		mform.id.focus();
		return;
		}

	//ID´Â 4ÀÚÀÌ»ó
		if(mform.id.value.length<4 || mform.id.value.length>12) {
		alert('ID is 4 characters long Please enter 12 characters or less');
		mform.id.focus();
		return;
		}

	//ID´Â English ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ °¡´É
		for (i = 0 ; i < mform.id.value.length ; i++) {
		if ((mform.id.value.charAt(i) < '0' || mform.id.value.charAt(i) > '9') && (mform.id.value.charAt(i) < 'a' || mform.id.value.charAt(i) > 'z')) {
		alert('ID numbers are available with an English case');
		mform.id.value="";
		mform.id.focus();
		return;
		}
		}

	//Password Ã¼Å©
		if(mform.pw.value==""){
		alert('Please enter Password');
		mform.pw.focus();
		return;
		}

	//Password 4ÀÚÀÌ»ó
		if(mform.pw.value.length<4 || mform.pw.value.length>12) {
		alert('Password at least 4 characters to 12 characters or fewer words');
		mform.pw.focus();
		return;
		}

	//Password´Â English ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ °¡´É
		for (j = 0 ; j < mform.pw.value.length ; j++) {
		if ((mform.pw.value.charAt(j) < '0' || mform.pw.value.charAt(j) > '9') && (mform.pw.value.charAt(j) < 'a' || mform.pw.value.charAt(j) > 'z')) {
		alert('Password English lowercase letters and numbers that are available');
		mform.pw.value="";
		mform.pw_re.value="";
		mform.pw.focus();
		return;
		}
		}

	//ÀçÈ®ÀÎ Password Ã¼Å©
		if(mform.pw_re.value==""){
		alert('Enter Password Sign reaffirmed.');
		mform.pw_re.focus();
		return;
		}

	//Password ÀÏÄ¡ Ã¼Å©
		if(mform.pw.value != mform.pw_re.value){
		alert('Password does not match.');
		mform.pw.focus();
		return;
		}

	//ÀÌ¸ÞÀÏ Ã¼Å©
		if(mform.email.value==""){
		alert('Please enter your email');
		mform.email.focus();
		return;
		}

		if(mform.email.value.search("@") == -1 || mform.email.value.indexOf(".")<1) {
		alert("Invalid email format")
		mform.email.focus();
		return;
		}

	//Name Ã¼Å©
		if(mform.name.value==""){
		alert('Please input name');
		mform.name.focus();
		return;
		}

	//ID Áßº¹ Ã¼Å© È®ÀÎ
		if(mform.idcheckclick.value == 0){
		alert('Please check ID');
		mform.id.focus();
		return;
		}
	//Phone¹øÈ£
		if (mform.tel.value == "" )
		{
			alert('Please input your telephone number');
			mform.tel.focus();
			return;
		}
	//Phone¹øÈ£,FAX ¹× ÈÞ´ëÆùÀº ¼ýÀÚ¸¸ °¡´É
		for (i = 0 ; i < mform.tel.value.length ; i++) {
		if(mform.tel.value.charAt(i) < '0' || mform.tel.value.charAt(i) > '9') {
		alert('Phone numbers are input numbers can be');
		mform.tel.focus();
		return;
		}
		}
		for (i = 0 ; i < mform.hp.value.length ; i++) {
		if(mform.hp.value.charAt(i) < '0' || mform.hp.value.charAt(i) > '9') {
		alert('Enter the phone number digits can be');
		mform.tel.focus();
		return;
		}
		}
		for (i = 0 ; i < mform.fax.value.length ; i++) {
		if(mform.fax.value.charAt(i) < '0' || mform.fax.value.charAt(i) > '9') {
		alert('FAX number is possible to enter the numbers');
		mform.tel.focus();
		return;
		}
		}
	//Address Ã¼Å©
		if(mform.zip.value==""){
		alert('Please enter Address');
		mform.zip.focus();
		return;
		}
		if(mform.address.value==""){
		alert('Please enter Address');
		mform.address.focus();
		return;
		}
	return true;
	//mform.submit();
}



function login_check() {

logform = document.login_form

	//ID Ã¼Å©
		if(logform.id.value==""){
		alert('Please enter the ID');
		logform.id.focus();
		return;
		}

	//Password Ã¼Å©
		if(logform.pw.value==""){
		alert('Please enter Password');
		logform.pw.focus();
		return;
		}
	logform.submit();
}



//È¸¿ø Á¤º¸ ¼öÁ¤½Ã °¢°¢ÀÇ ¿ä¼Òµé Ã¼Å©
function member_edit_check(para1) {

	// para1 ÀÇ °ª : 1 = Âü°¡½ÅÃ», 2 = Âü°ü½ÅÃ»

		mform = document.reg_form

	//Password Ã¼Å©
		if(mform.pw.value==""){
		alert('Please input Password');
		mform.pw.focus();
		return;
		}

	//Password 4ÀÚÀÌ»ó
		if(mform.pw.value.length<4 || mform.pw.value.length>12) {
		alert('Password should be more than 4 letters and less than 12 letters');
		mform.pw.focus();
		return;
		}

	//Password´Â English ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ °¡´É
		for (j = 0 ; j < mform.pw.value.length ; j++) {
		if ((mform.pw.value.charAt(j) < '0' || mform.pw.value.charAt(j) > '9') && (mform.pw.value.charAt(j) < 'a' || mform.pw.value.charAt(j) > 'z')) {
		alert('Password should be English small letters or number');
		mform.pw.value="";
		mform.pw_re.value="";
		mform.pw.focus();
		return;
		}
		}

	//ÀçÈ®ÀÎ Password Ã¼Å©
		if(mform.pw_re.value==""){
		alert('Please confirm your password again');
		mform.pw_re.focus();
		return;
		}

	//Password ÀÏÄ¡ Ã¼Å©
		if(mform.pw.value != mform.pw_re.value){
		alert('Password is not identical with');
		mform.pw.focus();
		return;
		}

		if (para1 == "1")
		{
			//Company Name  Ã¼Å©
			if(mform.company.value==""){
			alert('Please input your company¡¯s name');
			mform.company.focus();
			return;
			}
		}
		//Name or ´ã´çÀÚName Ã¼Å©
		if(mform.name.value==""){
			if (para1 == "1")
				alert('Please input manager¡¯s name');
			else
				alert('Please input name');
			mform.name.focus();
			return;
		}

		if (para1 == "1")
		{
			//´ã´çÀÚ Phone Ã¼Å©
			if(mform.hp.value==""){
			alert('Please input manager¡¯s phone');
			mform.hp.focus();
			return;
			}
		}

		//Address Ã¼Å©
		if(mform.zip.value==""){
		alert('Please input Zip code');
		mform.zip.focus();
		return;
		}
		if(mform.address.value==""){
		alert('Please input your address');
		mform.address.focus();
		return;
		}

	//´Ð³×ÀÓ Ã¼Å©
//		if(mform.nick.value==""){
//		alert('´Ð³×ÀÓÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä');
//		mform.nick.focus();
//		return;
//		}

	//Phone¹øÈ£
		if (mform.tel.value == "" )
		{
			alert('Please input your telephone number');
			mform.tel.focus();
			return;
		}

		/*
	//Phone¹øÈ£,FAX ¹× ÈÞ´ëÆùÀº ¼ýÀÚ¸¸ °¡´É
		for (i = 0 ; i < mform.tel.value.length ; i++) {
		if(mform.tel.value.charAt(i) < '0' || mform.tel.value.charAt(i) > '9') {
		alert('Phone¹øÈ£´Â ¼ýÀÚ¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù');
		mform.tel.focus();
		return;
		}
		}
		for (i = 0 ; i < mform.hp.value.length ; i++) {
		if(mform.hp.value.charAt(i) < '0' || mform.hp.value.charAt(i) > '9') {
		alert('ÇÚµåÆù¹øÈ£´Â ¼ýÀÚ¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù');
		mform.tel.focus();
		return;
		}
		}
		for (i = 0 ; i < mform.fax.value.length ; i++) {
		if(mform.fax.value.charAt(i) < '0' || mform.fax.value.charAt(i) > '9') {
		alert('FAX¹øÈ£´Â ¼ýÀÚ¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù');
		mform.tel.focus();
		return;
		}
		}
		*/

		//ÀÌ¸ÞÀÏ Ã¼Å©
		if(mform.email.value==""){
		alert('Please input your e-mail');
		mform.email.focus();
		return;
		}

		if(mform.email.value.search("@") == -1 || mform.email.value.indexOf(".")<3) {
		alert("Please check your e-mail address and correct it")
		mform.email.focus();
		return;
		}


	
	mform.submit();
}


//¼ýÀÚÃ¼Å©
function numcheck()
{
	if((event.keyCode < 48) || (event.keyCode > 57))
		event.returnValue = false;
}


//°Ô½ÃÆÇ ¾²±â Ã¼Å©
function board_write_check() {
	var a = document.board_reg_form
	if(a.name.value==""){
		alert('Please enter the name of');
		a.name.focus()
		return;
	}
	if(a.title.value==""){
		alert('Please enter a title');
		a.title.focus()
		return;
	}
	if (a.email.value!=""){
		if(a.email.value.search("@") == -1 || a.email.value.indexOf(".")<3) {
			alert("Invalid email format.")
			a.email.focus();
			return;
		}
	}
	if(a.content.value==""){
		alert('Enter information');
		a.content.focus()
		return;
	}
	if(a.pw.value==""){
		alert('Enter your Password');
		a.pw.focus()
		return;
	}
	a.submit();
}


//µ¡±Û ¾²±â Ã¼Å©
function comment_check(){
	var a = document.comment_form
	if(a.name.value==""){
		alert('Please enter a name');
		a.name.focus()
		return;
	}
	if(a.pw.value==""){
		alert('Please enter the Password');
		a.pw.focus()
		return;
	}
	if(a.content.value==""){
		alert('Please enter the Contents');
		a.content.focus()
		return;
	}
	a.submit();		
}




//¹®ÀÚ Å©±â Á¶Á¤ ÇÔ¼ö
var TitleCurrentFontSize = 12;
var ContentCurrentFontSize = 12;
var TitleCurrentLineHeight = 12;
var ContentCurrentLineHeight = 12;
function SetFontSize(SizeFlag) {
	
	obj = document.all;

	if (SizeFlag == '0') {
		TitleCurrentFontSize = TitleCurrentFontSize + 1;
		ContentCurrentFontSize = ContentCurrentFontSize + 1;
		TitleCurrentLineHeight = parseInt(TitleCurrentFontSize*1.6);
		ContentCurrentLineHeight = parseInt(ContentCurrentFontSize*1.6);
		obj.title.style.fontSize = TitleCurrentFontSize + "px";
		obj.title.style.lineHeight = TitleCurrentLineHeight + "px";
		obj.c_content.style.fontSize = ContentCurrentFontSize + "px";
		obj.c_content.style.lineHeight = ContentCurrentLineHeight + "px";

		
	} else {
		if ((TitleCurrentFontSize>0) && (ContentCurrentFontSize>0)) {
			TitleCurrentFontSize = TitleCurrentFontSize - 1;
			ContentCurrentFontSize = ContentCurrentFontSize - 1;
			TitleCurrentLineHeight = parseInt(TitleCurrentFontSize*1.6);
			ContentCurrentLineHeight = parseInt(ContentCurrentFontSize*1.6);
		}
		obj.title.style.fontSize = TitleCurrentFontSize + "px";
		obj.title.style.lineHeight = TitleCurrentLineHeight + "px";
		obj.c_content.style.fontSize = ContentCurrentFontSize + "px";
		obj.c_content.style.lineHeight = ContentCurrentLineHeight + "px";
	}
}






//È¸¿ø °¡ÀÔ½Ã °¢°¢ÀÇ ¿ä¼Òµé Ã¼Å©
function visit_join_check() {

	mform = document.reg_form

	//ID Ã¼Å©
	if(mform.id.value==""){
	alert('Please input ID');
	mform.id.focus();
	return false;
	}

	//ID´Â 4ÀÚÀÌ»ó
	if(mform.id.value.length<4 || mform.id.value.length>12) {
	alert('ID should be more than 4 letters and less than 12 letters');
	mform.id.focus();
	return false;
	}

	//ID´Â English ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ °¡´É
	for (i = 0 ; i < mform.id.value.length ; i++) {
	if ((mform.id.value.charAt(i) < '0' || mform.id.value.charAt(i) > '9') && (mform.id.value.charAt(i) < 'a' || mform.id.value.charAt(i) > 'z')) {
	alert('ID should be English small letters or number');
	mform.id.value="";
	mform.id.focus();
	return false;
	}
	}

	//Password Ã¼Å©
	if(mform.pw.value==""){
	alert('Please input Password');
	mform.pw.focus();
	return false;
	}

	//Password 4ÀÚÀÌ»ó
	if(mform.pw.value.length<4 || mform.pw.value.length>12) {
	alert('Password should be more than 4 letters and less than 12 letters');
	mform.pw.focus();
	return false;
	}

	//Password´Â English ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ °¡´É
	for (j = 0 ; j < mform.pw.value.length ; j++) {
	if ((mform.pw.value.charAt(j) < '0' || mform.pw.value.charAt(j) > '9') && (mform.pw.value.charAt(j) < 'a' || mform.pw.value.charAt(j) > 'z')) {
	alert('Password should be English small letters or number');
	mform.pw.value="";
	mform.pw_re.value="";
	mform.pw.focus();
	return false;
	}
	}

	//ÀçÈ®ÀÎ Password Ã¼Å©
	if(mform.pw_re.value==""){
	alert('Please confirm your password again');
	mform.pw_re.focus();
	return false;
	}

	//Password ÀÏÄ¡ Ã¼Å©
	if(mform.pw.value != mform.pw_re.value){
	alert('Password is not identical with');
	mform.pw.focus();
	return false;
	}
	
	//Name Ã¼Å©
	if(mform.name.value==""){
	alert('Please input name');
	mform.name.focus();
	return false;
	}
	
	//Address Ã¼Å©
	if(mform.zip.value==""){
	alert('Please input Zip code');
	mform.zip.focus();
	return false;
	}
	if(mform.address.value==""){
	alert('Please input your address');
	mform.address.focus();
	return false;
	}

	//Phone¹øÈ£
	if (mform.tel.value == "" )
	{
		alert('Please input your telephone number');
		mform.tel.focus();
		return false;
	}
	/*
	//Phone¹øÈ£ ¹× ÈÞ´ëÆùÀº ¼ýÀÚ¸¸ °¡´É
	for (i = 0 ; i < mform.tel.value.length ; i++) {
	if(mform.tel.value.charAt(i) < '0' || mform.tel.value.charAt(i) > '9') {
	alert('Phone¹øÈ£´Â ¼ýÀÚ¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù');
	mform.tel.focus();
	return false;
	}
	}
	*/

	//ÀÌ¸ÞÀÏ Ã¼Å©
	if(mform.email.value==""){
	alert('Please input email');
	mform.email.focus();
	return false;
	}
	if(mform.email.value.search("@") == -1 || mform.email.value.indexOf(".")<3) {
	alert("Please check your e-mail address and correct it")
	mform.email.focus();
	return false;
	}

	//ID Áßº¹ Ã¼Å© È®ÀÎ
	if(mform.idcheckclick.value == 0){
	alert('Please check ID');
	mform.id.focus();
	return false;
	}

	var bool = false;
	for(i =0 ; i < mform.etc1.length ; i++){
		if(mform.etc1[i].checked){
			bool = true;			
			break;
		}else{
			bool = false;
		}
	}
	if(!bool) {  
		alert("Please check Industries Represented.");
		return false;
	}

	var bool2 = false;
	for(i =0 ; i < mform.etc2.length ; i++){
		if(mform.etc2[i].checked){
			bool2 = true;			
			break;
		}else{
			bool2 = false;
		}
	}
	if(!bool2) {  
		alert("Please check Purpose of visit.");
		return false;
	}
	var bool3 = false;
	for(i =0 ; i < mform.etc3.length ; i++){
		if(mform.etc3[i].checked){
			bool3 = true;			
			break;
		}else{
			bool3 = false;
		}
	}
	if(!bool3) {  
		alert("Please check Product Interest.");
		return false;
	}
	var bool4 = false;
	for(i =0 ; i < mform.etc4.length ; i++){
		if(mform.etc4[i].checked){
			bool4 = true;			
			break;
		}else{
			bool4 = false;
		}
	}
	if(!bool4) {  
		alert("Please check How did you know this exhibition.");
		return false;
	}
	return true;


}
