

	// 숫자만 입력
	function OnlyNumber() {
		var lkeycode = window.event.keyCode;

		if ( lkeycode == 13 ) {
			return;
		}

		var sOrg = String.fromCharCode(lkeycode);

		if(!sOrg.match(/^[\d|\.]/)) {
			window.event.keyCode = 0;
		}
		// if  (lkeycode < 48 || lkeycode > 57)
		// window.event.keyCode = 0;
	}

	// 포커스 이동
	function NextFocus(ThisValue, NextOBJ, length) {
		if (ThisValue.length == length) {
			NextOBJ.focus();
		}
		else {
			return;
		}
	}

	// 이미지 원문보기
	function showPicture(src) {
		var imgObj = new Image();
		imgObj.src = src;
		var wopt = "scrollbars=no,status=no,resizable=no";
		wopt += ",width=" + imgObj.width;
		wopt += ",height=" + imgObj.height;
		var wbody = "<head><title>사진 보기</title>";
		wbody += "<script language='javascript'>";
		wbody += "function finalResize(){";
		wbody += "  var oBody=document.body;";
		wbody += "  var oImg=document.images[0];";
		wbody += "  var xdiff=oImg.width-oBody.clientWidth+10;";
		wbody += "  var ydiff=oImg.height-oBody.clientHeight+10;";
		wbody += "  window.resizeBy(xdiff,ydiff);";
		wbody += "}";
		wbody += "</"+"script>";
		wbody += "</head>";
		wbody += "<body onLoad='finalResize()' style='margin:0'>";
		wbody += "<table border='0' cellpadding='0' cellspacing='0' width='100%' height='100%'>";
		wbody += "<tr>";
		wbody += "	<td valign='middle' align='center'>";
		wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>";
		wbody += "	</td>";
		wbody += "</tr>";
		wbody += "</table>";
		wbody += "</body>";
		winResult = window.open("about:blank","",wopt);
		winResult.document.open("text/html", "replace");
		winResult.document.write(wbody);
		winResult.document.close();
		return;
	}


	function show_tab(divid,dcnt,idx) {
		for(i=1;i<= dcnt; i++) {
			if(idx==i) {
				document.getElementById(divid + i).style.display = "block";
			} else {
				document.getElementById(divid + i).style.display = "none";
			}
		}
	}


	/********** 회원 관련 페이지 이동 함수 Start ***********/

	function UserLoginGo() {
		location.href = GlobalLoginURL;
	}

	function UserLogoutGo() {
		location.href = GlobalLogoutURL;
	}

	function UserJoinGo() {
		location.href = GlobalJoinURL;
	}

	function UserModifyGo() {
		location.href = GlobalModifyURL;
	}

	function UserFindIDGo() {
		UserFind = window.open( GlobalFindIDURL , 'idpwFind', 'width=340,height=317,left=350,top=320,resizable=0,scrollbars=0' );
		UserFind.focus();
		//location.href = GlobalFindIDURL;
	}

	function UserFindPWGo() {
		UserFind = window.open( GlobalFindPWURL , 'idpwFind', 'width=340,height=317,left=350,top=320,resizable=0,scrollbars=0' );
		UserFind.focus();
		//location.href = GlobalFindPWURL;
	}

	function UserDropGo() {
		UserDrop = window.open( GlobalDropURL , 'UserDrop', 'width=340,height=339,left=350,top=320,resizable=0,scrollbars=0' );
		UserDrop.focus();
	}

	// 이용약관
	function UserAgreeGo1() {
		location.href = GlobalAgree1URL;
//		UserAgree = window.open( UserAgreeURL , 'UserAgree', 'width=454,height=416,left=0,top=0,resizable=0,scrollbars=0' );
//		UserAgree.focus();
	}

	// 개인정보보호정책
	function UserAgreeGo2() {
		location.href = GlobalAgree2URL;
//		UserAgree = window.open( UserAgreeURL , 'UserAgree', 'width=454,height=416,left=0,top=0,resizable=0,scrollbars=0' );
//		UserAgree.focus();
	}

	function Warning_email() {
		var GlobalAgreeListURL = "/member/Warning_email.php";
		location.href = GlobalAgreeListURL;
	}

	function UserAddFavorite(url, site_name) {
		window.external.AddFavorite(url, site_name);
	}

	/********** 회원 관련 페이지 이동 함수 End ***********/


	/* 비공개 상담 */
	function ContactGo() {
		pop_contact = window.open( "/sub/contact.php" , 'pop_contact', 'width=580,height=510,resizable=0,scrollbars=0' );
		pop_contact.focus();
	}

	function setPng24(obj) {
		obj.width=obj.height=1;
		obj.className=obj.className.replace(/\bpng24\b/i,'');
		obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src+"',sizingMethod='image');"
		obj.src='';
		return '';
	}

	function add_file( ObjFileTable, upload_count, delete_code )
	{
		//var upload_count = 2;
		var objTbl;
		var objRow;
		var objCell;
		if (document.getElementById)
			objTbl = document.getElementById(ObjFileTable);
		else
			objTbl = document.all[ObjFileTable];

		if (upload_count && objTbl.rows.length >= upload_count) {
			alert("이 게시판은 "+upload_count+"개 까지만 파일 업로드가 가능합니다.");
			return;
		}

		if (delete_code) {
			objRow = objTbl.insertRow(objTbl.rows.length);
			objCell = objRow.insertCell(0);
			objCell.innerHTML += delete_code;
		}
	}

	function del_file( ObjFileTable )
	{
		// file_length 이하로는 필드가 삭제되지 않아야 합니다.
		var file_length = 1;
		var objTbl;

		if (document.getElementById)
			objTbl = document.getElementById(ObjFileTable);
		else
			objTbl = document.all[ObjFileTable];

		if (objTbl.rows.length > file_length) {
			objTbl.deleteRow(objTbl.rows.length - 1);
		}
		else {

		}
	}


	function UseFile(Obj, ObjFile, idx) {

		TargObj = document.getElementsByName(ObjFile);

		if (Obj.checked == true) {
			TargObj[idx].disabled = false;
		}
		else {
			TargObj[idx].disabled = true;
		}
	}


	function goProductPds(pc_num, pr_name) {
		location.href = "/html/04_data/data_01.php?search_ext10="+pc_num+"&search_ext9="+pr_name;
	}
	function goProductQna(pr_idx) {
		location.href = "/html/03_customer/customer_02.php?search="+pr_idx;
	}


