<!--
	function goSubmit(thiswork, thisseq){
		var theForm = document.theform
		theForm.work.value = thiswork;
		theForm.seq.value = thisseq;
		var workArr = thiswork.split("_");
		workMenu = workArr[0];
		workType = workArr[1];

		if(thiswork=="boardadmin_delete"){
			if(!confirm('해당 데이터도 모두 삭제됩니다 \n\n삭제하시겠습니까?')){ return; }
		} else if(workType=="delete"){
			if(!confirm('삭제하시겠습니까?')){ return; }
		}
		if (workMenu=="board")	{
			if(thiswork!="board_delete"){
				if (theForm.title.value==""){alert('제목을 입력하세요!');theForm.title.focus();return;}
				if (theForm.detail.value==""){alert('내용을 입력하세요!');theForm.detail.focus();return;}
			}
			theForm.action="/work_board.php";
		} else if (workMenu=="boardadmin") {
			if(thiswork!="boardadmin_delete"){
				if (theForm.checkCode.value==0){alert('이미 사용중인 코드입니다!');theForm.boardcode.focus();return;}
				if (theForm.boardcode.value==""){alert('코드를 입력하세요!');theForm.boardcode.focus();return;}
				if (theForm.title.value==""){alert('제목을 입력하세요!');theForm.title.focus();return;}
			}
			theForm.action="work_board.php";
		} else if (workMenu=="market") {
			if(thiswork!="market_delete"){
				if (theForm.title.value==""){alert('제목을 입력하세요!');theForm.title.focus();return;}
				if (theForm.price.value==""){alert('희망가격을 입력하세요!');theForm.price.focus();return;}
				if (theForm.detail.value==""){alert('내용을 입력하세요!');theForm.detail.focus();return;}
			}
			theForm.action="/work_board.php";
		} else if (workMenu=="content") {
			if(thiswork!="content_delete"){
				if (theForm.commtype.value==""){alert('분류를 선택하세요!');theForm.commtype.focus();return;}
				if (theForm.contentcode.value==""){alert('코드를 입력하세요!');theForm.contentcode.focus();return;}
				if (theForm.title.value==""){alert('제목을 입력하세요!');theForm.title.focus();return;}
			}
			theForm.action="work_content.php";
		} else if (workMenu=="event") {
			if(thiswork!="content_delete"){
				if (theForm.commtype.value==""){alert('분류를 선택하세요!');theForm.commtype.focus();return;}
				if (theForm.title.value==""){alert('제목을 입력하세요!');theForm.title.focus();return;}
			}
			theForm.action="work_content.php";
		} else if (workMenu=="popup") {
			if(thiswork!="popup_delete"){
				//if (theForm.position.value==""){alert('위치를 선택하세요!');theForm.position.focus();return;}
				if (theForm.title.value==""){alert('제목을 입력하세요!');theForm.title.focus();return;}
				if (theForm.width.value==""){alert('넓이를 입력하세요!');theForm.width.focus();return;}
				if (theForm.height.value==""){alert('높이를 입력하세요!');theForm.height.focus();return;}
				if (theForm.top.value==""){alert('상단간격을 입력하세요!');theForm.top.focus();return;}
				if (theForm.left.value==""){alert('왼쪽간격을 입력하세요!');theForm.left.focus();return;}
			}
			theForm.action="work_content.php";
		} else if (workMenu=="staff")	{
			theForm.action="work_admin.php";
		} else if (workMenu=="code") {
			if(thiswork!="code_delete"){
				if (theForm.commtype.value==""&&theForm.commtypeNew.value==""){alert('분류를 선택 또는 입력하세요!');theForm.commtype.focus();return;}
				if (theForm.commtypeNew.value!=""&&theForm.commtypeName.value==""){alert('분류제목을 입력하세요!');theForm.commtypeName.focus();return;}
				if (theForm.checkCode.value==0&&theForm.checkCodeType.value==0){alert('이미 사용중인 코드입니다!');theForm.commtype.focus();return;}
				if (theForm.commcode.value==""){alert('코드를 입력하세요!');theForm.commcode.focus();return;}
				if (theForm.title.value==""){alert('제목을 입력하세요!');theForm.title.focus();return;}
			}
			theForm.action="work_admin.php";
		} else if (workMenu=="ad"||workMenu=="payment") {
			if(thiswork!="ad_delete"&&thiswork!="payment_delete"){
				if (theForm.title.value==""){alert('제목을 입력하세요!');theForm.title.focus();return;}
				if (theForm.detail.value==""){alert('내용을 입력하세요!');theForm.detail.focus();return;}
				if (theForm.url.value==""){alert('url 을 입력하세요!');theForm.url.focus();return;}
				if(thiswork=="ad_modify"){
					option = "N";
					for(i=0;i<theForm.tCount.value;i++){
						optionAr = eval("theForm.option_"+i+"");
						if(optionAr.checked==true){option = "Y";}
					}
					if (theForm.category.value==""&&option=="N"){alert('위치를 선택하세요!');theForm.category.focus();return;}
					if(!confirm(' 광고신청하시겠습니까?')){return;}
				}
			}
			theForm.action="work_ad.php";
		} else if (workMenu=="member")	{
			if(thiswork!="member_delete"){
				if(thiswork=="member_insert"){
					if (theForm.joinname.value==""){alert('이름을 입력하세요!');theForm.joinname.focus();return;}
					if (theForm.joinuserid.value==""){alert('아이디를 입력하세요!');theForm.joinuserid.focus();return;}
					if (theForm.useridConfirm.value==0){alert('아이디중복확인을 하세요!');return;}

					if (theForm.jumin1.value==""){alert('주민번호를 입력하세요!');theForm.jumin1.focus();return;}
					if (theForm.jumin2.value==""){alert('주민번호를 입력하세요!');theForm.jumin2.focus();return;}
					juminCheck();
					//if (theForm.juminConfirm.value==0){alert('실명확인인증을하세요!');return;}

					if (theForm.passwd.value==""){alert('비밀번호를 입력하세요!');theForm.passwd.focus();return;}
					if (theForm.passwd2.value==""){alert('비밀번호 확인란을 입력하세요!');theForm.passwd2.focus();return;}
					//if (theForm.name.value==""){alert('이름을 입력하세요!');theForm.name.focus();return;}
				}
				if (theForm.passwd.value!=theForm.passwd2.value){alert('비밀번호 확인값이 서로 다릅니다.!');theForm.passwd.focus();return;}
				/*
				if (theForm.phone1.value==""||theForm.phone2.value==""||theForm.phone3.value==""){alert('연락처를 입력하세요!');theForm.phone1.focus();return;}
				if (theForm.mobile1.value==""||theForm.mobile2.value==""||theForm.mobile3.value==""){alert('휴대폰번호를 입력하세요!');theForm.mobile1.focus();return;}
				if (theForm.email1.value==""){alert('이메일을 입력하세요!');theForm.email1.focus();return;}
				if (theForm.email3.value=="direct"){
					if (theForm.email2.value==""){alert('이메일을 입력하세요!');theForm.email2.focus();return;}
				}
				if (theForm.zip1.value==""||theForm.zip2.value==""||theForm.address1.value==""){alert('우편번호를 검색해 주세요!');theForm.zipcode.focus();return;}
				if (theForm.address2.value==""){alert('주소를 입력하세요!');theForm.address2.focus();return;}
				*/
			}
			theForm.action="/work_member.php";
		} else if (workMenu=="point")	{
			theForm.action="work_member.php";
		} else if (workMenu=="flag") {
			if(thiswork!="flag_delete"){
				thememo = "";
				for(i=0;i<theForm.memoCount.value;i++){
					thismemo = eval("theForm.memo_"+i+"");
					if(thismemo.checked==true){thememo += "|"+thismemo.value+"|";}
				}
				if (thememo==""){alert('1개이상 체크하세요');return;}
				if (theForm.applyemail.value==""){alert('이메일을 입력하세요!');theForm.applyemail.focus();return;}
				theForm.memovalue.value = thememo;
			}
			theForm.action="work_board.php";
		}

		theForm.target="hiddenframe";
		if(theForm.action==""){theForm.action="work.php";}
		theForm.submit();
	}

	function goView(thismenu, thiscode, thisseq, thispage){
		location.href="./?menu="+thismenu+"&code="+thiscode+"&seq="+thisseq+"&page="+thispage;
	}

	function goRead(thismenu, thiscode, thisseq){
		location.href="view.php?menu="+thismenu+"&code="+thiscode+"&seq="+thisseq;
	}

	function goEdit(thismenu, thiscode, thisseq){
		location.href="edit.php?menu="+thismenu+"&code="+thiscode+"&seq="+thisseq;
	}

	function goFlag(thismenu, thiscode, thisseq){
		location.href="flag.php?menu="+thismenu+"&code="+thiscode+"&seq="+thisseq;
	}

	function goInsert(thismenu, thiscode){
		location.href="./?menu="+thismenu+"&code="+thiscode+"&work=write";
	}

	function goList(thismenu, thiscode, thispage){
		location.href="./?menu="+thismenu+"&code="+thiscode+"&page="+thispage;
	}

	function goReply(thiscode, thisseq){
		location.href="reply.php?code="+thiscode+"&seq="+thisseq;
	}

	function goSendmail(thiswork){
		var theForm = document.theform;
		if(thiswork=="post") {
			var sendmail = theForm.sendemail.value;
			if (sendmail==""){alert('이메일을 입력하세요!');theForm.sendemail.focus();return;}
			var thiscode = theForm.code.value;
			var thisseq = theForm.seq.value;
			hiddenframe.location.href="work_member.php?work=post_sendmail&code="+thiscode+"&seq="+thisseq+"&email="+sendmail;
		} else if(thiswork=="reply"){
			theForm.work.value = "reply_sendmail";
			theForm.target="hiddenframe";
			theForm.method="post";
			theForm.action="work_member.php";
			theForm.submit();
		}
	}

	function goDelete(thiscode, thisseq){
		if(!confirm('이 포스트를 삭제하시겠습니까?')){ return; }
		hiddenframe.location.href="work_board.php?work=board_delete&code="+thiscode+"&seq="+thisseq;
	}

	function getDownload(thislink, thismenu, thiscode, thisfile, thissource){
		hiddenframe.location.href=""+thislink+"/download.php?menu="+thismenu+"&code="+thiscode+"&filename="+thisfile+"&filesource="+thissource;
	}


	function goPosting(){
		var theForm = document.theform
		var sdate = theForm.syear.value+"-"+theForm.smonth.value+"-"+theForm.sday.value;
		var edate = theForm.eyear.value+"-"+theForm.emonth.value+"-"+theForm.eday.value;
		for(i=0;i<theForm.term.length;i++){
			if(theForm.term[i].checked==true){
				thisterm = theForm.term[i].value;
			}
		}
		if(thisterm=="all"){sdate=edate='';}
		location.href="posting.php?sdate="+sdate+"&edate="+edate+"&term="+thisterm;
	}

	function goSearch(){
		var theForm = document.theform
			theForm.method="post";
			theForm.action="/shop/search.php";
			theForm.submit();
	}

	function goSearchAdmin(){
		var theForm = document.theform
		theForm.page.value=1;
		theForm.method="get";
		theForm.action=".";
		theForm.submit();
	}

	function popupCenter(thisfile, thispopup, thiswidth, thisheight, thisscroll){
//alert(document.body.clientHeight+"_"+document.body.clientWidth);
//alert(document.body.offsetHeight+"_"+document.body.offsetWidth);
		var top = (document.documentElement.offsetHeight  - thisheight) / 2;
		var left = (document.documentElement.offsetWidth - thiswidth) / 2;
		window.open(thisfile, thispopup ,"width="+thiswidth+",height="+thisheight+",top="+top+",left="+left+",scrollbars="+thisscroll+"");
	}

	function checkUserid(){
		var theForm = document.theform
		var userid =theForm.joinuserid.value;
		if(userid==""){alert('아이디를 입력하세요!');theForm.joinuserid.focus();return;}
		hiddenframe.location.href="../work_member.php?work=checkUserid&userid="+userid;
	}

	function setClear(thisfield){
		var theForm = document.theform
		var theField = eval("theForm."+thisfield+"");
		theField.value="";
		if(thisfield=="userid"){theForm.useridConfirm.value=0;}
		if(thisfield=="jumin1"||thisfield=="jumin2"){theForm.useridConfirm.value=0;}
		return;
	}

	//회원가입시 이름, 주민번호 체크
	function juminCheck() {
		var theForm = document.theform;
		var ju1 = eval("theForm.jumin1");
		var ju2 = eval("theForm.jumin2");
		var juminConfirm = eval("theForm.juminConfirm");

		if (ju1.value == "" || ju1.value.length != 6) {alert("주민등록번호 앞 자리를 입력해주세요.");ju1.focus(); return false;}
		if (ju2.value == "" || ju2.value.length != 7) {alert("주민등록번호 뒷 자리를 입력해주세요.");ju2.focus(); return false;}
		
		var a1=ju1.value.substring(0,1)
		var a2=ju1.value.substring(1,2)
		var a3=ju1.value.substring(2,3)
		var a4=ju1.value.substring(3,4)
		var a5=ju1.value.substring(4,5)
		var a6=ju1.value.substring(5,6)
		var check_digit=a1*2+a2*3+a3*4+a4*5+a5*6+a6*7
		var b1=ju2.value.substring(0,1)
		var b2=ju2.value.substring(1,2)
		var b3=ju2.value.substring(2,3)
		var b4=ju2.value.substring(3,4)
		var b5=ju2.value.substring(4,5)
		var b6=ju2.value.substring(5,6)
		var b7=ju2.value.substring(6,7)
		var check_digit=check_digit+b1*8+b2*9+b3*2+b4*3+b5*4+b6*5 
		check_digit = check_digit%11
		check_digit = 11 - check_digit
		check_digit = check_digit%10
		if (check_digit != b7){alert('잘못된 주민등록번호입니다.\n\n다시 확인하시고 입력해 주세요.');ju1.focus();juminConfirm.value=0;return;}
		else {/*alert('실명인증되었습니다.');*/juminConfirm.value=1;}
		return true;
	}

	function useEmail(thisvalue){
		if(thisvalue=="direct"){email2nd.style.display='block';}
		else {email2nd.style.display='none';}
	}

	function getUser(){
		popupCenter("getUser.php","getUser","500","460","1");
	}

	function fileInput(thisvalue){
		var theForm = document.theform;
		var k=0;
		var checkCount = theForm.fileCount.value;
		var str = fileInputValue.innerHTML;

		if (thisvalue=="add"){
			checkCount = parseInt(checkCount);
			str+= "<div id='file_"+checkCount+"' class='file'><input type='file' name='file_"+checkCount+"' /></div>";
			nextCount = checkCount+1;
		} else if (thisvalue=="del"){
			if(checkCount==1){
				alert('더이상 삭제할수 없습니다.');
				return;
			} else {
				nextCount = parseInt(checkCount) - 1;
				var fileSub = eval("file_"+nextCount+"")
				fileSub.innerHTML = "";
				tmpStr = fileInputValue.innerHTML;
				var delStr = "<DIV id=file_"+nextCount+" class=file></DIV>"
				str = tmpStr.replace(delStr,"");
			}
		}
		fileInputValue.innerHTML = str;
		theForm.fileCount.value = nextCount;
	}   

	function goDelFile(thisseq){
		if(!confirm('삭제하시겠습니까?')){ return; }
		hiddenframe.location.href="work_board.php?work=filedelete&seq="+thisseq;
		
	}


	function favoriteSite(fa_url,fa_name){
		window.external.AddFavorite(fa_url,fa_name);
	}

	function resetPW(){
		var theForm = document.theform;
		if(theForm.login_id.value==""){alert('이메일을 입력하세요');theForm.login_id.focus();return;}
		theForm.work.value="passwd_reset";
		theForm.target="hiddenframe";
		theForm.method="post";
		theForm.action="work_member.php";
		theForm.submit();
	}

	function changePW(){
		var theForm = document.theform;
		if(theForm.login_pw.value==""){alert('이메일을 입력하세요');theForm.login_pw.focus();return;}
		if(theForm.login_pw.value!=theForm.login_pw2.value){alert('입력값이 서로 다릅니다.');theForm.login_pw.focus();return;}
		theForm.work.value="passwd_change";
		theForm.target="hiddenframe";
		theForm.method="post";
		theForm.action="work_member.php";
		theForm.submit();
	}

	function getDate(thisvalue){
		var theForm = document.theform;
		var sdate = theForm.syear.value+theForm.smonth.value+theForm.sday.value;
		var process = 0;
		if(thisvalue=="1week"){process = 7;}
		else if(thisvalue=="1month"){process = 30;}
		else if(thisvalue=="3month"){process = 90;}
		if(process){
			var newDate = new Date();
			theForm.eyear.value = newDate.getYear();
			emonth = newDate.getMonth()+1;
			if(emonth<10){emonth="0"+emonth;}
			theForm.emonth.value = emonth;
			eday = newDate.getDate();
			if(eday<10){eday="0"+eday;}
			theForm.eday.value = eday;
			//var theDate = sdate.getTime() - (parseInt(process)*24*60*60*1000);
			var theDate = newDate.getTime() - (parseInt(process)*24*60*60*1000);
			newDate.setTime(theDate);
			theForm.syear.value = newDate.getYear();
			smonth = newDate.getMonth()+1;
			if(smonth<10){smonth="0"+smonth;}
			theForm.smonth.value = smonth;
			sday = newDate.getDate();
			if(sday<10){sday="0"+sday;}
			theForm.sday.value = sday;
		} else {
			theForm.syear.value=theForm.smonth.value=theForm.sday.value="";
			theForm.eyear.value=theForm.emonth.value=theForm.eday.value="";
		}
		return;
	}

	function checkLen(thislen, thisfield){
		var theForm = document.theform;
		var temp;
		var theField = eval("theForm."+thisfield+"");
		var f = theField.value.length;
		var msglen = thislen; //최대 길이
		var tmpstr = "";
		var enter = 0;
		var strlen;

		if(f == 0&&thisfield=="detail")
			theForm.remain.value = msglen;
		else {
			for(k=0;k<f;k++){
				temp = theField.value.charAt(k);
				if(temp == '\n'){
					enter++;
				}

				if(escape(temp).length > 4)
					msglen -= 2;
				else
					msglen--;

				if(msglen < 0){
					thislenKor = thislen/2;
					alert("총 영문 "+thislen+"자 한글 "+thislenKor+"자 까지 쓰실 수 있습니다.");
					theField.value = tmpstr;
					break;
				} else {
					tmpstr += temp;
				}
				if(thisfield=="detail"){theForm.remain.value = msglen;}
			}
		}
	}

	function copyText(thistype, thisvalue){
		var copyTo = eval("copy_"+thistype+"");
		copyTo.innerHTML = thisvalue;
	}

	function getInsertform(thisvalue, thiswork){
		var theForm = document.theform;
		if(thisvalue==""){alert("선택할수 없는 카테고리 입니다.");theForm.category.value="";return;}
		var typeArr = thisvalue.split("|");
		theForm.code.value = typeArr[1];
		if(typeArr[0]=="typea"){
			bb_option.style.display="none";
			bb_cost.style.display="block";
			bb_pay.style.display="none";
		} else if (typeArr[0]=="typeb"){
			bb_option.style.display="block";
			bb_cost.style.display="none";
			bb_pay.style.display="block";
		} else if (typeArr[0]=="typec"){
			bb_option.style.display="none";
			bb_cost.style.display="none";
			bb_pay.style.display="none";
		}
		if(thiswork=="ad"){
			checkCost('category');
		}
	}

	function checkCost(thiswork){
		var theForm = document.theform
		var view = 0;
		var total = 0;
		var totalCategory = 0;
		var totalOption = 0;
		var totalOptitle = "";


		opArr = theForm.category.value.split("|");
		if(parseInt(opArr[0])){totalCategory = parseInt(opArr[0]);}

		for(i=0;i<theForm.tCount.value;i++){
			option = eval("theForm.option_"+i+"");
			if(option.checked==true){
				opArr = option.value.split("|");
				totalOption = totalOption + parseInt(opArr[0])
				totalOptitle = totalOptitle + "|"+opArr[1]+"|";
			}
		}

		for(i=0;i<theForm.view.length;i++){
			if(theForm.view[0].checked==true){
				view = 7;
			} else if(theForm.view[1].checked==true){
				view = 30 * 0.95 ;
			}
		}
		if(thiswork=="category"){
			for(i=0;i<theForm.tCount.value;i++){
				option = eval("theForm.option_"+i+"");
				option.checked=false;
			}
			theForm.optionTotal.value = "";
			total = totalCategory * view;
		}
		if(thiswork=="option"){
			theForm.category.value = "";
			theForm.optionTotal.value = totalOptitle;
			total = totalOption * view;
		}
		if(thiswork=="view"){
			total = (totalCategory+totalOption) * view;
		}

		theForm.total.value=total;
		totalCostView.innerHTML=comma(total);
	}

	function comma(str){
		str = new String(str);
		this.str = str;
		len = str.length;
		str1 = '';
		for(i=1;i<=len;i++){
			str1 = str.charAt(len-i)+str1;
			if((i%3==0)&&(len-i!=0)) str1 = ","+str1;
		}
		return str1;
	}

	function getLayer(thisurl, thiswidth, thisheight){
		var str = "";
		top.popupLayer.style.width=thiswidth;
		top.popupLayer.style.height=thisheight;
		top.popupLayer.style.position="absolute";
		top.popupLayer.style.border="1px solid gray";
		top.popupLayer.style.background="white";
		top.popupLayer.style.margin="50px";
		top.popupLayer.style.padding="20px";
		top.popupLayer.innerHTML = "<iframe frameborder=0 style='width:"+thiswidth+";height:"+thisheight+"px;' src='"+thisurl+"'></iframe>";
	}

	function showFile(thisfile){
		var fileName = thisfile;
		var fileObject = new ActiveXObject("Scripting.FileSystemObject");
		if(!fileObject.FileExists(fileName)){
			alert("없음");
		} else {
			var fOpen = fileObject.OpenTextFile(fileName,1);
			//top.popupLayer.innerHTML="";
			while(!fOpen.AtEndOfStream){
				//top.popupLayer.innerHTML+=fOpen.Readline();
				str+=fOpen.Readline();
			}
			fOpen.close();
		}
		alert(str);
	}

	function stopmq(thisvalue){
		mq.scrollAmount=thisvalue;
	}

	function goEvent(thisvalue){
		location.href="event.php?checkdate="+thisvalue;
	}

	function getCal(thisvalue){
		hiddenframe.location.href="schedule.php?work=getmonth&checkdate="+thisvalue;
	}

	function getCalPrev(){
		hiddenframe.location.href="schedule.php?work=getmonth&checkdate="+document.theform.prevMonth.value;
	}

	function getCalNext(){
		hiddenframe.location.href="schedule.php?work=getmonth&checkdate="+document.theform.nextMonth.value;
	}

	function getCalYear(thisvalue){
		var thisdate = thisvalue+document.theform.theMonth.value
		hiddenframe.location.href="schedule.php?work=getmonth&checkdate="+thisdate;
	}

	function getCategory(thisvalue){
		/*
		var codeArr = thisvalue.split("|");
		var depth = codeArr[0];
		var seq = codeArr[1];
		hiddenframe.location.href="selectCategory.php?depth="+depth+"&seq="+seq;
		*/
		cacount = parseInt(categoryCount.value) + 1;
		categoryCount.value = cacount;
		alert(cacount);
		hiddenframe.location.href="selectCategory.php?count="+cacount;
	}

	function checkSession(){
		if(document.theform.userid.value==''){
			if(confirm('로그인 후 이용가능합니다.')){
				location.href="../member/login.php";
			} else {
				return false;
			}
		}
	}

	function addCart(thiswork){
		if(document.theform.userid.value=='' && thiswork!="direct"){
			if(confirm('로그인 후 이용가능합니다.')){
				location.href="../member/login.php";
				return;
			}
		} else {
			var theForm = document.theform
			if(thiswork=="direct"){
				theForm.work.value="direct_insert";
			} else {
				theForm.work.value="cart_insert";
			}
			theForm.target="hiddenframe";
			theForm.action="../work_shop.php"
			theForm.submit();
		}
	}

	function buyNow(){
		//checkSession();
		location.href="../shop/sale.php";
	}

	function addWish(){
		checkSession();
		var theForm = document.theform
		theForm.work.value="wish_insert";
		theForm.target="hiddenframe";
		theForm.action="../work_shop.php"
		theForm.submit();
	}

	function addToCart(thisseq, thisprice){
		var theForm = document.theform
		theForm.work.value="cart_insert";
		theForm.pd_code.value=thisseq;
		theForm.qty.value=1;
		theForm.price.value=thisprice;
		theForm.target="hiddenframe";
		theForm.action="../work_shop.php"
		theForm.submit();
	}


	function editQty(thisvalue, thisseq){
		var theForm = document.theform
		var qtyFor = eval("theForm."+thisvalue+"")
		qty = qtyFor.value;
		hiddenframe.location.href="../work_shop.php?work=qty_modify&seq="+thisseq+"&qty="+qty;
	}

	function getOpt(thisid, thispdseq, thisseq){
		hiddenframe.location.href="../selectOpt.php?id="+thisid+"&pdseq="+thispdseq+"&seq="+thisseq;
	}

	function editOpt(thisseq){
		var theForm = document.theform
		var optioncount = eval("theForm.optioncount_"+thisseq+"");
		var thisOpt = "";
		for(i=0;i<optioncount.value;i++){
			if(i>0){thisOpt+= "/";}
			option = eval("theForm.option_"+thisseq+"_"+i+"");
			optionvalue = eval("theForm.optionvalue_"+thisseq+"_"+i+"");
			thisOpt+= option.value+"|"+optionvalue.value
		}
		hiddenframe.location.href="../work_shop.php?work=opt_modify&seq="+thisseq+"&option="+thisOpt;
	}
	
	function delCart(thiswork, thisvalue){
		if(confirm('삭제할까요?')){
			if(thiswork=="all"){
				hiddenframe.location.href="../work_shop.php?work=cart_delete_all&userid="+thisvalue;
			} else {
				hiddenframe.location.href="../work_shop.php?work=cart_delete&seq="+thisvalue;
			}
		}
	}

	function delWish(thiswork, thisvalue){
		if(confirm('삭제할까요?')){
			hiddenframe.location.href="../work_shop.php?work=wish_delete&seq="+thisvalue;
		}
	}

	function viewDetail(thistype, thisid){
		var thecount = eval(""+thistype+"_count.value")-1;
		for(i=1;i<=thecount;i++){
			thelayer = eval(""+thistype+"_"+i+".style");
			if(i==thisid){
				thelayer.display="block";
			} else {
				thelayer.display="none";
			}
		}
	}

