<!--

//*****************************************************************************
//
//		ÀÛ  ¼º : S E S O N
//		¼öÁ¤ÀÏ : 2007.04.11
//
//		<script>FlashWirte('test_id','swf_file','500','200','','','');</script>
//
//		¡Ø ÇÔ¼ö È£Ãâ½Ã ´ë¼Ò¹®ÀÚ ±¸ºÐ
//
//*****************************************************************************

// º¸¾È¼­¹ö Ã¼Å©
//if(window.location.protocol == "http:")
//{
//	window.location.href = "https://www.bonitokorea.co.kr:444/";
//}


// ----------------------------------------------------------------------------
// ÆË¾÷ ÄíÅ°ÀÌ¿ë
// ----------------------------------------------------------------------------
// ÄíÅ° ÀÐ±â
function CookieRead(cookieName)
{
	thisCookie = document.cookie.split("; ");
	for(i=0; i<thisCookie.length; i++)
	{
		if(cookieName == thisCookie[i].split("=")[0])
		{
			return thisCookie[i].split("=")[1];
		}
	}
	return "x";
}
// ÄíÅ° ÀúÀå
function CookieSave(name, value, expiredays) 
{ 
	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
}

//-----------------------------------------------------------------------------
// FLASH È£Ãâ ½ÃÀÛ
// <script>FlashWirte('test_id','swf_file','500','200','','','');</script>
// ¡Ø ÇÔ¼ö È£Ãâ½Ã ´ë¼Ò¹®ÀÚ ±¸ºÐ
//-----------------------------------------------------------------------------
// FlashWrite(¾ÆÀÌµð, ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î[, º¯¼ö][,¹è°æ»ö][,À©µµ¿ì¸ðµå])
function FlashWrite(id,url,w,h,vars,bg,win)
{
	// id´Â ÇÃ·¡½Ã ¿¬µ¿½Ã ÇÊ¼ö
	if(id==null)
	{
		// id°¡ ¾øÀ»¶§ ÆÄÀÏ¸íÀ¸·Î ¼³Á¤
		id=url.split("/")[url.split("/").length-1].split(".")[0];
		if(document.forms.length > 0)
		{
			id = document.forms[0].id;
		}
	}
	if(vars==null) vars='';
	if(bg==null) bg='#FFFFFF';
	if(win==null) win='transparent';

	// OBJECT, EMBED Á¤ÀÇ
	var FlashStr= "	<OBJECT classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
		FlashStr+="			codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
		FlashStr+="			width='"+w+"'";
		FlashStr+="			height='"+h+"'";
		FlashStr+="			id='"+id+"'";
		FlashStr+="			align='middle'>";

		FlashStr+="		<PARAM name='allowScriptAccess' value='always' />";
		FlashStr+="		<PARAM name='movie' value='"+url+"' />";
		FlashStr+="		<PARAM name='FlashVars' value='"+vars+"' />";
		FlashStr+="		<PARAM name='wmode' value='"+win+"' />";
		FlashStr+="		<PARAM name='menu' value='true' />";
		FlashStr+="		<PARAM name='quality' value='high' />";
		FlashStr+="		<PARAM name='bgcolor' value='"+bg+"' />";
	
	
		FlashStr+="		<EMBED src='"+url+"'";
		FlashStr+="		       flashVars='"+vars+"'";
		FlashStr+="		       wmode='"+win+"'";
		FlashStr+="		       menu='true'";
		FlashStr+="		       quality='high'";
		FlashStr+="		       bgcolor='"+bg+"'";
		FlashStr+="		       width='"+w+"'";
		FlashStr+="		       height='"+h+"'";
		FlashStr+="		       name='"+id+"'";
		FlashStr+="		       align='middle'";
		FlashStr+="		       allowScriptAccess='always'";
		FlashStr+="		       type='application/x-shockwave-flash'";
		FlashStr+="		       pluginspage='https://www.macromedia.com/go/getflashplayer'  alt='flash'/>";
		FlashStr+=" </OBJECT>";

	// OBJECT, EMBED Ãâ·Â
	document.write(FlashStr);
}
//-----------------------------------------------------------------------------
// Á¦Ç°°Ë»ö
//-----------------------------------------------------------------------------
function SearchProduct(str)
{
	if(str == "" || str == "Á¦Ç°°Ë»ö")
	{
		alert("°Ë»öÇÒ Á¦Ç°¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
		return;
	}
	else
	{
		document.location.href = "/Main/Market/SearchProduct.aspx?s="+str;
	}
}
//-----------------------------------------------------------------------------
// °´Ã¼ ÁÂÇ¥°ª ÃßÃâ ÇÔ¼ö
// obj : ÃøÁ¤ÇÒ °´Ã¼
//-----------------------------------------------------------------------------
function getBounds(obj)
{
	var ret = new Object();

	if(document.all)
	{
		var rect = obj.getBoundingClientRect();
		ret.left = rect.left + (document.documentElement.scrollLeft || document.body.scrollLeft);
		ret.top = rect.top + (document.documentElement.scrollTop || document.body.scrollTop);
		ret.width = rect.right - rect.left;
		ret.height = rect.bottom - rect.top;
	}
	else
	{ 
		var box = document.getBoxObjectFor(obj);
		ret.left = box.x; 
		ret.top = box.y; 
		ret.width = box.width; 
		ret.height = box.height; 
	} 
	return ret;
}
// °´Ã¼ LEFT ÁÂÇ¥
function GetXYLeft(n)
{
	var obj = getBounds(document.getElementById(n));
	return obj.left;
}
// °´Ã¼ TOP ÁÂÇ¥
function GetXYTop(n)
{
	var obj = getBounds(document.getElementById(n));
	return obj.top;
}
// °´Ã¼ WIDTH ÁÂÇ¥
function GetXYWidth(n)
{
	var obj = getBounds(document.getElementById(n));
	return obj.width;
}
// °´Ã¼ HEIGHT ÁÂÇ¥
function GetXYHeight(n)
{
	var obj = getBounds(document.getElementById(n));
	return obj.height;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-->
