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 );
}}


/* 선택테두리 숨기기 */
function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring;


/* 마우스오버확대*/


var divw=0;
var divh=0;

if (document.getElementById || document.all)
 document.write('<div id="imgtrailer" style="position:absolute;visibility:hidden;z-index:100;"></div>')

function gettrailobject()
{
 if (document.getElementById)
  return document.getElementById("imgtrailer")
 else if (document.all)
  return document.all.trailimagid
}

function gettrailobj()
{
 if (document.getElementById)
  return document.getElementById("imgtrailer").style
 else if (document.all)
  return document.all.trailimagid.style
}

function truebody()
{
 return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function hidetrail()
{
 document.onmousemove='';
 gettrailobj().visibility="hidden";
}


function showImage(imagename, caption)
{
  var img = new Image
  img.src=imagename;
  thw=img.width;
  thh=img.height;

  if (thw=="" || thw==0)
  {
   thw=500;
  }
  if (thh=="" || thh==0)
  {
   thh=500;
  }

  newHTML = '<table cellpadding=5 style="background-color: #FFFFFF; border: 1px solid #888;">';  
  newHTML = newHTML + '<tr><td align="center" style="padding: 8px 2px 2px 2px;"><img src="' + imagename + '" border="0"></td></tr>';
  if (caption !="")
  {
   newHTML = newHTML + '<tr><td> &nbsp; &nbsp;' + unescape(caption) + '</td></tr>';
  }
  newHTML = newHTML + '</table>';

  gettrailobj().left="-500px";
  divthw = parseInt(thw) + 2;
  gettrailobject().innerHTML = newHTML
  gettrailobj().visibility="visible";
  // 다음의 divw와 divh값을 변경하여 초기 위치를 변경할 수 있습니다.
  divw = parseInt(thw)+25;
  divh = parseInt(thh)+85;
  document.onmousemove=followmouse;
}

function followmouse(e)
{
 var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
 var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(document.body.offsetHeight, indow.innerHeight)
 if(typeof e != "undefined")
 {
  if(docwidth < 15+e.pageX+divw)
   xcoord = e.pageX-divw-5;
  else
   xcoord = 15+e.pageX;
  if(docheight < 15+e.pageY+divh)
   ycoord = 15+e.pageY-Math.max(0,(divh + e.pageY - docheight - truebody().scrollTop - 30));
  else
   ycoord = 15+e.pageY;
 }
 else if (typeof window.event != "undefined")
 {
  if(docwidth < 15+truebody().scrollLeft+event.clientX+divw)
   xcoord = truebody().scrollLeft-5+event.clientX-divw;
  else
   xcoord = truebody().scrollLeft+15+event.clientX;

  if(docheight < 15+truebody().scrollTop+event.clientY+divh)
   ycoord = 15+truebody().scrollTop+event.clientY-Math.max(0,(divh + event.clientY - docheight - 30));
  else
   ycoord = truebody().scrollTop+15+event.clientY;
 }
 gettrailobj().left=xcoord+"px"
 gettrailobj().top=ycoord+"px"
}






/* 롤링메뉴*/
<!--
	// 레이어 번호
	var do_id = 1;
	// 레이어 전환 지연시간
	var delay = 3000;

	var temp;

	function auto_run2()
	{
		clearInterval(temp);

		temp = setInterval("auto_tab2(do_id)", delay);
	}

	function auto_tab2(no)
	{
		do_id = ++no;
		if(do_id > 3)
			do_id = 1;

		for(i=1; i<=3; i++)
		{
			if(i == do_id)
			{
				document.all["t2"+i].style.display = "block";
				document.all["f2"+i].style.color = "red";
				document.all["f2"+i].style.fontWeight = "bold";
			}
			else
			{
				document.all["t2"+i].style.display = "none";
				document.all["f2"+i].style.color = "black";
				document.all["f2"+i].style.fontWeight = "normal";
			}
		}
	}

	function tap_ov(nu)
	{
		clearInterval(temp);

		do_id = nu;
		for(i=1; i<=3; i++)
		{
			if(i == nu)
			{
				document.all["t2"+i].style.display = "block";
				document.all["f2"+i].style.color = "red";
				document.all["f2"+i].style.fontWeight = "bold";
			}
			else
			{
				document.all["t2"+i].style.display = "none";
				document.all["f2"+i].style.color = "black";
				document.all["f2"+i].style.fontWeight = "normal";
			}
		}
	}

	function out()
	{
		temp = setInterval("auto_tab2(do_id)", delay);
	}

	 function over_2(nu)
 {
  clearInterval(temp);
 }

//-->
//function window::onload(){
//auto_run();
//auto_run2();
//}

