<!--

	//-----------------------------------------------------------------------------
	// 정규식에 쓰이는 특수문자를 찾아서 이스케이프 한다.
	// @return : String
	//-----------------------------------------------------------------------------
	String.prototype.remove = function(pattern) {
		return (pattern == null) ? this : eval("this.replace(/[" + pattern.meta() + "]/g, \"\")");
	}

	//-----------------------------------------------------------------------------
	// 숫자와 영어만 허용 - arguments[0] : 추가 허용할 문자들
	// @return : boolean
	//-----------------------------------------------------------------------------
	String.prototype.isEngNum = function() {
		return (/^[0-9a-zA-Z,"_"]+$/).test(this.remove(arguments[0])) ? true : false;
	}

	//-----------------------------------------------------------------------------
	// 문자의 좌, 우 공백 제거
	// @return : String
	//-----------------------------------------------------------------------------
	String.prototype.trim = function() {
		return this.replace(/(^\s*)|(\s*$)/g, "");
	}

	//-----------------------------------------------------------------------------
	// 공백이나 널인지 확인
	// @return : boolean       (trim 함수가 꼭 있어야 함  자바스크립트는 trim 내장 함수가 없음)  
	//-----------------------------------------------------------------------------

	String.prototype.isBlank = function() {
		var blank = this.trim();
		for(var i = 0; i < blank.length; i++) {
			if ((blank.charAt(i) != "\t") && (blank.charAt(i) != "\n") && (blank.charAt(i)!="\r")) {
				return false;
			}
		}
		return true;
	}

	//-----------------------------------------------------------------------------
	// 영어만 허용 - arguments[0] : 추가 허용할 문자들
	// @return : boolean
	//-----------------------------------------------------------------------------

	String.prototype.isEng = function() {
		return (/^[a-zA-Z]+$/).test(this.remove(arguments[0])) ? true : false;
	}





	function zip_func(zip){
	window.open("./zip.html?addr_value="+zip,"freight_select","width=600,height=400,resize=yes,scrollbars=yes");//주소검색


	}

	function register(){

		if(document.getElementById('name').value.isBlank()){
			alert("이름을 입력하세요");
			document.getElementById('name').focus();
			return false;
		}else if(document.getElementById('title').value.isBlank()){
			alert("제목을 입력해 주세요.");
			document.getElementById('title').focus();
			return false;
		}else if(document.getElementById('zip1').value.isBlank()){
			alert("우편번호를 입력해 주세요.");
			document.getElementById('zip1').focus();
			return false;
		}else 	if(document.getElementById('zip2').value.isBlank()){
			alert("우편번호를 입력해 주세요");
			document.getElementById('zip2').focus();
			return false;
		}else 	if(document.getElementById('addr1').value.isBlank()){
			alert("주소를 입력해 주세요");
			document.getElementById('addr1').focus();
			return false;
		}else 	if(document.getElementById('addr2').value.isBlank()){
			alert("상세주소를 입력해 주세요");
			document.getElementById('addr2').focus();
			return false;
		}else 	if(document.getElementById('tel').value.isBlank()){
			alert("연락처를 입력해주세요.");
			document.getElementById('tel').focus();
			return false;
		}else 	if(document.getElementById('email').value.isBlank()){
			alert("이메일을 입력해 주세요.");
			document.getElementById('email').focus();
			return false;
		}

		
	document.contest_form.submit();		
		
	}

//-->