function cart_cust(aa,g_num)
{
	if (aa=="a"){
		m_jobx.location.href="/cart/cart_cust.asp?g_num="+g_num ;
	}else if(aa=="b"){
		m_jobx.location.href="/mypage/wish_cust.asp?g_num="+g_num ;
	}else if(aa=="c"){
		window.open("/cart/detail_pop.asp?g_num="+g_num,"checkform1","scrollbars=yes,toolbar=no,location=no,directories=no,status=no,width=750,height=530,resizable=no,menubar=no,top=0,left=0");
	}else if(aa=="d"){
		if(confirm("¼±ÅÃÇÑ ¹°Ç°À» favorite list¿¡¼­ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")) 
			{
			window.open("/mypage/fav_del.asp?g_num="+g_num,"checkform1","scrollbars=no,toolbar=no,location=no,directories=no,status=no,width=1,height=1,resizable=no,menubar=no,top=0,left=0");			
			}
	}
}



function cart_cust2(aa,g_num)
{
	if (aa=="a"){
		window.open("/cart/cart_cust2.asp?g_num="+g_num,"checkform1","scrollbars=no,toolbar=no,location=no,directories=no,status=no,width=0,height=0,resizable=no,menubar=no,top=0,left=0");
	}else if(aa=="b"){
		window.open("/mypage/wish_cust2.asp?g_num="+g_num,"checkform1","scrollbars=no,toolbar=no,location=no,directories=no,status=no,width=0,height=0,resizable=no,menubar=no,top=0,left=0");
	}else if(aa=="c"){
		window.open("/cart/detail_pop2.asp?g_num="+g_num,"checkform1","scrollbars=yes,toolbar=no,location=no,directories=no,status=no,width=750,height=530,resizable=no,menubar=no,top=0,left=0");
	}else if(aa=="d"){
		if(confirm("¼±ÅÃÇÑ ¹°Ç°À» favorite list¿¡¼­ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")) 
			{
			window.open("/mypage/fav_del.asp?g_num="+g_num,"checkform1","scrollbars=no,toolbar=no,location=no,directories=no,status=no,width=1,height=1,resizable=no,menubar=no,top=0,left=0");			
			}
	}
}















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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
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_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_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 nw(width,height,page) {
newWin=window.open(page,'nw','width=510,height=460,left=0,top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no')
newWin.focus();
newWin.resizeTo(width,height);
}

function nw2(width,height,page) {
newWin=window.open(page,'nw2','width=100,height=100,left=0,top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no')
newWin.focus();
newWin.resizeTo(width,height);
}

function nw3(width,height,page) 
{newWin=window.open(page,'nw3','width=100,height=100,left=0,top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no')
newWin.focus();
newWin.resizeTo(width,height);  
}

function bluring()
{ 
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
} 
document.onfocusin=bluring; 

// search form....
function s_go()
{
	if(document.search_f.search.value=="")
	{
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		document.search_f.search.focus();
	}else{
		document.search_f.submit();
	}
}

//detial.asp..
  function big(rut)
  {
    document.main.src = rut;
  }


function chk_od(aa,g_num,g_code)
{
	var f = document.order_f;

	if(f.select0.value == "_")
	{
		alert("¿É¼ÇÀ» ¼±ÅÃÇÏ¼Å¾ßÇÕ´Ï´Ù.");
		f.select0.focus();
	}
		else
	{

				if (aa=="a")
				{
					f.action="/cart/cart.asp?g_num="+g_num+"&g_code="+g_code+"&ot="+f.select0.value+"&pppp="+f.pppp.value+"&ppppp="+f.ppppp.value+"";
    			f.submit();
				}else if(aa=="b"){
					f.action="/mypage/wish_input.asp?g_num="+g_num+"&g_code="+g_code+"&ot="+f.select0.value+"";
    			f.submit();					
				}else{
				}
	}
}

function bri(width,height,page) {
newWin=window.open(page,'bri','width=367,height=473,left=0,top=0,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no')
newWin.focus();
newWin.resizeTo(width,height);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}


function show_layer(id_chk)
{
//	var lay = eval("document.all." + id_chk)
//alert(document.getElementById(id_chk).style.display);
	if(document.getElementById(id_chk).style.display == "") { 
		//lay.style.display = "none"; //¼û±ä´Ù
		document.getElementById(id_chk).style.display = "none";
	}
	 else if (document.getElementById(id_chk).style.display == "none"){
		//lay.style.display = ""; //º¸¿©ÁØ´Ù
		document.getElementById(id_chk).style.display = "block";
	}
	 else if (document.getElementById(id_chk).style.display == "block"){
		//lay.style.display = ""; //º¸¿©ÁØ´Ù
		document.getElementById(id_chk).style.display = "none";
	}
//if (lay.style.visibility == 'hidden') lay.style.visibility = 'visible';
//else if (lay.style.visibility == 'visible') lay.style.visibility = 'hidden';

}

function show_layer_1(id_chk)
{
//	var lay = eval("document.all." + id_chk)
//alert(document.getElementById(id_chk).style.display);
	if(document.getElementById(id_chk).style.display == "") { 
		//lay.style.display = "none"; //¼û±ä´Ù
		document.getElementById(id_chk).style.display = "none";
	}
	 else if (document.getElementById(id_chk).style.display == "none"){
		//lay.style.display = ""; //º¸¿©ÁØ´Ù
		document.getElementById(id_chk).style.display = "block";
	}
	 else if (document.getElementById(id_chk).style.display == "block"){
		//lay.style.display = ""; //º¸¿©ÁØ´Ù
//		document.getElementById(id_chk).style.display = "none";
	}
//if (lay.style.visibility == 'hidden') lay.style.visibility = 'visible';
//else if (lay.style.visibility == 'visible') lay.style.visibility = 'hidden';
}

function show_layer_2(id_chk)
{
//	var lay = eval("document.all." + id_chk)
//alert(document.getElementById(id_chk).style.display);
	if(document.getElementById(id_chk).style.display == "") { 
		//lay.style.display = "none"; //¼û±ä´Ù
//		document.getElementById(id_chk).style.display = "none";
	}
	 else if (document.getElementById(id_chk).style.display == "none"){
		//lay.style.display = ""; //º¸¿©ÁØ´Ù
//		document.getElementById(id_chk).style.display = "block";
	}
	 else if (document.getElementById(id_chk).style.display == "block"){
		//lay.style.display = ""; //º¸¿©ÁØ´Ù
		document.getElementById(id_chk).style.display = "none";
	}
//if (lay.style.visibility == 'hidden') lay.style.visibility = 'visible';
//else if (lay.style.visibility == 'visible') lay.style.visibility = 'hidden';
}