var isDOM = (document.getElementById ? true : false); 
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
function getRef(id) {
	if (isDOM) return document.getElementById(id);
	if (isIE4) return document.all[id];
	if (isNS4) return document.layers[id];
}
var isNS = navigator.appName == "Netscape";
function moveRightEdge() {
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
	if (isNS4) {
		yMenuFrom   = divMenu.top;
		yMenuTo     = windows.pageYOffset + 10;   // À§ÂÊ À§Ä¡
	} else if (isDOM) {
		yMenuFrom   = parseInt (divMenu.style.top, 10);
		yMenuTo     = (isNS ? window.pageYOffset : document.body.scrollTop) + 10; // À§ÂÊ À§Ä¡
		if(yMenuTo >158)
			yMenuTo-=158;
		else yMenuTo=0;
	}
	timeoutNextCheck = 500;
	if (yMenuFrom != yMenuTo) {
		yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
		if (yMenuTo < yMenuFrom)
			yOffset = -yOffset;
		if (isNS4)
			divMenu.top += yOffset;
		else if (isDOM)
			divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;
			timeoutNextCheck = 10;
	}
	setTimeout ("moveRightEdge()", timeoutNextCheck);
}

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_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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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 MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';

  menubar_str = menubar ? 'yes' : 'no';

  statusbar_str = statusbar ? 'yes' : 'no';

  scrollbar_str = scrollbar ? 'yes' : 'no';

  resizable_str = resizable ? 'yes' : 'no';



  cookie_str = document.cookie;
  cookie_str.toString();


  pos_start  = cookie_str.indexOf(name);

  pos_start  = cookie_str.indexOf('=', pos_start);

  pos_end    = cookie_str.indexOf(';', pos_start);
  
  if (pos_end <= 0) pos_end = cookie_str.length;

  cookie_val = cookie_str.substring(pos_start + 1, pos_end);



  if (cookie_val  == "done")

    return;



  na_win = window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
  na_win.focus();
}

// form.reset
function formClear(Obj)
{
	Obj.reset();
}

//°´Ã¼ È°¼º,ºñÈ°¼º ¼³Á¤ ÇÔ¼ö
function showObject(Obj,Boolen)
{
	if(Boolen){					//È°¼ºÈ­
		Obj.disabled = false;
		Obj.style.background = "#ffffff";
	}
	else{						//ºñÈ°¼ºÈ­
		Obj.disabled = true;
		Obj.style.background = "#dddddd";
	}
}
//°´Ã¼ È°¼º,ºñÈ°¼º ¼³Á¤ ÇÔ¼ö
function checkshowObject(Obj,Boolen)
{
	Boolen ? Obj.disabled = false: Obj.disabled = true;
}

/* ¹è¿­ Ã³¸® ÇÔ¼ö */
//Ãß°¡
function addArray(Obj,Val)
{
	var arrLength= Obj.length;
	Obj[arrLength] = Val;
}

//»èÁ¦
function delArray(Obj,Index)
{
	var temp=new Array();
	var nextIndex = Index +1;

	for(i=0,j=0;i<Obj.length;i++){
		if(i!=Index){
			temp[j] = Obj[i];
			j++;
		}
	}
	for(i=0;i<temp.length;i++)
		Obj[i]=temp[i];
	return temp.length;
}

//Á¤·Ä   0:³»¸²Â÷¼ø  1:¿À¸§Â÷¼ø
function sortArray(Obj,Method)
{
	Obj.sort();
	if(!Method)
		Obj.reverse();
}

//ÇÑ±ÛÃ¼Å©
function hanCheck(Str)
{
	var Re=false;
	for(i=0;i<Str.length;i++){
		var a=Str.charCodeAt(i);
		if (a > 128) {
			Re=true;
		}
	}
	return Re;
}

function specialCheck(Str)
{
	var Re=false;
	for(i=0;i<Str.length;i++){
		var a=Str.charCodeAt(i);
		if (a <45 || (a>45 && a<48) || (a>57 && a<65) || ( a>90 && a<95) || (a>95 && a<97) || a>122 ) {
			Re=true;
		}
	}
	return Re;
}
//ÆÄÀÏ¸í ÇÑ±Û Ã¼Å©
function filehanCheck(Str)
{
	var Arr = new Array();
	var Re=false;
	Arr=Str.split("\\");
	return hanCheck(Arr[Arr.length-1]);
}

