/////////// 추천도서/신간도서 //////////////// 
////////// "따움표가 들어가면 않됩니다. //////////////

function msglnik01(){document.write("<a href='http://www.gosiday.net/front/php/product.php?product_no=153&main_cate_no=1&display_group=2'>선행정학구입시 기출문제증정</a>");}
function msglnik02(){document.write("<a href='http://gosiday.net/Front/Product/?url=Product&product_no=SFSELFAA0012207&main_cate_no=AAAAAD00&display_group=1'>김종석교재 20%할인이벤트</a>");}
function msglnik03(){document.write("<a href='http://gosiday.net/Front/Product/?url=Product&product_no=CRAACQAA0089957&main_cate_no=AOAD0000&display_group=1'>패스통합영어 구입시 어휘집증정</a>");}
function msglnik04(){document.write("<a href='http://www.gosiday.net/front/php/category.php?cate_no=476'>[유망] 유통관리사2급 교재알아보기</a>");}

/////////// 강사진 배너 링크 관리 ////////////////
////////// "따움표가 들어가면 않됩니다. //////////////

function msglnik05(){document.write("<a href='http://gosiday.net/front/php/category.php?cate_no=1175'><img src=http://file.gosiday.cafe24.com/Design/skin_2/quick_banner/m_1.gif border=0></a>");}
function msglnik06(){document.write("<a href='http://gosiday.net/front/php/category.php?cate_no=4'><img src=http://file.gosiday.cafe24.com/Design/skin_2/quick_banner/m_2.gif border=0></a>");}
function msglnik07(){document.write("<a href='http://gosiday.net/front/php/category.php?cate_no=1083'><img src=http://file.gosiday.cafe24.com/Design/skin_2/quick_banner/m_3.gif border=0></a>");}
function msglnik08(){document.write("<a href='http://gosiday.net/front/php/category.php?cate_no=467'><img src=http://file.gosiday.cafe24.com/Design/skin_2/quick_banner/m_4.gif border=0></a>");}
function msglnik09(){document.write("<a href='http://gosiday.net/front/php/category.php?cate_no=452'><img src=http://file.gosiday.cafe24.com/Design/skin_2/quick_banner/m_5.gif border=0></a>");}
function msglnik10(){document.write("<a href='http://gosiday.net/front/php/category.php?cate_no=289'><img src=http://file.gosiday.cafe24.com/Design/skin_2/quick_banner/m_6.gif border=0></a>");}
function msglnik11(){document.write("<a href='http://gosiday.net/front/php/category.php?cate_no=1089'><img src=http://file.gosiday.cafe24.com/Design/skin_2/quick_banner/m_7.gif border=0></a>");}
function msglnik12(){document.write("<a href='http://gosiday.net/front/php/category.php?cate_no=1523'><img src=http://file.gosiday.cafe24.com/Design/skin_2/quick_banner/m_8.gif border=0></a>");}



function open_window( filename, option, name )
{
	if( !name )
	{
		name = 'new'
	}


        win = window.open( filename, name, option );

        return win
}

function window_open( page, name, top, left, width, height )
{
	option = "'toolbar=no," +
		"location=no," +
		"directories=no," +
		"status=no," +
		"menubar=no," +
		"scrollbars=yes," +
		"resizable=yes," +
		"width=" + width + "," +
		"height=" + height + "," +
		"top=" + top + "," +
		"left=" + left + "'"

        window.open( page, name, option );
}

function open_poll_pop( mode, no )
{
	page = '/front/php/poll_r.php?mode=' + mode + '&no=' + no;
	window_open( page, 'poll', 100, 300, 466, 382 );
}

/*Left menu 반투명 레이어 구현*/
function Layer_overload(LayerName,Status) 
{
    if (navigator.appName == "Netscape")
    {
		LayerN = document.getElementById(LayerName).style;
		if (Status == 'show') LayerN.visibility = 'visible';
		if (Status == 'hide') LayerN.visibility = 'hidden';
    }	
    else
    {
		LayerN = document.all[LayerName].style;
		if (Status == 'show') LayerN.visibility = 'visible';
		if (Status == 'hide') LayerN.visibility = 'hidden';
    }
}

/*Left menu구현*/
var old='';

function menu(name)
{
	submenu=eval("submenu_"+name+".style");
	if(old!=submenu)
	{
		if(old!='')
		{
			old.display='none';
		}
		submenu.display='block';
		old=submenu;
	}
	else
	{
		submenu.display='none';
		old='';
	}
}


