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 = 5; // 스크롤메뉴의 좌측 위치 
var stmnGAP1 = 0; // 페이지 헤더부분의 여백 
var stmnGAP2 = 0; // 스크롤시 브라우저 상단과 약간 띄움. 필요없으면 0으로 세팅 
var stmnBASE = 0; // 스크롤메뉴 초기 시작위치 (아무렇게나 해도 상관은 없지만 stmnGAP1과 약간 차이를 주는게 보기 좋음) 
var stmnActivateSpeed = 0; // 움직임을 감지하는 속도 (숫자가 클수록 늦게 알아차림) 
var stmnScrollSpeed = 0; // 스크롤되는 속도 (클수록 늦게 움직임) 

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 RefreshRQUICK() 
        { 
                var stmnStartPoint, stmnEndPoint, stmnRefreshTimer; 

                stmnStartPoint = parseInt(RQUICK.style.top, 10); 

                                        
                                        stmnEndPoint = document.body.scrollTop + stmnGAP2; 

                        stmnLimit = parseInt(window.document.body.scrollHeight) - parseInt(RQUICK.offsetHeight); 
                        if (stmnEndPoint > stmnLimit) stmnEndPoint = stmnLimit; 
                                        
                                        if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1; 

                stmnRefreshTimer = stmnActivateSpeed; 

                if ( stmnStartPoint != stmnEndPoint ) { 
                        stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 5 ); 
                        RQUICK.style.top = parseInt(RQUICK.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount ); 
                        stmnRefreshTimer = stmnScrollSpeed; 
                } 

                stmnTimer = setTimeout ("RefreshRQUICK();", stmnRefreshTimer); 
        } 

function ToggleAnimate() { 
        if (!ANIMATE.checked) { 
                RefreshRQUICK(); 
                SaveCookie("ANIMATE", "true", 0); 
                } else { 
                clearTimeout(stmnTimer); 
                RQUICK.style.top = stmnGAP1; 
                SaveCookie("ANIMATE", "false", 0); 
        } 
} 

function InitializeRQUICK() { 
//RQUICK.style.left = stmnLEFT; 
        if (ReadCookie("ANIMATE") == "false") { 
                ANIMATE.checked = true; 
                RQUICK.style.top = document.body.scrollTop + stmnGAP1; 
                } else { 
                ANIMATE.checked = false; 
                RQUICK.style.top = document.body.scrollTop + stmnBASE; 
                RefreshRQUICK(); 
        } 
} 








if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){
    cot_t1_DOCtp="_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight+0);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}";
}else{
    cot_t1_DOCtp="_top:expression(document.body.scrollTop+document.body.clientHeight-document.body.clientHeight+this.clientHeight-this.clientHeight+0);_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);}";
}

var cot_tl_bodyCSS='* html {background:url() fixed;background-repeat: repeat;background-position: right bottom;}';
var cot_tl_fixedCSS='#cot_tl_fixed{position:fixed;';
var cot_tl_fixedCSS=cot_tl_fixedCSS+'_position:absolute;';
var cot_tl_fixedCSS=cot_tl_fixedCSS+'z-index:10000;';
var cot_tl_fixedCSS=cot_tl_fixedCSS+'width:100%;';
var cot_tl_fixedCSS=cot_tl_fixedCSS+'text-align:center;';
var cot_tl_fixedCSS=cot_tl_fixedCSS+'bottom:0px;';
var cot_tl_fixedCSS=cot_tl_fixedCSS+'right:0px;';
var cot_tl_fixedCSS=cot_tl_fixedCSS+'clip:rect(0 100% 100% 0);';
var cot_tl_fixedCSS=cot_tl_fixedCSS+cot_t1_DOCtp;

document.write('<style type="text/css">'+cot_tl_bodyCSS+cot_tl_fixedCSS+'</style>');


if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){
    cot_t1_DOCtp="_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}";
}else{
    cot_t1_DOCtp="_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);}";
}

var cot_tl_bodyCSS='* html {background:url() fixed;background-repeat: repeat;background-position: right bottom;}';
var cot_tl_fixed2CSS='#cot_tl_fixed2{position:fixed;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'_position:absolute;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'z-index:10000;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'width:100%;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'text-align:center;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'bottom:0px;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'right:0px;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'clip:rect(0 100% 100% 0);';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+cot_t1_DOCtp;

document.write('<style type="text/css">'+cot_tl_bodyCSS+cot_tl_fixed2CSS+'</style>');







nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
        
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}


function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") 

document.body.focus(); 
} 
document.onfocusin=bluring; 






 function msgposit_list(evt){
  if(navigator.appName == "Netscape"){
   helpbox.style.left = evt.pageX + 10;
   helpbox.style.top  = evt.pageY + 20;
  } else {
   helpbox.style.posLeft = event.x + 10 + document.body.scrollLeft;
   helpbox.style.posTop  = event.y + 20 + document.body.scrollTop;
  }
 }

 function msgset_list(str){
  var text;
  text ='<table border="1" cellpadding="15 cellspacing="0" style="border-collapse: collapse; border: 1px dotted Gray;" bgcolor="#000000" style="FILTER: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=80)" width="260">';
  text += '<tr><td><font color="yellow">'+str+'</td></tr></table>';
  helpbox.innerHTML=text;
 }

 function msghide_list(){helpbox.innerHTML='';}

 if(navigator.appName == "Netscape"){
  document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
  document.onmousemove = msgposit_list;
 }







function makevisible(cur,which){
strength=(which==0)? 1 : 0.8

if (cur.style.MozOpacity)
cur.style.MozOpacity=strength
else if (cur.filters)
cur.filters.alpha.opacity=strength*100
}






function overInput(f) {
    f.className = "onInput3";
}

