function MakeFlashString(source,id,width,height,wmode, otherParam)
{	
	return "<embed src="+source+" quality=high wmode="+wmode+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+width+" height="+height+" AllowScriptAccess=\"always\" ></embed>";
}

function MakeObjectString(classid, codebase, name, id, width,height, param)
{
	return "<object classid="+classid+" codebase="+codebase+" name="+name+" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" />"+param+"</object>";
}


// innerHTML Type
function SetInnerHTML(target, code)
{ 
	target.innerHTML = code; 
}

// Direct Write Type
function DocumentWrite(src)
{
	document.write(src);
}


//ÆË¾÷Ã¢(°³ÀÎÁ¤º¸,ÀÌ¸ÞÀÏÃßÃâ)
function winopen(url, winnm, wl, hl, scroll){
window.open(url,winnm,"toolbar=no,location=no,top=0, left=0,status=no,menubar=no,scrollbars="+scroll+",resizable=no,width="+wl+",height="+hl);
}

function openwin01(theURL){
window.open(theURL,"01","toolbar=no,location=no,status=no,munubar=no,scrollbars=no,resizable=no,width=419,height=272");
}


// ÀÌ¹ÌÁö º¯È¯

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function mia_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'no' : 'no';
  menubar_str = menubar ? 'no' : 'no';
  statusbar_str = statusbar ? 'no' : 'no';
  scrollbar_str = scrollbar ? 'no' : 'no';
  resizable_str = resizable ? 'no' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function go_check()
		{
			var status  = "width=500 height=450 menubar=no,scrollbars=no,resizable=no,status=no";
			var obj     = window.open('', 'kcp_pop', status);
			
			document.shop_check.method = "post";
			document.shop_check.target = "kcp_pop";
			document.shop_check.action = "http://admin.kcp.co.kr/Modules/escrow/kcp_pop.jsp";

			document.shop_check.submit();
		}


var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");

function always_pos()
{
        var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

        if ( bNetscape4plus ) { // ³×Ã÷ÄÉÀÌÇÁ ¿ë ¼³Á¤
                yMenuFrom   = document["scrollmenu"].top;
                yMenuTo     = top.pageYOffset + 58;   // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
        }
        else if ( bExplorer4plus ) {  // ÀÍ½ºÇÃ·Î·¯ ¿ë ¼³Á¤
                yMenuFrom   = parseInt (scrollmenu.style.top, 10);
                yMenuTo     = document.body.scrollTop + 58; // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
        }

        timeoutNextCheck = 500;

        if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
                setTimeout ("always_pos()", timeoutNextCheck);
                return;
        }


        if ( yButtonFrom != yButtonTo ) {
                yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
                if ( yButtonTo < yButtonFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divLinkButton"].top += yOffset;
                else if ( bExplorer4plus )
                        divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }
        if ( yMenuFrom != yMenuTo ) {
                yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
                if ( yMenuTo < yMenuFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["scrollmenu"].top += yOffset;
                else if ( bExplorer4plus )
                        scrollmenu.style.top = parseInt (scrollmenu.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

        setTimeout ("always_pos()", timeoutNextCheck);
}
function OnLoad()
{
        var y;

        // ÇÁ·¹ÀÓ ¿¡¼­ ¹þ¾î³ª°Ô ÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù. ÇÁ·¹ÀÓ¿¡ ³ÖÀ¸·Á¸é »èÁ¦ÇÏ¼¼¿ä
        if ( top.frames.length )
         //       top.location.href = self.location.href;

        // Æä¿¡Áö ·Îµù½Ã Æ÷Áö¼Ç
        if ( bNetscape4plus ) {
                document["scrollmenu"].top = top.pageYOffset + 236;
                document["scrollmenu"].visibility = "visible";
        }
        else if ( bExplorer4plus ) {
                scrollmenu.style.top = document.body.scrollTop + 236;
                scrollmenu.style.visibility = "visible";
        }

        always_pos();
        return true;
}

function back_top() 
{ 
        x = document.body.scrollLeft; 
        y = document.body.scrollTop; 
        step = 2; 

        while ((x != 0) || (y != 0)) { 
                scroll (x, y); 
                step += (step * step / 300); 
                x -= step; 
                y -= step; 
                if (x < 0) x = 0; 
                if (y < 0) y = 0; 
        } 
        scroll (0, 0); 
} 