function Layer_rollover(img_name,img_url)
{
	var menu;	
	//tmp = new String( "document."+img_name );
	menu=eval("document."+img_name);		
	menu.src = img_url;
	return;
}

function image_zoom( product_no, main_cate_no, display_group )
{
	//href = '/front/php/image_zoom.php?img='+image+'&product_no='+document.frm.product_no.value;
	href = '/front/php/image_zoom.php?product_no='+product_no+'&main_cate_no='+main_cate_no+'&display_group='+display_group;
	option = 'toolbar=no,scrollbars=no,resizable=yes,width=800,height=640,left=0,top=0';
	win_name = 'image'

	window.open( href, win_name, option );
}



/// 왼쪽 레이어 스크롤 //////////////////////////////////////////////////////////

var stmnLEFT = 10; // 스크롤메뉴의 좌측 위치
var stmnGAP1 = 236; // 페이지 헤더부분의 여백
var stmnGAP2 = 236; // 스크롤시 브라우저 상단과 약간 띄움. 필요없으면 0으로 세팅
var stmnBASE = 260; // 스크롤메뉴 초기 시작위치 (아무렇게나 해도 상관은 없지만 stmnGAP1과 약간 차이를 주는게 보기 좋음)

var stmnActivateSpeed = 100; // 움직임을 감지하는 속도 (숫자가 클수록 늦게 알아차림)
var stmnScrollSpeed = 10; // 스크롤되는 속도 (클수록 늦게 움직임)
var stmnTimer;



function ReadCookie(name) {
var label = name + "=";
var labelLen = label.length;
var cLen = document.cookie.length;
var i = 0;


while (i < cLen) {
        var j = i + labelLen;

       if (document.cookie.substring(i, j) == label) {
       var cEnd = document.cookie.indexOf(";", j);
       if (cEnd == -1) cEnd = document.cookie.length;
       return unescape(document.cookie.substring(j, cEnd));

        }

i++;

   }
return "";

}



function SaveCookie(name, value, expire) {
var eDate = new Date();
eDate.setDate(eDate.getDate() + expire);
document.cookie = name + "=" + value + "; expires=" +  eDate.toGMTString()+ "; path=/";
}


function RefreshStaticMenu() {
var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;
stmnStartPoint = parseInt(STATICMENU.style.top, 10);
stmnEndPoint = document.body.scrollTop + stmnGAP2;
if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;

stmnRefreshTimer = stmnActivateSpeed;
if ( stmnStartPoint != stmnEndPoint ) {

        stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 30 );
        STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );

        stmnRefreshTimer = stmnScrollSpeed;

        }

        stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);

}



function ToggleAnimate() {

	if (!ANIMATE.checked) {

		RefreshStaticMenu();

                SaveCookie("ANIMATE", "true", 300);

                } else {

                clearTimeout(stmnTimer);

                STATICMENU.style.top = stmnGAP1;

                SaveCookie("ANIMATE", "false", 300);

        }

}



function InitializeStaticMenu() {

//STATICMENU.style.left = stmnLEFT;

	if (ReadCookie("ANIMATE") == "false") {

                ANIMATE.checked = true;

                STATICMENU.style.top = document.body.scrollTop + stmnGAP1;

                } else {

                ANIMATE.checked = false;

                STATICMENU.style.top = document.body.scrollTop + stmnBASE;

                RefreshStaticMenu();

        }
}

function MM_jumpMenu(targ, selObj, restore)
{
  window.open(selObj.options[selObj.selectedIndex].value);
  if (restore) selObj.selectedIndex=0;
}

//===== 상품분류 / 상품상세정보 상단 배너
var maxLoopsF = 2; //이미지 수 만큼
var Interval = 2; //멈추어 있는 시간
var j        = 0;
var cnt      = 1;

function slide_show()   {
	if (j != 0)   {
		objdiv  = eval('bestwoman' + j);

	}

	objdiv1 = eval('bestwoman' + cnt);



	bestwoman.filters[0].Apply();


	if (j != 0)   objdiv.style.display = "none";
	objdiv1.style.display = "block";
	bestwoman.filters[0].play();


	j = cnt;
	if (cnt < maxLoopsF)	{
		cnt++;
	}
	else	{
		cnt = 1;
	}

	setTimeout("slide_show()", Interval*1000+3000);
}