//µå¸²À§¹ö¿¡¼­ ¾²ÀÌ´Â functionµé




function writeoffObjSwf(f_uri,f_width,f_height){
    document.write('<object width="'+f_width+'" height="'+f_height+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"> ');
    document.write('<param name="movie" value="'+f_uri+'"> ');
    document.write('<param name="quality" value="high"> ');
    document.write('<param name="scale" value="noscale"> ');
    document.write('<param name="bgcolor" value="#ffffff"> ');
    document.write('<param name="allowScriptAccess" value="sameDomain"> ');
    document.write('<param name="menu" value="false"> ');
    document.write('<param name="wmode" value="transparent"> ');
    document.write('<embed src="'+f_uri+'" width="'+f_width+'" height="'+f_height+'" quality="high" scale="noscale" align="left" bgcolor="#ffffff" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> ');
    document.write('</object> ');
}































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_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_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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 MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v6.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 MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/**
 * <PRE>
 * Scroll ÀÌ ¾ø´Â »õ Ã¢À» ¶ç¿î´Ù
 * </PRE>
 * @param   theURL : »õ·Î ¶ç¿ï ÆÄÀÏ ÀÌ¸§ÀÌ´Ù
 * @param   winName : »õÃ¢ ÀÌ¸§
 * @param   winTitle : »õÃ¢ title
 * @param	width : »õÃ¢ °¡·Î Å©±â
 * @param	height : »õÃ¢ ¼¼·Î Å©±â
 * @param   param : Ãß°¡ÀûÀÎ È­¸é argument
 */
function openNoScrollWin(theURL, winName, winTitle, width, height, param)
{
	var win = window.open(theURL + "?popupTitle=" + winTitle + "&tableWidth=" + width + param, winName, "menubar=no, scrollbars=no, resizable=no, width=" + width + ", height=" + height);
}



//<script language="javascript">DocumentWriteObject("http://www..",232,187);</script>
function DocumentWriteObject(FlashFile,nWidth,nHeight,strStyle)
{
	if (window.ActiveXObject) 
	{ // IE ActiveX Code 
		document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+nWidth+"' height='"+nHeight+"' style='"+strStyle+"'>      <param name='allowScriptAccess' value='always' />      <param name='movie' value='"+FlashFile+"'>            <param name='quality' value='high'>			<param name='menu' value='false'>			<param name='wmode' value='transparent'>            <embed src='"+FlashFile+"' quality='high' wmode='transparent' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+nWidth+"' height='"+nHeight+"'></embed>        </object>");
	}
	else
	{ // Mozilla based Plugin Code 
		document.write("<object type='application/x-shockwave-flash' data='"+FlashFile+"' width='"+nWidth+"' height='"+nHeight+"' style='"+strStyle+"' > <param name='quality' value='high'><param name='menu' value='false'><param name='wmode' value='transparent'><param name='pluginurl' value='http://www.macromedia.com/go/getflashplayer'></object>");
	} 
}

function DocumentWriteObject2(FlashFile,nWidth,nHeight,strStyle,FlashVars)
{
	if (window.ActiveXObject) 
	{ // IE ActiveX Code 
		document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+nWidth+"' height='"+nHeight+"' style='"+strStyle+"'>   <param name='FlashVars' value='"+FlashVars+"' />   <param name='allowScriptAccess' value='always' />      <param name='movie' value='"+FlashFile+"'>            <param name='quality' value='high'>			<param name='menu' value='false'>			<param name='wmode' value='transparent'>            <embed src='"+FlashFile+"' FlashVars='"+FlashVars+"' quality='high' wmode='transparent' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+nWidth+"' height='"+nHeight+"'></embed>        </object>");
	}
	else
	{ // Mozilla based Plugin Code 
		document.write("<object type='application/x-shockwave-flash' data='"+FlashFile+"' width='"+nWidth+"' height='"+nHeight+"' style='"+strStyle+"' > <param name='quality' value='high'><param name='menu' value='false'><param name='wmode' value='transparent'><param name='pluginurl' value='http://www.macromedia.com/go/getflashplayer'><param name='FlashVars' value='"+FlashVars+"' /></object>");
	} 
}


function InnerHtmlObject(objname,FlashFile,nWidth,nHeight,strStyle)
{
	if (window.ActiveXObject) 
	{ // IE ActiveX Code 
		document.getElementById(objname).innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+nWidth+"' height='"+nHeight+"' style='"+strStyle+"'>     <param name='allowScriptAccess' value='always' />       <param name='movie' value='"+FlashFile+"'>            <param name='quality' value='high'>			<param name='menu' value='false'>			<param name='wmode' value='transparent'>            <embed src='"+FlashFile+"' quality='high' wmode='transparent' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+nWidth+"' height='"+nHeight+"'></embed>        </object>";
	}
	else
	{ // Mozilla based Plugin Code 
		document.getElementById(objname).innerHTML = "<object type='application/x-shockwave-flash' data='"+FlashFile+"' width='"+nWidth+"' height='"+nHeight+"' style='"+strStyle+"' > <param name='quality' value='high'><param name='menu' value='false'><param name='wmode' value='transparent'><param name='pluginurl' value='http://www.macromedia.com/go/getflashplayer'></object>";
	} 
}


// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö, À©µµ¿ì¸ðµå)
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='menu' value='false' />"+
	"<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 bluring(){
	if(event.srcElement){
		if((event.srcElement.tagName=="A") || (event.srcElement.tagName=="IMG")){
			document.body.focus();
		}
	}
} 
document.onfocusin = bluring;



