
/*flash menu link*/
var flashLink=new Array();
flashLink[00]="/";

flashLink[01]="/shop/cart.php";
flashLink[02]="/mypage/order_list.php";
flashLink[03]="/mypage/mypage.php";
flashLink[04]="/shop/product_qna_list.php";
flashLink[05]="/shop/product_review_list.php";

flashLink[06]="/shop/big_section.php?cno1=1004";
flashLink[07]="/shop/big_section.php?cno1=1005";
flashLink[08]="/shop/big_section.php?cno1=1006";
flashLink[09]="/shop/big_section.php?cno1=1007";
flashLink[10]="/shop/big_section.php?cno1=1008";
flashLink[11]="/shop/big_section.php?cno1=1009";
flashLink[12]="/shop/big_section.php?cno1=1010";
flashLink[13]="/shop/big_section.php?cno1=1011";
flashLink[14]="/shop/big_section.php?cno1=1012";
flashLink[15]="/shop/big_section.php?cno1=1013";
flashLink[16]="/shop/big_section.php?cno1=1014";
flashLink[17]="/board?db=photo";



function goFlash(n){
	if (flashLink[n]) location.href=flashLink[n];	
}

function menu_OnOver(o,mtd){
	num=o.name.replace("a","");
	if (mtd==1 || num==now_menu)
	{
		img='_image/common/'+num+'r.gif';
	}
	else 
	{
		img='_image/common/'+num+'.gif';
	}

	o.src = img;
}

//quick
var quick_limit_top = 10; // ÀüÃ¼ ÆäÀÌÁö ±âÁØ À§ÂÊ ÇÑ°è ÇÈ¼¿ 
var quick_margin_top = 10; // ÇöÀç º¸°í ÀÖ´Â È­¸é ±âÁØ À§ÂÊ ÇÑ°è ÇÈ¼¿
var quick_margin_bottom = 480; // ¾Æ·¡ÂÊ ÇÑ°è ÇÈ¼¿
var quick_speed = 20; // ÇÑ¹ø¿¡ ¿òÁ÷ÀÌ´Â ÇÈ¼¿ °£°Ý
var quick_interval = 10; // ¿òÁ÷ÀÌ´Â ½Ã°£ °£°Ý

setInterval ("quickscroll()", quick_interval);

function quickscroll() {

	qm = document.getElementById ("quickmenu");

	if (qm)	{

		qm_move_y = document.body.scrollTop + quick_margin_top;
		if (qm_move_y < quick_limit_top ) qm_move_y = quick_limit_top;

		nowTop = parseInt(qm.style.top);

		minus = nowTop - qm_move_y;
		if (Math.abs(minus) >= quick_speed ) minus = 0;

		if ( nowTop != qm_move_y) moving = ( nowTop > qm_move_y) ? (quick_speed * -1) : quick_speed;
		else moving = 0;

		nextPos = nowTop + (moving - minus);

		if (nextPos + qm.offsetHeight + quick_margin_bottom > document.body.scrollHeight ) nextPos = document.body.scrollHeight - qm.offsetHeight - quick_margin_bottom;

		qm.style.top = parseInt(nextPos);
	}

}

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  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; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function imgCbox(N, tabstop)
{
	var objs, cboxes, Img, Span, A;

	if (typeof N == 'undefined') return false;
	if (typeof tabstop == 'undefined') tabstop = true;
	if ((objs=document.getElementsByName(N)) == null) return false;

	for (var i=0; i < objs.length; i++) {
		if (objs[i].tagName.toLowerCase() != "input" || objs[i].type.toLowerCase() != "checkbox") continue;
		
		if (typeof imgCbox.Objs[N] == 'undefined') {
			imgCbox.Objs[N] = new Array;
			imgCbox.ImgObjs[N] = new Array;
		}
		
		var len = imgCbox.Objs[N].length;
		imgCbox.Objs[N][len] = objs[i];
		imgCbox.ImgObjs[N][len] = {};

		// anchor element for tab stop
		A = document.createElement("A");
		if (tabstop) {
			A.href = "javascript:;";
		}
		A.onclick =  new Function("imgCbox.onclick('"+N+"',"+len+")");
		A.style.borderWidth = "0px";
		A.style.cursor = "pointer";

		// for image cache
		Img = document.createElement("IMG");
		Img.src = objs[i].getAttribute("onsrc");
		Img.style.borderWidth = "0px";
		Img.style.display = objs[i].checked?"":"none";
		imgCbox.ImgObjs[N][len]["on"] = Img;
		A.appendChild(Img);

		Img = document.createElement("IMG");
		Img.src = objs[i].getAttribute("offsrc");
		Img.style.borderWidth = "0px";
		Img.style.display = objs[i].checked?"none":"";
		imgCbox.ImgObjs[N][len]["off"] = Img;
		A.appendChild(Img);

		// insert object
		Span = objs[i].parentNode;
		Span.style.display = "none";
		Span.parentNode.insertBefore(A, Span);

	}
}
imgCbox.onclick = function(N, idx) {
	var C = imgCbox.Objs[N][idx];
	var I = imgCbox.ImgObjs[N][idx];

	C.checked = !C.checked;
	if (C.checked) {
		I["on"].style.display = "";
		I["off"].style.display = "none";
	} else {
		I["on"].style.display = "none";
		I["off"].style.display = "";
	}
	
	// fire event
	if (typeof C.onclick != 'undefined' && C.onclick != null) C.onclick();
}
imgCbox.Objs = {};
imgCbox.ImgObjs = {};