//È­¸é Á¤°¡¿îµ¥ ¶ç¿ì±â
function openWinCenter(url, wname, wopt) {
	var newopt = "", wHeight = 0, wWidth = 0;
	if (wopt != undefined) {
		var woptlist = wopt.replace(/ /g, "").split(",");
		for (var i in woptlist) {
			if (woptlist[i].match(/^height=/i)) {
				wHeight = parseInt(woptlist[i].substr(7),10);
				if (!isNaN(wHeight)) newopt += "top=" + Math.floor((screen.availHeight - wHeight) / 2) + ",";
			}
			if (woptlist[i].match(/^width=/i)) {
				wWidth = parseInt(woptlist[i].substr(6),10);
				if (!isNaN(wWidth)) newopt += "left=" + Math.floor((screen.availWidth - wWidth) / 2) + ",";
			}
		}
	}
	return window.open(url, wname, newopt + wopt);
}


//ÄíÅ° ¼³Á¤
function getCookie( name )
	{
	var nameOfCookie = name + "=";
	var x = 0;
		while ( x <= document.cookie.length )
		{
			var y = (x+nameOfCookie.length);
			if ( document.cookie.substring( x, y ) == nameOfCookie )
				{
				if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
					endOfCookie = document.cookie.length;
				return unescape( document.cookie.substring( y, endOfCookie ) );
				}
			x = document.cookie.indexOf( " ", x ) + 1;
			if ( x == 0 )
				break;
			}
			return "";
	}


function bluring()
{if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();}
document.onfocusin=bluring;


function Catalog() {
//	window.open("../event/offline.html","Catalog","width=620,height=750,toolbar=no,menubar=no,location=no,scrollbars=yes,status=no");
	window.open("../catalog09s/index.html","Catalog","width=815,height=763,toolbar=no,menubar=no,location=no,scrollbars=yes,status=no");
}

function Refund() {
//	window.open("../event/offline.html","Catalog","width=620,height=750,toolbar=no,menubar=no,location=no,scrollbars=yes,status=no");
	window.open("../mypage/cash_refund.html","Refund","width=510,height=400,toolbar=no,menubar=no,location=no,scrollbars=yes,status=no");
}

function Catalog_colleen() {
	window.open("../colleen_catalog/coordi_book.html","Catalog","width=782,height=705,toolbar=no,menubar=no,location=no,scrollbars=yes,status=no");
}


function poll_open() {
	window.open("../poll/poll.php","Catalog","width=420,height=500,toolbar=no,menubar=no,location=no,scrollbars=no,status=no");
}


function flash(c,d,e) {
 var flash_tag = "";
 flash_tag = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
 flash_tag +='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
 flash_tag +='WIDTH="'+c+'" HEIGHT="'+d+'" >';
 flash_tag +='<param name="movie" value="'+e+'">';
 flash_tag +='<param name="quality" value="high">';
 flash_tag +='<param name="wmode" value="transparent">';
 flash_tag +='<embed src="'+e+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
 flash_tag +='type="application/x-shockwave-flash"  WIDTH="'+c+'" HEIGHT="'+d+'"></embed></object>'

 document.write(flash_tag);

}

function goto_item(brand) {
	if(brand == 'GU_item') { var mall_code = '11'; var brand_code = '100'; var code = 'S07_11100'; var item = document.form.GU_item.value; }
	else if(brand == 'KU_item') { var mall_code = '11'; var brand_code = '101'; var code = 'S07_11101'; var item = document.form.GU_item.value; }
	else if(brand == 'G_item') { var mall_code = '11'; var brand_code = '100'; var code = 'S07_11100'; var item = document.form.G_item.value; }
	else if(brand == 'K_item') { var mall_code = '11'; var brand_code = '101'; var code = 'S07_11101'; var item = document.form.K_item.value; }

	location.href='../shopping/goods_list.php?mall_code='+mall_code+'&brand_code='+brand_code+'&item_code='+item+'&code='+code+'&viewtype=new';
}

