function swf(src, w, h) {
	var Flash_html = "";
	Flash_html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="param" width="'+w+'%" height="'+h+'%">';
	Flash_html += '<param name="movie" value="'+src+'">';
	Flash_html += '<param name="quality" value="high">';
	Flash_html += '<param name="allowScriptAccess" value="always" >';
	Flash_html += '<param name="wmode" value="transparent">';
	Flash_html += '<param name="swliveconnect" value="true">';
	Flash_html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" width="'+w+'%" height="'+h+'%" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	Flash_html += '<\/object>';

	document.write(Flash_html);
	document.onfocusin=bluring;
}

// Ãß°¡ÀÚ : BokiSarang
// Ãß°¡ÀÏ : 20070530
// Áö¿ìÁö ¸¶¼¼¿ä
function swf_r(src, w, h) {
	var Flash_html = "";
	Flash_html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="movie_r" width="'+w+'%" height="'+h+'%">';
	Flash_html += '<param name="movie" value="'+src+'">';
	Flash_html += '<param name="quality" value="high">';
	Flash_html += '<param name="allowScriptAccess" value="always" >';
	Flash_html += '<param name="wmode" value="transparent">';
	Flash_html += '<param name="swliveconnect" value="true">';
	Flash_html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" width="'+w+'%" height="'+h+'%" swliveconnect="true" id="movie_r" name="movie_r" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	Flash_html += '<\/object>';

	document.write(Flash_html);	
	document.onfocusin=bluring;
}

// ½ºÅ©·Ñ ¹æÁö¸¦ À§ÇÑ ½ºÅ©¸³Æ® 
function get_IEscroll(choice) {	
	self.scrollTo(0,0); /* ½ºÅ©·ÑÀ» °¡Àå »óÀ§·Î ÀÌµ¿ */
	if (document.all) {
		document.body.scroll = choice; /* ½ºÅ©·ÑÀÌ º¸ÀÌÁö ¾Êµµ·Ï */
	}
}


// ¸µÅ©½Ã Á¡¼± ¾ø¾Ö´Â ½ºÅ©¸³Æ® 
function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
}

//  ÆË¾÷¿ë ½ºÅ©¸³Æ®
function openWinLpg(window) {
open (window,"findlpg","align=center, align=middle, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=1024, height=768");
}
function openWinLoad(window) {
open (window,"findload","align=center, align=middle, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=1024, height=768");
}

function moneyformat(val) {
			
	var rtnVal = "";

	var tmp = "";

	var count = 0;
	if ( val != null && val.length > 0) {
					
		for ( i=val.length - 1 ; i >= 0 ; i--, count++) {
								
			if ( count != 0 && count%3 == 0) {
				tmp = tmp +  ",";
			}
			
			tmp = tmp + val.charAt(i);
		}
		
		for ( i=tmp.length-1 ; i >= 0 ; i--) {
			rtnVal = rtnVal + tmp.charAt(i);
		}
	
	}
	
	return rtnVal;

}

//Áö½ÄÇÃ·¯½º ¾ÆÀÌµð¾ø´Â »ç¶÷ ÆË¾÷º¸¿©ÁÖ´Â ÇÔ¼ö
function openIDInputPopup(path) {
		window.open(path+"CMD_SEQ_109146264631215253098360","idaddpopup","width=420, height=325, menubar=no, status=no");
}


//·Î±×ºÐ¼®À» À§ÇÑ ½ºÅ©¸³Æ® ºí·° ½ÃÀÛ

function Nethru_getCookieVal(offset)
{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function Nethru_SetCookie(name, value){
   var argv = Nethru_SetCookie.arguments;
   var argc = Nethru_SetCookie.arguments.length;
   var expires = (2 < argc) ? argv[2] : null;
   var path = (3 < argc) ? argv[3] : null;
   var domain = (4 < argc) ? argv[4] : null;
   var secure = (5 < argc) ? argv[5] : false;

  // alert("DOMAIN = " + domain);
   document.cookie = name + "=" + escape (value) +
        ((expires == null) ? "" : ("; expires="+expires.toGMTString())) +
     ((path == null) ? "" : ("; path=" + path)) +
     ((domain == null) ? "" : ("; domain=" + domain)) +
        ((secure == true) ? "; secure" : "");

//	alert(document.cookie);
}

function Nethru_GetCookie(name){
   var arg = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
   while (i < clen)
      {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg)
         return Nethru_getCookieVal (j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0)
         break;
      }
  return null;
}

function Nethru_makePersistentCookie(name,length,path,domain)
{
    var today = new Date();
    var expiredDate = new Date(2011,1,1);
    var cookie;
	var value;

    cookie = Nethru_GetCookie(name);
    if ( cookie ) {
//		alert(cookie);
        return 1;
	}

	var values = new Array();
	for ( i=0; i < length ; i++ ) {
		values[i] = "" + Math.random();
	}

	value = today.getTime();

	// use first decimal
	for ( i=0; i < length ; i++ ) {
		value += values[i].charAt(2);
	}

    Nethru_SetCookie(name,value,expiredDate,path,domain);
}

function Nethru_getDomain() {
	var _host   = document.domain;
	var so      = _host.split('.');
	var dm    = so[so.length-2] + '.' + so[so.length-1];
	return (so[so.length-1].length == 2) ? so[so.length-3] + '.' + dm : dm;
}

var Nethru_domain  = Nethru_getDomain();

Nethru_makePersistentCookie("PCID",10,"/",Nethru_domain);

//·Î±×ºÐ¼®À» À§ÇÑ ½ºÅ©¸³Æ® ºÒ·° ³¡









// Ãß°¡ÀÚ : À±Á¤ÈÆ
function getScreenSize() 
{
  var myWidth = 0, myHeight = 0;
  
  if( typeof( window.innerWidth ) == 'number' ) 
  {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } 
  else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
  {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } 
  else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
  {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  else
	{
		myWidth  = screen.availWidth;
		myHeight = screen.availHeight;
	}
  
  return {width:myWidth, height:myHeight}
}