function outInput(f) {
    f.className = "offInput3";
}







function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") 

document.body.focus(); 
} 
document.onfocusin=bluring; 






function img_over(ename,bsrc,btag){   //이미지에 마우스를 올렸을때 작동
    bigImg.src = bsrc;

    iname.innerHTML = ename;
    imgWin.style.display="";
}





function mouse_move(){       //이미지 영역에서 마우스가 움직일때 작동
    var i_width = parseInt(imgWin.style.width);
    var i_height = parseInt(imgWin.style.height);
    var s_width = document.body.offsetWidth ;
    var s_height= document.body.offsetHeight;
    if((i_width + event.x) > s_width){
        imgWin.style.left = event.x - 10 -i_width;
    }else{
        imgWin.style.left = event.x + 10;
    }
    if((i_height + event.y) > s_height){
        imgWin.style.top = s_height - i_height;
    }else{
        imgWin.style.top = event.y + 10;
    }
}





function img_out(){    //이미지 영역에서 마우스가 벗어났을때 작동
    imgWin.style.display = "none";
} 






function flashWrite(url,w,h,id,bg,vars,win){

	// 플래시 코드 정의
	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='FlashVars' value='"+vars+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	// 플래시 코드 출력
	document.write(flashStr);

}




function price_view(price,url,w,h,id,bg,vars,win){
 
price = price;
price = price.replace('<FONT STYLE="color:#990000;font-size:13;font-style:;font-weight:bold"><span id=main_price>','');
price = price.replace('</span></font>','');
price = price.replace(',','');


var flashStra=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='FlashVars' value='&price=" +price+ "' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src='"+url+"' FlashVars='&price=" +price+ "' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	// 플래시 코드 출력
	document.write(flashStra);

}




function img_tr(id,imgname) 
{ 
eval(id+'.filters.blendTrans.stop();'); 
eval(id+'.filters.blendTrans.Apply();'); 
eval(id+'.src="'+imgname+'";'); 
eval(id+'.filters.blendTrans.Play();'); 
} 





var offsetfromcursorX=5 //Customize x offset of tooltip
var offsetfromcursorY=5 //Customize y offset of tooltip

var offsetdivfrompointerX=5 //Customize x offset of tooltip DIV relative to pointer image
var offsetdivfrompointerY=5 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

document.write('<div id="dhtmltooltip"></div>') //write out tooltip DIV
document.write('<img id="dhtmlpointer" src="http://file.sobinsbabyc.cafe24.com/Design/skin_5/Dotz.gif">') //write out pointer image

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth){
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight){
tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

document.onmousemove=positiontip





function bookmarksite(title,url) { 
title=parent.document.title;
url=parent.location.href;
   if (window.sidebar) // firefox 
   window.sidebar.addPanel(title, url, ""); 
   else if(window.opera && window.print)
   { // opera 
      var elem = document.createElement('a'); 
      elem.setAttribute('href',url); 
      elem.setAttribute('title',title); 
      elem.setAttribute('rel','sidebar'); 
      elem.click(); 
   } 
   else if(document.all) // ie
   window.external.AddFavorite(url, title); 
}






var stmnGAP1 = 0; // 페이지 헤더부분의 여백 (이보다 위로는 올라가지 않음)
        var stmnGAP2 = 0; // 스크롤시 브라우저 상단과 약간 띄움. 필요없으면 0으로 세팅
        var stmnBASE = 1000; // 스크롤메뉴 초기 시작위치 (아무렇게나 해도 상관은 없지만 stmnGAP1과 약간 차이를 주는게 보기 좋음)
        var stmnActivateSpeed = 0.1; // 움직임을 감지하는 속도 (숫자가 클수록 늦게 알아차림)
        var stmnScrollSpeed = 0.1; // 스크롤되는 속도 (클수록 늦게 움직임)

        var stmnTimer;

        // 스크롤 메뉴의 위치 갱신
        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 ) / 15 );
                        STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount 

);
                        stmnRefreshTimer = stmnScrollSpeed;  //움직여라라는말 같다 
                }

                stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
        }


        // 메뉴 초기화
        function InitializeStaticMenu()
        {
                        STATICMENU.style.top = document.body.scrollTop + stmnBASE; // 기본위치로 이동한다.
                        RefreshStaticMenu(); // 스크립트 가동
        }



function flashObject(file_name,id,flashVar,width,height){
  document.write('<object id="' + id + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '">');
  document.write('<param name="movie" value="' + file_name + '">');
  document.write('<param name=FlashVars value="' + flashVar + '">');
  document.write('<param name="quality" value="high">');
  document.write('<param name="bgcolor" value="#ffffff">');
  document.write('<param name="wmode" value="transparent">');
  document.write('<param name="allowScriptAccess" value="always">');
  document.write('<embed src="' + file_name +'" name="' + id +'" FlashVars="' + flashVar +'" width="' + width + '" height="' + height + '" quality="high" bgcolor="#ffffff" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" allowScriptAccess="always" allowNetworking="all"></embed>');
  document.write('</object>');
}


function toFlash(){
try {
	thisMovie("bgSound_show").callFc();
} catch(e) {}
}
function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}
document.onkeydown = function(e){
      key = (e) ? e.keyCode : event.keyCode;
      if(key==27){
        toFlash()
      }
}

function hidestatus()
{
window.status=''
return true
}
if (document.layers)
document.captureEvents(Event.mouseover | Event.mouseout)
document.onmouseover=hidestatus
document.onmouseout=hidestatus


// document.onmousedown = function () { if(event.button == 2) alert("Mind'9 - Cafe24 Design MastersnnOfficial Site - http://www.mind9.co.krnOffice Call : 031-677-8758nnProfessional Agency - Mind'9"); }