/************************************************************************************************************************************
    > Áñ°ÜÃ£±â
*************************************************************************************************************************************/
function addbookmark()
{
	bookmarkurl="http://www.fashion1st.co.kr/"
	bookmarktitle="ÆÐ¼Ç1¹øÁö"
	if (document.all)window.external.AddFavorite(bookmarkurl,bookmarktitle)
}


/************************************************************************************************************************************
    > ¿¡·¯¸Þ¼¼Áö Ã¢ - °¢Á¾ ÀÔ·ÂÆû¿¡ ´ëÇÑ ¸Þ¼¼Áö Ãâ·Â
*************************************************************************************************************************************/
/*
function MsgConfirm(msg)
	{var win = showModalDialog('http://www.shopping1st.com/5th/common/msg_confirm.html?msg='+msg, 'ErrorWin', "dialogWidth:360px; dialogHeight:220px; center=yes; screenTop=yes; scroll=no; status=no; help=no;");}
*/
/************************************************************************************************************************************
    > ¿¡·¯¸Þ¼¼Áö Ã¢ - °¢Á¾ ÀÔ·ÂÆû¿¡ ´ëÇÑ ¸Þ¼¼Áö Ãâ·Â
*************************************************************************************************************************************/
function ErrorWin(msg)
	{var win = showModalDialog('../common/message.php?msg='+msg, 'ErrorWin', "dialogWidth:366px; dialogHeight:220px; center=yes; screenTop=yes; scroll=no; status=no; help=no;");}

/************************************************************************************************************************************
    > ¿¡·¯¸Þ¼¼Áö Ã¢ - °¢Á¾ ÀÔ·ÂÆû¿¡ ´ëÇÑ ¸Þ¼¼Áö Ãâ·Â
*************************************************************************************************************************************/
function ErrorWinHome(msg)
	{var win = showModalDialog('http://www.fashion1st.co.kr/common/error_win.html?msg='+msg, 'ErrorWin', "dialogWidth:360px; dialogHeight:220px; center=yes; screenTop=yes; scroll=no; status=no; help=no;"); document.location.href="../index.html";}

/************************************************************************************************************************************
    > ¿ìÆí¹øÈ£ °Ë»öÃ¢
*************************************************************************************************************************************/
function PostSearch(post_type)
	{window.open('../common/post_search.php?post_type='+post_type, 'PostSearch', 'scrollbars=yes,resizable=no,copyhistory=no,width=460,height=269,left=0,top=0' );}

/************************************************************************************************************************************
    > ¿¡·¯¸Þ¼¼Áö Ã¢ - Back
*************************************************************************************************************************************/
function CardEvent()
	{var win = showModalDialog('http://www.fashion1st.co.kr/index/0625_og.html', 'CardEvent', "dialogWidth:255px; dialogHeight:280px; center=yes; screenTop=yes; scroll=no; status=no; help=no;");}

/************************************************************************************************************************************
    > ÀÌ¸ÞÀÏ ¼öÁý°ÅºÎ
*************************************************************************************************************************************/
function NoEmail()
	{
	var win = showModalDialog('../common/no_email.html', 'NoEmail',"dialogWidth:400px; dialogHeight:260px; center=yes; screenTop=yes; scroll=no; status=no; help=no;");
	//window.open('./zoom_img.html?seq_no='+seq_no, 'zoom_win', 'scrollbars=no,resizable=no,copyhistory=no,width=670,height=600,left=0,top=0' );
	}

/************************************************************************************************************************************
    > Çö±Ý¿µ¼öÁõ
*************************************************************************************************************************************/
function Cash_receipt()
	{
	//var win = showModalDialog('http://www.fashion1st.co.kr/common/cash_receipt.html', 'Cash_receipt',"dialogWidth:500px; dialogHeight:690px; center=yes; screenTop=yes; scroll=no; status=no; help=no;");
	window.open('http://www.fashion1st.co.kr/common/cash_receipt.html', 'CashReceipt', 'scrollbars=yes,resizable=no,copyhistory=no,width=520,height=650,left=0,top=0' );
	}

