
	//********************************************************
	//### 로그인 폼으로 이동 ###
	//********************************************************
	function redirectLoginForm() {
		var url = location.href;
		var filename, return_url;

		filename = url.slice(url.lastIndexOf("/")+1, url.lastIndexOf("/")+15);

		if (filename == "login_form.asp") {
			return_url = "/member/login_form.asp";
		} else {
			return_url = "/member/login_form.asp?return_url="+encodeURIComponent(location.href);
		}

		location.href = return_url;
	}


	//********************************************************
	//### 로그인 폼으로 이동 (클릭 이벤트 발생시) ###
	//********************************************************
	function loginFormGo() {
		alert("로그인하십시오.");
		location.href = "/member/login_form.asp?return_url="+encodeURIComponent(location.href);
	}


	//********************************************************
	//### 원본사진보기 관련 스크립트 ###
	//********************************************************
	function openPictureView(src) {
		openWindow("/_common/popup/image_preview.asp?photoURL="+src, "picView", "width=100, height=100");
	}


	//********************************************************
	//### 원본사진보기 관련 스크립트 ###
	//********************************************************
	function getBrowser() {
		var appName;
		if (navigator.appName.indexOf("Microsoft") > -1) {
			if (navigator.appVersion.indexOf("MSIE 6") > -1) {
				appName = "IE6";
			} else if (navigator.appVersion.indexOf("MSIE 7")) {
				appName = "IE7";
			}
		} else {
			appName = "ETC";
		}

		return appName;
	}


	//********************************************************
	//### 사진 일정 크기에 맞게 크기조정 ###
	//********************************************************
	function resizeImageEditor(no, imgWidth) {
		if (!imgWidth) imgWidth = 600;
		var width = document.getElementById('editor_img'+no).width;
		if (width > imgWidth) {
			document.getElementById('editor_img'+no).width = imgWidth;
		}
	}


	//********************************************************
	//### 즐겨찾기에 주소 추가
	//********************************************************
	function addFavoriUrl(url, title) {
		var favoriteurl = url;
		var favoritetitle = title;
		window.external.AddFavorite(favoriteurl,favoritetitle);
	}


	//********************************************************
	//### 시작페이지 등록
	//********************************************************
	function addStartPage(obj) {
		obj.style.behavior='url(#default#homepage)';
		obj.setHomePage('http://www.starlike.co.kr');
	}







	//********************************************************
	//### 팝업 스크립트 ###
	//********************************************************
	// openWindow('[URL]','[window Name]','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=100,height=100')"
	function openWindow(theURL, winName, features) {
		window.open(theURL, winName, features);
	}

	function MM_openBrWindow(theURL,winName,features) { //v2.0
		window.open(theURL,winName,features);
	}




	//********************************************************
	//### Display block/none 스크립트 ==
	//********************************************************
	function ChoiceTab(v1,v2,v3){
		for (i=1; i<=parseInt(v3); i++){
			if( parseInt(v2) == i ){
				eval("document.all."+v1+"_"+i+".style").display = "block";
			}else{
				eval("document.all."+v1+"_"+i+".style").display = "none";
			}
		}
	}



	function ChoiceImg(v1, v2, v3) {
		var obj, i;

		for (i=1; i<=v3; i++) {
			obj = document.getElementById(v1+"_"+i)
			if (v2 == i) {
				obj.style.filter = "";		//선택되었을경우 스타일
			} else {
				obj.style.filter = "gray() alpha (opacity=50)";		//선택되지 않았을경우 스타일
			}
		}
	}




	//********************************************************
	//### <BLINK> 태그 스크립트 ###
	//********************************************************
	function doBlink() {
		var blink = document.all.tags("BLINK")
		for (var i=0; i < blink.length; i++)
		blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
	}

	function startBlink() {
		if (document.all)
		setInterval("doBlink()",500)  // 깜빡이는 속도(높을수록 천천히 깜빡임..숫자만 바꿔주세요~)
	}



	
	//********************************************************
	//### 링크 클릭하면 생기는 점선 한방에 없애기
	//********************************************************
	function bluring(){ 
		if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
	} 
	document.onfocusin=bluring; 




	//********************************************************
	//### 롤오버 관련
	//********************************************************
	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}

	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}


	//********************************************************
	//### 마우스오버시 이미지 서서히 바뀌기
	//********************************************************
	function bt(id,after) 
	{ 
		eval(id+'.filters.blendTrans.stop();'); 
		eval(id+'.filters.blendTrans.Apply();'); 
		eval(id+'.src="'+after+'";'); 
		eval(id+'.filters.blendTrans.Play();'); 
	} 




	//********************************************************
	//### select 링크
	//********************************************************
	function MM_jumpMenu(targ,selObj,restore){ //v3.0
		if(selObj.options[selObj.selectedIndex].value!=""){
			window.open(selObj.options[selObj.selectedIndex].value);
		  if (restore) selObj.selectedIndex=0;
		 }
	}




	//********************************************************
	// SEARCH MENU script
	//********************************************************
	function defaultStatus() {
		var menu = document.all.menu;
		for (var i=0;i<menu.length;i++){
			document.all.menu[i].style.border = "1px solid #ACACAC";
			document.all.menu[i].style.color = "#FFFFFF";
			document.all.menu[i].style.backgroundColor = "#ACACAC";
		}
	}

	function mouseOnTD(obj, objcolor) {
		obj.style.border = "1px solid #ACACAC";
		obj.style.color = "#000000";
		obj.style.backgroundColor = objcolor;
		obj.style.cursor = "hand";
	}

	function ClickOnTD(obj, objcolor, page) {
		obj.style.border = "1px solid #ACACAC";
		obj.style.color = "#000000";
		obj.style.backgroundColor = objcolor;
		obj.style.cursor = "hand";
		location.href= page;
	}




	//*********************************************************************
	//### fm(src,id,w,h,t,m)
	// src:파일 경로, id:플래시 무비 아이디, w:너비, h:높이, 
	// t:배경 투명여부(Y:투명, N:불투명), m:메뉴 표시여부(Y:표시, N:미표시)
	//*********************************************************************
	function FlashPlayer(src, id, w, h, t, m) {	
		var s = '';
		var s_id = '';
		var s_t = '';
		(id == "") ? s_id="swf" : s_id = id;
		(t == "Y") ? s_t = '<param name="wmode" value="transparent">' : s_t='';
		(m == "Y") ? m = 'true' : m = 'false';

		s += '<object type="application/x-shockwave-flash" ';
		s += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
		s += 'codebase="http://fpdownload.macromedia.com/';
		s += 'pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"';
		s += 'id="'+s_id+'" width="'+w+'" height="'+h+'">';

		s += '<param name="movie" value="'+src+'">';
		s += '<param name="quality" value="high">';	
		s += s_t;
		s += '<param name="menu" value="'+m+'">';
		s += '<param name="swliveconnect" value="true">';

		s += '<embed src="'+src+'" quality="high" menu="'+m+'" ';
		s += 'width="'+w+'" height="'+h+'" swliveconnect="true" ';
		s += 'id="'+s_id+'" name="'+s_id+'" type="application/x-shockwave-flash" ';
		s += 'pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';

		s += '<\/object>';
		document.write(s);
	}


	function flash(name,width,height){
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+width+'" height="'+height+'">');
		document.write('<param name=movie value="'+name+'">');
		document.write('<param name=quality value=high>');
		document.write('<param name=wmode value=transparent>');
		document.write('<embed src="'+name+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'">');
		document.write('</embed>'); 
		document.write('</object>');
	}




	//********************************************************
	//### 동영상
	//********************************************************
	function MoviePlayer(src,w,h) {
		document.write('<embed src="'+src+'" width='+w+' height='+h+'></embed>')
	}










	//********************************************************
	//### Trim 함수
	// Ex) str = "    테 스트   ".trim(); => str = "테 스트";
	//********************************************************
	String.prototype.trim = function() {
		return this.replace(/(^\s*)|(\s*$)/g, "");
	}



	//********************************************************
	//### 문자열 공백제거 함수
	// Ex) str = "    테 스   트   ".stripspace(); => str = "테스트";
	//********************************************************
	String.prototype.stripspace = function() {
		return this.replace(/ /g, "");
	}



	//********************************************************
	//### 키 관련 함수
	//********************************************************
	function blockKey() {
		event.returnValue = false;
	}

	function blockEnter() {
		if (event.keyCode == 13) event.keyCode = 0;
	}



	//********************************************************
	//### 공백 확인
	//********************************************************
	function checkEmpty(item) {
		if (item.value.stripspace() == "") {
			return true;
		}
		else {
			return false;
		}
	}



	//********************************************************
	//### URL 확인
	//********************************************************
	function checkUrl(url) {
		var exp = new RegExp("^(http|HTTP)\:\/\/");
		if (exp.test(url)) {
			return true;
		}
		else {
			return false;
		}
	}

	//********************************************************
	//### MMS 확인
	//********************************************************
	function checkMediaUrl(url) {
		var exp = new RegExp("^(mms|MMS)\:\/\/");
		if (exp.test(url)) {
			return true;
		}
		else {
			return false;
		}
	}



	//********************************************************
	//### 숫자만을 입력할 수 있도록 체크
	//********************************************************
	function OnlyNumber() {
		if ((event.keyCode < 48) || (event.keyCode > 57))
			event.returnValue = false;
	}



	//********************************************************
	//### 이메일 체크 스크립트
	//********************************************************
	function checkEmail(strEmail) {	
		var arrMatch = strEmail.match(/^(\".*\"|[A-Za-z0-9_-]([A-Za-z0-9_-]|[\+\.])*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z0-9][A-Za-z0-9_-]*(\.[A-Za-z0-9][A-Za-z0-9_-]*)+)$/);

		if (arrMatch == null) {
			return false;
		}

		var arrIP = arrMatch[2].match(/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/);

		if (arrIP != null) {
			for (var i = 1; i <= 4; i++) {
				if (arrIP[i] > 255) {
					return false;
				}
			}
		}
		return true;
	}


	function checkEmail2(str) {
		var rxEmail =/^\s*[\w\~\-\.]+\@[\w\~\-]+(\.[\w\~\-]+)+\s*$/g;
		if( !rxEmail.test(str) ) return false;
		return true;
	}

	
	
	//********************************************************
	//### 한글 이외의 캐릭터가 있을경우 false
	//********************************************************
	function checkKoreanOnly( koreanChar ) {
		
		if ( koreanChar == null ) return false ;
		
		for(var i=0; i < koreanChar.length; i++) {
			
			var c=koreanChar.charCodeAt(i); 

			//( 0xAC00 <= c && c <= 0xD7A3 ) 초중종성이 모인 한글자 
			//( 0x3131 <= c && c <= 0x318E ) 자음 모음 
			
			if( !( ( 0xAC00 <= c && c <= 0xD7A3 ) || ( 0x3131 <= c && c <= 0x318E ) ) ) {
				return false ;
			}
		}  
		return true;
	}


	//********************************************************
	//### 영문 이외의 캐릭터가 있을경우 false
	//********************************************************
	function checkEnglishOnly( englishChar ) {
		
		if ( englishChar == null ) return false;
		
		for( var i=0; i < englishChar.length;i++) {
			
			var c=englishChar.charCodeAt(i);
			
			if( !( (  0x61 <= c && c <= 0x7A ) || ( 0x41 <= c && c <= 0x5A ) ) ) {
				return false;
			}
		}
		return true;
	}	 


	//********************************************************
	//### 숫자 이외의 캐릭터가 있을경우 false 
	//********************************************************
	function checkNumberOnly( digitChar ) {
		
		if ( digitChar == null ) return false;
		
		for(var i=0;i<digitChar.length;i++) {
			
			var c=digitChar.charCodeAt(i);
			
			if( !(  0x30 <= c && c <= 0x39 ) ) {
				return false;
			}
		}
		return true;
	}


	//********************************************************
	//### 문자열을 바이트(byte) 단위로 길이 측정
	//********************************************************
	function getByteLength(str) {
		var byteLength = 0;
		for (var inx = 0; inx < str.length; inx++) {
			var oneChar = escape(str.charAt(inx));
			if ( oneChar.length == 1 ) {
				byteLength ++;
			} else if (oneChar.indexOf("%u") != -1) {
				byteLength += 2;
			} else if (oneChar.indexOf("%") != -1) {
				byteLength += oneChar.length/3;
			}
		}
		return byteLength;
	}


	//********************************************************
	//### 주민등록번호가 올바른지 체크
	//********************************************************
	function IDNumberCheck(number) {
		var sum=0;
		for(i=0;i<8;i++) { sum+=number.substring(i,i+1)*(i+2); }
		for(i=8;i<12;i++) { sum+=number.substring(i,i+1)*(i-6); }
		sum=11-(sum%11);

		if (sum>=10) { sum-=10; }

		if (number.substring(12,13) != sum || (number.substring(6,7) !=1 && number.substring(6,7) != 2)) {
			return false;
		}
		return true;
	}


	//********************************************************
	//### 문자열에 특수문자가 포함되었는지 체크('-' 포함)
	//********************************************************
	function inputCheckSpecial(string) {
		strMatch=/[~!@\#$%^&*\()\=+|\\/:;?"<>']/gi;
		if(strMatch.test(string)) {
			return false;
		}
		return true;
	}


	//********************************************************
	//### 문자열의 양쪽에 포함된 공백 제거
	//********************************************************
	function trim(str) {
		var strtmp = "";
		var s, e;

		if (str != "")
		{
			for (i=0; i < str.length; i++)
			if (str.charAt(i) != " ") {
			s = i; break;
			}
			for(i = str.length - 1; i >= 0; i--)
			if (str.charAt(i) != " ") {
			e = i; break;
			}
			for (i=s; i <= e; i++)
			strtmp = strtmp + str.charAt(i);
		}
		return strtmp;
	}



	//********************************************************
	//### 문자열의 왼쪽부터 정해진 길이만큼 Byte단위 자르기
	//********************************************************
	function LeftCutString(str,max) {
		var tmpStr;
		var temp=0;
		var onechar;
		var tcount;
		tcount = 0;

		tmpStr = new String(str);
		temp = tmpStr.length;

		for(k=0;k<temp;k++) {
			onechar = tmpStr.charAt(k);

			if(escape(onechar).length > 4) {
				 tcount += 2;
			}
			else if(onechar!='\r') {
				 tcount++;
			}
			
			if(tcount>max) {
				 tmpStr = tmpStr.substring(0,k);
				 break;
			}
		}

		return tmpStr;
	}




	//********************************************************
	//### 이미지파일인지 체크
	//********************************************************
	function imgCheck(v) {
		var filename = v;
		var ext = filename.substring(filename.lastIndexOf(".") + 1);
		switch (ext.toLowerCase()) {
			case "jpg":
			case "bmp":
			case "gif":
			case "png":
				break;
			default:
				return false;
		}

		return true;
	}




	//********************************************************
	//### 파일 크기(용량) 알아내기 Internet Explorer 7 에서 작동 안됨
	//********************************************************
	function getFileSize(path) {
		var img = new Image();
		//img.dynsrc = path;
		img.src = path;
		return img.fileSize;
	}







	//**********************************************
	//### XML로 웹페이지 가져오기 ###
	//**********************************************
	function getXmlHttp(layer, url)
	{
		var xmlHttp = false;
		if (window.XMLHttpRequest)
		{
			xmlHttp = new XMLHttpRequest();
		}
		else
		{
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}

		xmlHttp.open("GET", url, true);
		xmlHttp.setRequestHeader('Content-Type','text/html; charset=euc-kr');
		xmlHttp.onreadystatechange = function(){
			if(xmlHttp.readyState == 4){
				if(xmlHttp.status == 200){			
					document.getElementById(layer).innerHTML = xmlHttp.responseText;
				}
			}
		}
		xmlHttp.send(null);
	}







	//**********************************************
	//### 소수점 이하 처리 함수 ###
    //@param intTarget      대상
    //@param intCutPosition 소수점 자리 수
	//**********************************************
	function CutDecimalPoint(intTarget, intCutPosition) {
		var intResult = 0;
		var strTarget = String(intTarget).split('.');
		if(strTarget[1]!=null && strTarget[1].length > intCutPosition) {
			strTarget[1] = strTarget[1].slice(0, intCutPosition);
		}else{
			strTarget[1] = "00";
		}
		intResult = Number(strTarget[0]+'.'+strTarget[1]);
		return intResult;
	} 