//¼ýÀÚÃ¼Å©
function numCheck(Str)
{
    var Re=true;
	for(i=0;i<Str.length;i++){
		var a=Str.charCodeAt(i);
		if(a<48 || a>57)
			Re=false;
	}
	return Re;		
}
function ByteLength(Str)
{
	var len=0;
	for(i=0;i<Str.length;i++){
		var a=Str.charCodeAt(i);
		if (a > 128) {
			len+=2
		}else{
			len+=1
		}
	}
	return len;
}
//¿¬¶ôÃ³Ã¼Å©
function telCheck(Tel1, Tel2, Tel3){
	var Re=true;
	if(!numCheck(Tel1) ||!numCheck(Tel2) ||!numCheck(Tel3) )
		Re = false;
	else if(Tel1.length <2 || Tel1.length >3)
		Re = false;
	else if(Tel2.length <3 || Tel2.length >4)
		Re = false;
	else if(Tel3.length <4 || Tel3.length >4)
		Re = false;
	return Re;
}
//°ü·ÃÀÌ¹ÌÁö ¿Ã¸®±â »õÃ¢
function inputImg(Part,Code)
{
	var form=document.writeForm;
	window.open("input_img.asp?part="+Part+"&code="+Code,"","scrollbars=yes,left=200,top=200,width=467,height=500");
}
//ÀÌ¹ÌÁöÈ®´ë
function zoom(File,Width,Height)
{
	if(!Width || !Height){
		alert("ÀÌ¹ÌÁö°¡ Á¸ÀçÇÏÁö ¾Ê°Å³ª ÀÌ¹ÌÁö Å©±âÁ¤º¸°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
	}else{
		window.open("zoom.asp?img="+File,"","scrollbars=no,width="+Width+",height="+Height+",top=200,left=200");
	}
}
function adminzoom(File,Width,Height)
{
	if(!Width || !Height){
		alert("ÀÌ¹ÌÁö°¡ Á¸ÀçÇÏÁö ¾Ê°Å³ª ÀÌ¹ÌÁö Å©±âÁ¤º¸°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
	}else{
		window.open("zoom.asp?img="+File,"","scrollbars=yes,width="+Width+",height="+Height+",top=200,left=200");
	}
}
function zoom2(File,Width,Height)
{
	if(!Width || !Height){
		alert("ÀÌ¹ÌÁö°¡ Á¸ÀçÇÏÁö ¾Ê°Å³ª ÀÌ¹ÌÁö Å©±âÁ¤º¸°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
	}else{
		window.open("zoom2.asp?idx="+File,"","scrollbars=no,width="+Width+",height="+Height+",top=200,left=200");
	}
}
function zoom3(File,Width,Height)
{
	if(!Width || !Height){
		alert("ÀÌ¹ÌÁö°¡ Á¸ÀçÇÏÁö ¾Ê°Å³ª ÀÌ¹ÌÁö Å©±âÁ¤º¸°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
	}else{
		window.open("zoom3.asp?idx="+File,"","scrollbars=no,width="+Width+",height="+Height+",top=200,left=200");
	}
}
//ÀÌ¹ÌÁöÈ®´ë (Å¸ÀÌÆ²)
function zoomTitle(File,Width,Height,Title)
{
	if(!Width || !Height){
		alert("ÀÌ¹ÌÁö°¡ Á¸ÀçÇÏÁö ¾Ê°Å³ª ÀÌ¹ÌÁö Å©±âÁ¤º¸°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
	}else{
		window.open("zoom.asp?img="+File+"&title="+Title,"","scrollbars=no,width="+Width+",height="+Height+",top=200,left=200");
	}
}

//<tr> ¹è°æ»ö ¹Ù²Ù±â
function bgcolorChange(Obj,Color)
{
	Obj.backgroundColor = Color;
}

//ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å©
function bsshChek(str_jumin1,str_jumin2)
{
	var i3=0;
	var re_value=true;
    for (var i=0;i<str_jumin1.length;i++)
    {
		var ch1 = str_jumin1.substring(i,i+1);
        if (ch1<'0' || ch1>'9') { i3=i3+1 }
    }
    if ((str_jumin1 == '') || ( i3 != 0 ))
		re_value=false;
	
    var i4=0;
    for (var i=0;i<str_jumin2.length;i++)
    {
		var ch1 = str_jumin2.substring(i,i+1);
        if (ch1<'0' || ch1>'9') { i4=i4+1 }
    }
	if ((str_jumin2 == '') || ( i4 != 0 ))
		re_value=false;
    if(str_jumin1.substring(0,1) < 4)
		re_value=false;
    if(str_jumin2.substring(0,1) > 2)
		re_value=false;
    if((str_jumin1.length > 7) || (str_jumin2.length > 8))
		re_value=false;
    if ((str_jumin1 == '72') || ( str_jumin2 == '18'))
		re_value=false;
                
    var f1=str_jumin1.substring(0,1)
    var f2=str_jumin1.substring(1,2)
    var f3=str_jumin1.substring(2,3)
    var f4=str_jumin1.substring(3,4)
    var f5=str_jumin1.substring(4,5)
    var f6=str_jumin1.substring(5,6)
    var hap=f1*2+f2*3+f3*4+f4*5+f5*6+f6*7
    var l1=str_jumin2.substring(0,1)
    var l2=str_jumin2.substring(1,2)
    var l3=str_jumin2.substring(2,3)
    var l4=str_jumin2.substring(3,4)
    var l5=str_jumin2.substring(4,5)
    var l6=str_jumin2.substring(5,6)
    var l7=str_jumin2.substring(6,7)
    hap=hap+l1*8+l2*9+l3*2+l4*3+l5*4+l6*5;
    hap=hap%11;
    hap=11-hap;
    hap=hap%10;

	if (hap != l7) 
		re_value=false;
    var i9=0;

	return re_value;
}

//¸¸³ªÀÌ Ã¼Å©
function manChek(ssh1)
{
	var today = new Date();
	var day = today.getDate();
	var month = today.getMonth()+1;
	var year = today.getYear();

	ssh=year*10000+month*100+day;
	ssh=ssh-ssh1-19000000;
	return ssh;
}

//ÀÌ¸ÞÀÏÃ¼Å©
function isEmail(str) {
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}

//»óÇ° ¼±ÅÃ
function selectGoods(Obj)
{
	Action="goods_select.asp?Obj="+Obj;
	window.open(Action,"","scrollbars=yes,width=500,height=670,top=100,left=150");
}

//ÄíÅ°ÀúÀå
function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
	//document.cookie = name + "=" + escape( value ) + "; path=/;";
}

//Ä®·¯ ¹Ú½º
//       setColor(string mul|sin, string bg|style  string  id)
function setColor(Part1,Part2,Obj)
{
	window.open("color.asp?part1="+Part1+"&part2="+Part2+"&target="+Obj,"","scrollbars=yes,width=350,height=110,left=300,top=300");
}
function subsetColor(Part1,Part2,Obj,tForm)
{
	window.open("sub_color.asp?part1="+Part1+"&part2="+Part2+"&target="+Obj+"&tForm="+tForm,"","scrollbars=yes,width=350,height=110,left=300,top=300");
}
//1Â÷Ä«Å×°í¸® ¸¶¿ì½º ¾Æ¿ô ¼³Á¤
function layerImgOut(Name,Src)
{
	Name.src=Src;
}

//»óÇ° °Ë»ö Æû
function goodsSearchSendit(Obj)
{
	if(Obj.searchstring.value==""){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		Obj.searchstring.focus();
	}else if(Obj.search.selectedIndex==1 && !numCheck(Obj.searchstring.value)){
		alert("°¡°Ý ¼³Á¤ÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		Obj.searchstring.focus();
	}else{
		Obj.submit();
	}
}

//¸ÞÀÏº¸³»±â
function sendMail(To)
{
	window.open("./email/mail.asp?To="+To,"","scrollbars=yes,left=200,top=200,width=400,height=483");
}
//°ü·ÃÀÌ¹ÌÁö ¿Ã¸®±â »õÃ¢
function inputImg(Part,Code)
{
	var form=document.writeForm;
	window.open("input_img.asp?part="+Part+"&code="+Code,"","scrollbars=yes,left=200,top=200,width=467,height=500");
}
function askloginErr()
{
	alert("È¸¿ø¸Þ´ºÀÔ´Ï´Ù. ·Î±×ÀÎ ÇØÁÖ½Ê½Ã¿À.");
}
function exitBoothErr()
{
	alert("ÀÌ¹Ì º¸À¯ÇÏ½Å ºÎ¾²°¡ ÀÖ½À´Ï´Ù.");
}
function noexitBoothErr()
{
	alert("º¸À¯ÇÏ½Å ºÎ¾²°¡ ¾ø½À´Ï´Ù.");
}
//ÂÊÁöÀü´Þ
function boxView1(userid,shop_part,buserid,myid)
{
	if(userid == myid){
		alert("ÀÚ½Å¿¡°Ô ÂÊÁö¸¦ º¸³¾ ¼ö ¾ø½À´Ï´Ù.");
	}else if(shop_part!="member"){
		alert("È¸¿ø¸Þ´ºÀÔ´Ï´Ù.·Î±×ÀÎ ÇØÁÖ½Ê½Ã¿À.");
	}else if(!buserid){
		alert("È¸¿øÁ¤º¸°¡ ¾ø½À´Ï´Ù.");
	}else{
		window.open("/shop/box_guest_slip_send.asp?userid="+userid,"","scrollbars=no,left=100,top=100,width=500,height=300");
	}
}
//¹Ú½ºÁ¤º¸
function boxView2(userid,shop_part,buserid)
{
	if(shop_part!="member"){
		alert("È¸¿ø¸Þ´ºÀÔ´Ï´Ù.·Î±×ÀÎ ÇØÁÖ½Ê½Ã¿À.");
	}else if(!buserid){
		alert("È¸¿øÁ¤º¸°¡ ¾ø½À´Ï´Ù.");
	}else{
		window.open("/shop/box_guest.asp?userid="+userid,"","scrollbars=no,left=100,top=100,width=500,height=300");
	}
}
//ºÎ¾²Á¡ÇÁ
function boxView3(userid,shop_part,buserid,booth_url)
{
	if(!buserid){
		alert("È¸¿øÁ¤º¸°¡ ¾ø½À´Ï´Ù.");
	}else{
		location.href=booth_url;
	}
}
function boxView3new(userid,shop_part,buserid,booth_url)
{
	if(!buserid){
		alert("È¸¿øÁ¤º¸°¡ ¾ø½À´Ï´Ù.");
	}else{
		location.href=booth_url;
	}
}
function boxView3newInbooth(userid,shop_part,buserid,booth_url)
{
	if(!buserid){
		alert("È¸¿øÁ¤º¸°¡ ¾ø½À´Ï´Ù.");
	}else{
		parent.location.href="/booth/booth_home.asp?boothid="+userid;
	}
}
function boxView4(userid,shop_part,buserid,booth_url)
{
	if(!buserid){
		alert("È¸¿øÁ¤º¸°¡ ¾ø½À´Ï´Ù.");
	}else{
		opener.location.href=booth_url;
		window.close();
	}
}
//³»ÂÊÁöÇÔ
function myBoxView1(userid)
{
	w =window.open("/shop/box_me_slipbox.asp?userid="+userid,"mybox","scrollbars=no,left=80,top=80,width=500,height=300");
	w.focus();
}
//¸¶ÀÌ¹Ú½º
function myBoxView2(userid)
{
	w =window.open("/shop/box_me.asp?userid="+userid,"mybox","scrollbars=no,left=80,top=80,width=500,height=300");
	w.focus();
}
function bookMarkErr()
{
	alert("È¸¿ø´ÔÀÇ Áñ°ÜÃ£±â¿¡ µî·ÏµÈ ºÎ¾²ÀÔ´Ï´Ù.\n\n»èÁ¦´Â ¸¶ÀÌÆäÀÌÁö¿¡¼­ ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.");
}
function fileType(str)
{
	fileUrlArr = str.split("\\");
	fileNameArr = fileUrlArr[fileUrlArr.length-1].split(".");
	return fileNameArr[fileNameArr.length-1].toUpperCase();
}
function bImgFile(str)
{
	if(fileType(str)=="GIF" || fileType(str)=="JPG"){
		return true;
	}else{
		return false;
	}
}
function commonbbsEditErr()
{
	alert("¼öÁ¤±ÇÇÑÀÌ ¾ø½À´Ï´Ù.");
}
function commonbbsDelErr()
{
	alert("»èÁ¦±ÇÇÑÀÌ ¾ø½À´Ï´Ù.");
}
function commonbbsWriteErr()
{
	alert("·Î±×ÀÎ ÇØÁÖ¼¼¿ä.");
}
function commonbbsReadErr()
{
	alert("·Î±×ÀÎÇØ ÁÖ¼¼¿ä.");
}
function boothSearch()
{
	var form = document.boothSearchForm;
	if(form.searchstring.value==""){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		form.searchstring.focus();
	}else{
		form.part.value = "search";
		form.submit();
	}
}
function goodsboothSearch()
{
	var form = document.boothGoodsSearchForm;
	if(form.searchstring.value==""){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		form.searchstring.focus();
	}else{
		form.submit();
	}
}
function goodsboothSearch2()
{
	var form = document.boothSearchForm;
	if(form.goodssearchstring.value==""){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		form.goodssearchstring.focus();
	}else{
		form.action = "/booth/b_goods_search.asp";
		form.submit();
	}
}
function goodsboothSearch3()
{
	var form = document.goodsSearchForm;
	if(form.searchstring.value==""){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		form.searchstring.focus();
	}else{
		if(form.bthiscategory.checked){
			form.action = "/booth/b_category.asp";
		}else{
			form.action = "/booth/b_category.asp";
		}
		form.submit();
	}
}
function boothSearchGo()
{
	var form = document.boothSearchForm;
	if(form.boothname.value==""){
		alert("ºÎ¾² °æ·Î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		form.boothname.focus();
	}else{
		form.part.value = "go";
		form.submit();
	}
}
function searchChek()
{
	if(event.keyCode==13)
		boothSearch();
}
function goodssearchChek()
{
	if(event.keyCode==13)
		goodsboothSearch();
}
function goodssearchChek2()
{
	if(event.keyCode==13)
		goodsboothSearch2();
}
function goodssearchChek3()
{
	if(event.keyCode==13)
		goodsboothSearch3();
}
function searchGoChek()
{
	if(event.keyCode==13)
		boothSearchGo();
}
function goodbadErr()
{
	alert("È¸¿ø´ÔÀº ÇØ´ç±Û¿¡ ´ëÇÑ ÅõÇ¥¸¦ ÇÏ¼Ì½À´Ï´Ù.");
}
function zoomGoods(goodsIdx)
{
	w =window.open("/shop/zoom.asp?goodsIdx="+goodsIdx,"","scrollbars=no,left=80,top=80,width=800,height=450");
	w.focus();
}
function commaFormat(obj) {
	var obj_value = '' + obj;
	var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])'); 
	var arrNumber = obj_value.split('.');
	arrNumber[0] += '.';
	do {
		arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2');
	}
	while (rxSplit.test(arrNumber[0]));
	if (arrNumber.length > 1) {
		return arrNumber.join('');
	} else {
		return arrNumber[0].split('.')[0];
	}
} 
function couponBring(coupon_code,coupon_part)
{
	w =window.open("/shop/coupon_msg.asp?coupon_code="+coupon_code+"&coupon_part="+coupon_part,"coupon_win","scrollbars=no,left=300,top=300,width=400,height=250");
	w.focus();
}
function topbrandmenugo(obj)
{
	var brand = obj.top_menu_brand.value;
	obj.reset();
	location.href="/shop/s_brandhome.asp?brand=" + brand;

}
function topbrandmenugo2(obj)
{
	var brand = obj.top_menu_brand.value;
	obj.reset();
	location.href="/b2b/b2b_brandhome.asp?brand=" + brand;

}
function showMyBoxDiv(part)
{
	if(part==1)
		document.all.top_my_box_div.style.display = "";
	else
		document.all.top_my_box_div.style.display = "none";
}
function showTopCartDiv(part)
{
	if(part){
		showTopViewGoodsDiv(0);
		document.all.top_div_cart.style.display = "";
	}else{
		document.all.top_div_cart.style.display = "none";
	}
}
function showPutBoothInfoDiv(part)
{
	if(part){
		document.all.putboothinfo.style.display = "";
	}else{
		document.all.putboothinfo.style.display = "none";
	}
}
function showTopViewGoodsDiv(part)
{
	if(part){
		showTopCartDiv(0);
		document.all.top_div_viewgoods.style.display = "";
	}else{
		document.all.top_div_viewgoods.style.display = "none";
	}
}
function showTopCartDivFa(part)
{
	if(part){
		showTopViewGoodsDivFa(0);
		document.all.top_div_cart_fa.style.display = "";
	}else{
		document.all.top_div_cart_fa.style.display = "none";
	}
}
function showTopViewGoodsDivFa(part)
{
	if(part){
		showTopCartDivFa(0);
		document.all.top_div_viewgoods_fa.style.display = "";
	}else{
		document.all.top_div_viewgoods_fa.style.display = "none";
	}
}
function topSearchSendit(obj)
{
	if(trim(obj.searchstring.value)==""){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		obj.searchstring.value="";
		obj.searchstring.focus();
	}else{
		obj.submit();
	}
}

function topSearchSendit1(obj)
{
	if(trim(obj.searchstring1.value)==""){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		obj.searchstring1.value="";
		obj.searchstring1.focus();
	}else{
		obj.submit();
	}
}

function stringReset(obj)
{
	obj.value = "";
}
function boothHomeView(boothid)
{
	w =window.open("/booth/booth_home.asp?boothid="+boothid,"","scrollbars=no,left=10,top=10,width=950,height=600");
	w.focus();
}
function boothInfo(index)
{
	w2 =window.open("/booth/booth_info.asp?index="+index,"","scrollbars=no,left=10,top=10,width=950,height=600");
	w2.focus();
}
function randomboothHomeView(boothid)
{
	w =window.open("/booth/booth_home.asp?random=1","","scrollbars=no,left=10,top=10,width=950,height=600");
	w.focus();
}
function boothGoodsView(boothid,goodsIdx)
{//booth_home_goods.asp?frameurl=/booth/booth_goods_detail.asp&boothid=soosoos&goodsIdx=1459
	w =window.open("/booth/booth_home_goods.asp?frameurl=/booth/booth_goods_detail.asp&boothid="+boothid+"&goodsIdx="+goodsIdx,"boothGoods","scrollbars=no,left=10,top=10,width=950,height=600");
	w.focus();
}
function boothGuestView(boothid)
{//booth/booth_home_goods.asp?boothid=ludiashop&frameurl=/booth/booth_guest.asp
	w =window.open("/booth/booth_home_goods.asp?frameurl=/booth/booth_guest.asp&boothid="+boothid,"boothGoods","scrollbars=no,left=10,top=10,width=950,height=600");
	w.focus();
}
function boothContentView(boothid,data)
{//booth/booth_bbs_contents.asp?boothid=soosoos&data=offset¡¹0¡¸pagecnt¡¹0¡¸letter_no¡¹1¡¸search¡¹¡¸searchstring¡¹¡¸idx¡¹655
	w =window.open("/booth/booth_home_goods.asp?frameurl=/booth/booth_bbs_contents.asp&boothid="+boothid+"&endata="+data,"boothGoods","scrollbars=no,left=10,top=10,width=950,height=600");
	w.focus();
}
function boothHref(url)
{
	if(confirm("ÇöÀç ¿­¸° ºÎ¾²Ã¢ÀÌ ´ÝÈ÷¸ç ÀÌµ¿ÇÕ´Ï´Ù.")){
		opener.location.href=url;
		window.close();
		opener.focus();
	}else{
		return;
	}
}
function boothHrefLogin(url)
{
	if(confirm("ÇöÀç ¿­¸° ºÎ¾²Ã¢ÀÌ ´ÝÈ÷¸ç ÀÌµ¿ÇÕ´Ï´Ù.\n\nºÎ¾²Ã¢ÀÌ ´ÝÈ÷°í ·Î±×ÀÎÈÄ ÇöÀçÀÇ ºÎ¾²°¡ ÀÚµ¿À¸·Î ¶å´Ï´Ù")){
		opener.location.href=url;
		window.close();
		opener.focus();
	}else{
		return;
	}
}
function boothFrameUrl(url)
{
	document.all.boothframe.src = url;
}
function leftbookmarkSendit()
{
	var form = document.boothleftbookmarkForm;
	location.href="/booth/booth_home.asp?boothid=" + form.leftbookmark.value;
}
function boothBookMark(boothid)
{
	w =window.open("/booth/booth_add_fv.asp?boothid="+boothid,"","scrollbars=no,left=100,top=100,width=420,height=140");
	w.focus();
}
function goBoothInBooth(boothid)
{
	parent.location.href="/booth/booth_home.asp?boothid="+boothid;
}
function trim(str){var reg = /\s+/g; return str.replace(reg,'');}
function baljuSendit(goodsIdx)
{
	en =window.open("/chlrhrhksflwk/entering_input.asp?goodsIdx="+goodsIdx,"","scrollbars=no,left=100,top=100,width=100,height=100");
	en.focus();
}
function boothUrlCopy(title)
{
	window.clipboardData.setData("text",title); 
	alert("ÁÖ¼Ò°¡ º¹»çµÇ¾ú½À´Ï´Ù. \n\nº¹»çÇÒ À§Ä¡¿¡¼­ ºÙ¿©³Ö±â(Ctrl+V) ÇÏ½Ê½Ã¿À.");
}
function goodsInputBooth(goodsIdx)
{
	window.open("/shop/inboothok_pop.asp?goodsIdx="+goodsIdx,"","scrollbars=no,left=300,top=300,width=256,height=105");
}
function b2bGoodsView(goodsIdx)
{
	window.open("/b2b/b2b_goodsdetail.asp?goodsIdx="+goodsIdx,"","scrollbars=yes,left=10,top=10,width=820,height=600");
}
function shopGoodsView(goodsIdx)
{
	window.open("/shop/s_goods_detail.asp?goodsIdx="+goodsIdx,"","scrollbars=yes,left=10,top=10,width=1000,height=600");
}

function allCommentView(goodsIdx)
{
	window.open("/shop/script_pop.asp?goodsIdx="+goodsIdx,"","scrollbars=yes,left=10,top=10,width=750,height=700");
}

var fuckword = ['10»õ±â','10»õ¸®','10¼¼¸®','10½¦ÀÌ','10½§','10½º','10½Ø', 
'10½Ø±â','10½ê','10¾Ë','10Ã¢','10ÅÊ','18°Í','18³Ñ','18³â','18³ë','18³ð', 
'18´¤','18·³','18·Ò','18»õ','18»õ³¢','18»ö','18¼¼³¢','18¼¼¸®','18¼½','18½§','18½º','18¾Æ','card',
'cÆÄ','cÆÈ','fuck','poker','porn','sex','viagra','xxx',
'¤¡¤À','¤¢¤¿','¤¢¤Á','¤¢¤Ó','¤µ¤²¤©¤±','¤µ¤À','¤¶¤²¤©¤±','¤¶¤½','¤¶¤Ó','¤¶¾Ó','¤½¤¿','ôÈ', 
'°¥º¸','°¥º¸³â','°­¾ÆÁö','°°Àº³â','°°Àº´¤','°³°°Àº','°³±¸¶ó','°³³â','°³³ð', 
'°³´¤','°³´ëÁß','°³µ¶','°³µÅÁß','°³¶ö','°³º¸Áö','°³»½','°³»Ô','°³»õ','°³»õ±â','°³»õ³¢', 
'°³»õÅ°','°³»ö±â','°³»ö³¢','°³»öÅ°','°³»öÈ÷','°³¼¨³¢','°³¼¼','°³¼¼³¢','°³¼¼ÀÌ','°³¼Ò¸®','°³¾¤', 
'°³¼í±â','°³¼öÀÛ','°³½¦','°³½¦¸®','°³½¦ÀÌ','°³½§','°³½±','°³½º³¢','°³½ÃÅ°','°³½Ê»õ±â', 
'°³½Ê»õ³¢','°³œq','°³¾Ã','°³¾Æµé','°³ÀÚ½»','°³ÀÚÁö','°³Á¢','°³Á¿','°³ÁÂ½Ä','°³ÇãÁ¢','°Â»õ', 
'°Â¼öÀÛ','°Â½Ã³¢','°Â½ÃÅ°','°Â›y','°É·¹','°Ô»ö±â','°Ô»ö³¢','±¤´¤','±¸³ç','±¸¶ó','±¸¸Û', 
'±×³â','±×»õ³¢','³¿ºñ','³ðÇö','´¤','´«±ò','´µ¹Ì·²','´Ï±Í¹Ì','´Ï±â¹Ì','´Ï¹Ì','´Ï¹Ì¶ö','´Ï¹Ì·²', 
'´Ï¹Ì¾Ã','´Ï¾Æ¹è','´Ï¾Æº£','´Ï¾Æºñ','´Ï¾î¸Å','´Ï¾î¸Þ','´Ï¾î¹Ì','´×±â¸®','´×±â¹Ì','´ë°¡¸®', 
'µ²½Å','µµ¶óÀÌ','µ·³ð','µ¹¾ÆÀÌ','µ¹Àº³ð','µÇÁú·¡','µØÁ®','µØÁ®¶ó','µØÁø','µØÁø´Ù','µØÁú', 
'µÚÁú·¡','µî½Å','µðÁ®¶ó','µðÁø´Ù','µðÁú·¡','µù½Ã','µû½Ä','¶§³ð','¶Ç¶óÀÌ','¶Ê¾ÆÀÌ','¶Ê¾ÆÀÌ', 
'¶Î³ð','¶Ï³ð','¶Ð³Ñ','¶Ð³ð','¶ÑÀï','¶ì¹Ù','¶ì¹ß','¶ìºÒ','¶ìÆÈ','¸ÞÄ£³Ñ','¸ÞÄ£³ð','¹ÌÃì', 
'¹ÌÃì','¹ÌÄ£','¹ÌÄ£³Ñ','¹ÌÄ£³â','¹ÌÄ£³ð','¹ÌÄ£»õ³¢','¹ÌÄ£½º±îÀÌ','¹ÌÆ¾','¹ÌÆ¾³Ñ','¹ÌÆ¾³â', 
'¹ÌÆ¾³ð','¹Ù¶ö³â','¹ÙÄ«¶ó','º´ÀÚ','¹ð¸¶','¹ð½Å','º­¾û½Å','º´½®','º´½Å','ºÎ¶ö','ºÎ·²','ºÒ¾Ë','ºÒÇÒ','ºØ°¡', 
'ºÙ¾î¸Ô','ºä¿õ','ºé','ºé½Å','ºô¾î¸Ô','ºù½Ã','ºù½Å','ºü°¡','ºü±¸¸®','ºü±¼','ºüÅ¥','»µÅ¥', 
'»¶Å¥','»ÈÅ¥','»ó³ÑÀÌ','»ó³ðÀ»','»ó³ðÀÇ','»ó³ðÀÌ','»õ°¼','»õ²¥','»õ³¢','»õ»õ³¢','»õÅ°', 
'»ö³¢','»ý¾¤','¼¼°¼','¼¼²¥','¼¼³¢','¼½½º','¼îÇÏ³×','½¦','½¦±â','½¦³¢','½¦¸®','½¦¿¡±â', 
'½¦Å°','½§','šx','š‚','½¬¹ß','½¬¹ë','½¬¹ú','½¬»¹','½¬ÆÞ','½±¾Ë','½ºÆÐÅ·','½ºÆØ','½Ã±ÃÃ¢','½Ã³¢', 
'½Ã´ó','½Ãµ­','½Ã¶ö','½Ã¹ß','½Ã¹ú','½ÃºÎ¶ö','½ÃºÎ·²','½ÃºÎ¸®','½ÃºÒ','½Ãºê¶ö','½ÃÆÅ', 
'½ÃÆÈ','½ÃÆÞ','½Å¹ß²ö','½É¹ß²ö','½ÉÅÊ','½Ê8','½Ê¶ó','½Ê»õ','½Ê»õ³¢','½Ê¼¼','½Ê½¦','½Ê½¦ÀÌ','½Ê½ºÅ°', 
'½Ê½Ø','½ÊÃ¢','½ÊÅÊ','½Í¾Ë','½Î°¡Áö','½Ï¾ÆÁö','½Ô³â','½Ö³Ñ','½Ö³â','½Ö³ð','½Ö´¤','½Ø³¢', 
'½Ù','½ß¾¤','›b³â','½à','½à³â','½à³ð','›”¼î','½á¹ú','½âÀ»³â','½âÀ»³ð','½ê²¥','½ê¿¢', 
'¾¯¹ú','¾¯»¹','¾¯ÆÈ','¾¯ÆÞ','¾²¹Ù','¾²¹Ú','¾²¹ß','¾²¹ú','¾²ÆÈ','¾¹»õ','¾¹¾ó','¾ºÆÄ','¾¾8', 
'¾¾³¢','¾¾´ó','¾¾µ­','¾¾¹Ù','¾¾¹Ù¶ö','¾¾¹Ú','¾¾¹ß','¾¾¹æ','¾¾¹æ»õ','¾¾¹æ¼¼','¾¾¹ë','¾¾¹ð', 
'¾¾¹ú','¾¾º§','¾¾ºÀ','¾¾ºÀ¾Ë','¾¾ºÎ¶ö','¾¾ºÎ·²','¾¾ºÎ··','¾¾ºÎ¸®','¾¾ºÒ','¾¾ºØ','¾¾ºê¶ö', 
'¾¾ºü','¾¾»¡','¾¾»Ç¶ö','¾¾¾Ó','¾¾ÆÄ','¾¾ÆÅ','¾¾ÆÈ','¾¾ÆÞ','¾Â³â','¾Â´¤','¾Â»õ³¢','¾Ã°°','¾Ã³â', 
'¾Ã´¤','¾Ãº¸Áö','¾Ã»õ','¾Ã»õ±â','¾Ã»õ³¢','¾Ã»õ¸®','¾Ã¼¼','¾Ã½¦','¾Ã½ºÅ°','¾Ã½Ø','¾ÃÀÌ','¾ÃÀÚÁö', 
'¾ÃÁú','¾ÃÃ¢','¾ÃÅÊ','¾Ã¸c','¾ÃÆÈ','¾ÃÇÒ','¾ÃÇæ','¾Æ°¡¸®','¾Æ°¥','¾Æ°¥ÀÌ','¾Æ°¥Åë', 
'¾Æ±¸Ã¢','¾Æ±¸Åë','¾Æ±¼','¾ä¸¶','¾ç³Ñ','¾ç³â','¾ç³ð','¾öÃ¢','¿¥º´','¿©¹°Åë','¿°º´','¿³°°','¿µ¾îÈ¸È­','¿¼º´', 
'¿¼ºù','¿ÀÀÔ','¿Ö³â','¿Ö³ð','¿èº´','À°°©','Àº³â','À»³â','ÀÌ³â','ÀÌ»õ³¢','ÀÌ»õÅ°','ÀÌ½º³¢','href', 
'ÀÌ½ºÅ°','ÀÓ¸¶','ÀÚ½»','Àâ°Í','Àâ³Ñ','Àâ³â','Àâ³ð','Àú³â','Àú»õ³¢','Á¢³â','Á¥¹ä','Á¶±î', 
'Á¶±îÄ¡','Á¶³½','Á¶¶Ç','Á¶·©','Á¶ºü','Á¶ÀïÀÌ','Á¶Áö³Ä','Á¶Áø´Ù','Á¶Âð','Á¶Áú·¡','Á¸³ª','Á¸³ª°Ô','Á¸´Ï','Á¸¸¸', 
'Á¸¸¸ÇÑ','Á»¹°','Á¼³â','Á¼¹ä','Á½±î','Á½¶Ç','Á½¸¸','Á½¹ä','Á½ÀÌ','Á½Âð','Á¿°°','Á¿±î','Á¿³ª', 
'Á¿¶Ç','Á¿¸¸','Á¿¹ä','Á¿ÀÌ','Á¿Âð','ÁÀ°°','ÁÀÀÌ','ÁÂ½Ä','ÁÖ±Û','ÁÖ±Û·¡','ÁÖµ¥ÀÌ','ÁÖµ­', 
'ÁÖµ­ÀÌ','ÁÖµÕ¾Æ¸®','ÁÖµÕÀÌ','ÁÖÁ¢','ÁÖÁ¢¶³','Á×°íÀâ','Á×À»·¡','Á×Åë','Áã¶ö','Áã·Ñ', 
'Áêµð','Áö¶ö','Áö·²','Áö·Ñ','Áö¹Ì¶ö','Â¥½Ä','Â¥¾Æ½Ä','ÂÉ´Ù','ÂÎ»¤','Âî¶ö','Ã¢³à','Ä³³â', 
'Ä³³ð','Ä³½º³¢','Ä³½ºÅ°','Ä³½ÃÅ°','ÅÊ±¸','ÆÈ·³','ÆÜÅ¥','È£·Î','È£·Î³ð','È£·Î»õ³¢', 
'È£·Î»ö','È£·Î½§','È£·Î½º±îÀÌ','È£·Î½ºÅ°','ÈÄ¶óµé','ÈÄ·¡ÀÚ½Ä','ÈÄ·¹','ÈÄ·Ú','Áö¸¶ÄÏ','G¸¶ÄÏ','¿Á¼Ç','¿ÀÇÂ¸¶ÄÏ','ºñ½Î','Àå³­','www','http','url','href']; 

function checkFuck(str)
{
	var bexit = false;
	for(i=0;i<fuckword.length;i++) { 
		if(str.indexOf(fuckword[i])!=-1) {
			alert(fuckword[i]);
			bexit = true;
			break;
		}
	}
	return bexit;
}