/************************************************************************************************************************************
    > 08Summer Step
*************************************************************************************************************************************/
function Summer_Step()
	{	window.open('http://www.fashion1st.co.kr/event/event_gk_08m_step.php', 'SummerStep', 'scrollbars=yes,resizable=no,copyhistory=no,width=720,height=650,left=0,top=0' );}

/************************************************************************************************************************************
    > titanium sizeinfo
*************************************************************************************************************************************/
function Titanum_SizeInfo()
	{
	var win = showModalDialog('http://www.fashion1st.co.kr/common/sizeinfo_titanium.html', 'SizeInfo',"dialogWidth:510px; dialogHeight:730px; center=yes; screenTop=yes; scroll=no; status=no; help=no;");
	//window.open('./zoom_img.html?seq_no='+seq_no, 'zoom_win', 'scrollbars=no,resizable=no,copyhistory=no,width=670,height=600,left=0,top=0' );
	}
/************************************************************************************************************************************
    > zenrico sizeinfo
*************************************************************************************************************************************/
function Zenrico_SizeInfo()
	{
	var win = showModalDialog('http://www.fashion1st.co.kr/common/sizeinfo_zenrico.html', 'SizeInfo',"dialogWidth:625px; dialogHeight:670px; center=yes; screenTop=yes; scroll=yes; status=no; help=no;");
	//window.open('./zoom_img.html?seq_no='+seq_no, 'zoom_win', 'scrollbars=no,resizable=no,copyhistory=no,width=670,height=600,left=0,top=0' );
	}
/************************************************************************************************************************************
    > anna sizeinfo
*************************************************************************************************************************************/
function Anna_SizeInfo()
	{
	var win = showModalDialog('http://www.fashion1st.co.kr/common/sizeinfo_anna.html', 'SizeInfo',"dialogWidth:456px; dialogHeight:630px; center=yes; screenTop=yes; scroll=yes; status=no; help=no;");
	//window.open('./zoom_img.html?seq_no='+seq_no, 'zoom_win', 'scrollbars=no,resizable=no,copyhistory=no,width=670,height=600,left=0,top=0' );
	}
/************************************************************************************************************************************
    > ÀÔ±Ý°èÁÂ ¹øÈ£
*************************************************************************************************************************************/
function Online()
	{
	var win = showModalDialog('../common/account_msg.html', 'Online',"dialogWidth:360px; dialogHeight:365px; center=yes; screenTop=yes; scroll=no; status=no; help=no;");
	//window.open('./zoom_img.html?seq_no='+seq_no, 'zoom_win', 'scrollbars=no,resizable=no,copyhistory=no,width=670,height=600,left=0,top=0' );
	}

/************************************************************************************************************************************
    > ¼ýÀÚ¸¸ÀÔ·Â°¡´É
*************************************************************************************************************************************/
function NumberCheck()
	{
  if((event.keyCode<48) || (event.keyCode>57))
	{event.returnValue=false;}
	}

/************************************************************************************************************************************
    > Æ÷Ä¿½º ÀÌµ¿
*************************************************************************************************************************************/
function moveFocus(num,fromform,toform)
{
	var str = fromform.value.length;
	if ( str == num )
	toform.focus();
}

/************************************************************************************************************************************
    > ´Ù¸¥¸ÅÀå ¹Ù·Î°¡±â
*************************************************************************************************************************************/
function MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	//alert("i : "+i+" , p : "+p +" , v : "+v+" , obj : "+obj +" , args: "+args);
	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;

			
				if(v == "show"){
					v = "block";
				}else if(v=="hide"){
					v = "none";
				}
			}
			obj.display=v;
		}
	}
}

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 classview() {
	window.open("../customer/class.html","Returning","width=700,height=500,toolbar=no,menubar=no,location=no,scrollbars=yes,status=no"); 
}

function howdi_money() {
	window.open("../customer/howdimoney.html","Returning","width=700,height=500,toolbar=no,menubar=no,location=no,scrollbars=yes,status=no"); 
}