// sns

	//트위터 게시하기
	function twitter(msg,url){
		var href = "http://twitter.com/home?status=" + encodeURIComponent(msg) + " " + encodeURIComponent(url);
		var win = window.open(href, 'twitter', '');
		if (win){
			win.focus();
		}
	}

	//페이스북 게시하기
	function facebook(url) {
		var href = "http://www.facebook.com/sharer.php?u=" + url;
		var win = window.open(href, 'facebook', '');
		if(win) {
			win.focus();
		}
	}

	//미투데이 게시하기
	function Me2Day(msg,url,tag) {
		var href = "http://me2day.net/posts/new?new_post[body]=" + encodeURIComponent(msg) + " " + encodeURIComponent(url) + "&amp;new_post[tags]=" + encodeURIComponent(tag);
		var win = window.open(href, 'me2Day', '');
		if (win) {
			win.focus();
		}
	}

	//다음 요즘 게시하기
	function YozmDaum(link,prefix,parameter) 	{
		var href = "http://yozm.daum.net/api/popup/prePost?link=" + encodeURIComponent(link) + "&amp;prefix=" + encodeURIComponent(prefix) + "&amp;parameter=" + encodeURIComponent(parameter);
		var win = window.open(href, 'yozmSend', 'width=466, height=356');
		if (win) {
			win.focus();
		}
	}

	function goupload(thiswork, thiscode){
		var f = document.theform
			f.method="post";
			f.code.value=thiscode;
			goSubmit(thiswork,'');
	}

//-->