//À©µµ¿ì »õÃ¢¿­±â
function win_pop(path, win_name, wi, he, scroll) {
	window.open(path,win_name,'width='+wi+',height='+he+',resizable=no,scrollbars='+scroll+', status=no,toolbar=no');
}




/**************************************************************
    ÇÃ·¡½Ã ·¹ÀÌ¾î¸¦ ½ºÅ©·Ñ ½ÃÅ²´Ù. 2006-06-06 By RahXephon
**************************************************************/
function scrollLayer(p_obj_name, p_gap_point) 
{ 
    var top_point, start_point, end_point, timer; 

    var obj_layer   = document.getElementById(p_obj_name);  // ·¹ÀÌ¾î ¿ÀºêÁ§Æ®

    top_point   = obj_layer.style.top;
    start_point = parseInt(top_point, 10); 
    end_point   = document.body.scrollTop + p_gap_point; 
    limit_point = parseInt(window.document.body.scrollHeight) - parseInt(obj_layer.offsetHeight) -10; 

    if ( end_point > limit_point )  end_point = limit_point; 
    if ( end_point < top_point )    end_point = top_point; 

    if ( start_point != end_point ) 
    { 
        scroll_amount = Math.ceil( Math.abs( end_point - start_point ) / 15 ); 
        obj_layer.style.top = parseInt(top_point, 10) + ( ( end_point < start_point ) ? -scroll_amount : scroll_amount ); 
    } 

    timer = setTimeout ("scrollLayer('" + p_obj_name + "', " + p_gap_point + ");", 5); 
} 

// Æ¯Á¤ À§Ä¡ÀÇ ¸ðµç ÀÌ¹ÌÁö »çÀÌÁî Á¶Á¤ÇÏ±â
function resizeImage(size, obj)
{
 var imgs=obj.all.tags('img');
 if (imgs==null) return;
 
 for(i=0;i<imgs.length;i++)
 {
  realwidth=imgs[i].width;
  realheight = imgs[i].height;
  if (realwidth>size)
  {
   imgs[i].width=size;
   imgs[i].height=(size/realwidth)*realheight;
   imgs[i].onclick=new Function("openimg('"+imgs[i].src+"',"+realwidth+","+realheight+"    );");
   imgs[i].style.cursor="hand";
  }
 }
}
 
function openimg(imgs,w,h){
 
var windowprops = "width="+(w+0)+",height="+(h+0);
var win = window.open("","",windowprops);
win.document.write("<html><title>ÀÌ¹ÌÁö ¿øº» º¸±â</title><body leftmargin=0 topmargin=0 ><table width=100% align=center><tr><td><a href=javascript:self.close();><img src="+imgs+" width="+w+" height="+h+" border=0></a></td></tr></table></body></html>");
}
 
function resizeEmbed(size, obj)
{
 var imgs=obj.all.tags('embed');
 if (imgs==null) return;
 
 for(i=0;i<imgs.length;i++)
 {
  width=imgs[i].width;
  if (width>size)
  {
   imgs[i].width=size;
   imgs[i].height=(size/imgs[i].width)*imgs[i].height;
  }
 }
}
 
function resizeTags(size, obj)
{
 resizeEmbed(size, obj);
 resizeImage(size, obj);
}

function _loadimgresize(size, obj)
{
 setTimeout("resizeTags("+size+","+obj+")",100);
}


 
 
	var cpc_protocol = document.location.protocol || "http:";
	var cpc_script_host = ["//nsc1.cpcguard.com","//vsc1.cpcguard.com"];
	var cpc_script_image = cpc_protocol + cpc_script_host[0] + "/cpcguard.gif?cache=" + (new Date()).getTime();

	function cpcguard_script_bind(i){
		try{
			var _head = document.getElementsByTagName("head")[0] || document.documentElement;
			if(_head){
				var _script = document.createElement("script"); _script.id = "include_cpc_script"; _script.type = "text/javascript"; _script.charset = "utf-8"; _script.async = true; _script.src = (cpc_protocol + cpc_script_host[i] + "/new/cpc_script.js"); 
				_head.appendChild(_script);
			}else{window.setTimeout(arguments.callee(i),500);}
		}catch(e){}
	}
	if(!document.getElementById("include_cpc_script")){document.write("<img src='" + cpc_script_image + "' style='width:1px;height:1px;position:absolute;' onload='cpcguard_script_bind(0)' onerror='cpcguard_script_bind(1)' />");}
 
 
