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_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

// flash object
function ShowFlash(sfilename, iwidth, iheight)	 //ÆÄÀÏ¸í, Æø, ³ô¹Ì	
{
	var _showflash = '';

	_showflash = '<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0 width='+ iwidth +' height='+ iheight +'>';
	_showflash = _showflash + '<param name=movie value='+ sfilename +'>';
	_showflash = _showflash + '<param name=allowScriptAccess value=always>';
	_showflash = _showflash + '<param name=wmode value=transparent>';
	_showflash = _showflash + '<param name=quality value=high>';
	_showflash = _showflash + '<embed src='+ sfilename +' quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash allowscriptaccess=always swliveconnect=true width=237 height=476></embed></object>';
  
    document.write(_showflash);
}

/*****************************************************************
 * µ¿¿µ»ó ÇÃ·¹ÀÌ¾î
 *****************************************************************/

// media player
var paramInfo = new Array;

function initParam()
{
	var oldSize = paramInfo.length;

	for (var i=0; i<oldSize; i++) {
		paramInfo.length--;
	}	
}

function setParam(paramName, paramValue)
{
	var idx = paramInfo.length;

	paramInfo[idx] = [];
	paramInfo[idx][0] = paramName;  
	paramInfo[idx][1]= paramValue;
}

function playMedia(objID, objSource, objWidth, objHeight, objStyle)
{
	document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ');
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '" ' + objStyle + '>');

	for (var i=0; i<paramInfo.length; i++) {
		document.write('<PARAM NAME="' + paramInfo[i][0] + '" VALUE="'+ paramInfo[i][1] +'">');		
	}	
	
	document.write('</OBJECT>');
}

/*****************************************************************
 * ·Î±×ÀÎ
 *****************************************************************/

//·Î±×ÀÎ
function loginProc()
{
	var frm = document.frmLogin;

	if(frm.txtUserID.value == ""){
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		frm.txtUserID.focus();		
		return false;
	}

	if(frm.txtPass.value == ""){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		frm.txtPass.focus();
		return false;		
	}

	frm.action = "/kr/ir/loginProc.php";
	return true;
}

//·Î±×¾Æ¿ô
function logout()
{
	if(confirm("·Î±×¾Æ¿ô ÇÏ½Ã°Ú½À´Ï±î?")){
		location.href = "/kr/ir/logout.php";
	}
}

function loginAlert()
{
	alert('·Î±×ÀÎÇÏ¼Å¾ß ÀÌ¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.');

//	window.open("/member/pop_login.php","login","scrollbars=no,width=382,height=235");
}

function search_id()
{
	window.open("http://www.aruon.com/member/search_id.php","search","scrollbars=no,width=385,height=258");
}

function search_pw()
{
	window.open("http://www.aruon.com/member/search_pw.php","search","scrollbars=yes,width=643,height=478");
}

function pop_search_id()
{
	location.href="http://www.aruon.com/member/search_id.php";
}

function pop_search_pw()
{
	location.href="http://www.aruon.com/member/search_pw.php";
}

/*****************************************************************
 * Ä¿¹Â´ÏÆ¼
 *****************************************************************/

//ÀÔ·Â°ª »çÀÌÁî ±¸ÇÏ±â
function getByteLength(s)
{
	var len = 0;
	if ( s == null ) return 0;
	for(var i=0;i<s.length;i++)
	{
		var c = escape(s.charAt(i));
		if ( c.length == 1 ) len ++;
		else if ( c.indexOf("%u") != -1 ) len += 2;
		else if ( c.indexOf("%") != -1 ) len += c.length/3;
	}
	return len;
}

function resizeImage(num)
{
 if(document.all) {
  var width = eval('document.all.userImg'+num+'.width');
  if( width > 550 )
  {
    eval('document.all.userImg'+num+'.width = 550');
  }
 }
 else {
  var width = eval("document.getElementsByName('"+num+"')[0].width");
  if( width > 550 )
  {
    eval("document.getElementsByName('"+num+"')[0].width = 550");
  }
 }
}

function popview(url){
	window.open("/community/pop_view.php?src=" + url,"imageview","scrollbars=yes,width=100,height=100");
}

function Content_Delete(idx, btype){
	if ( confirm('Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?') )
	{
		location.href = "ir_delete_proc.php?idx=" + idx + "&btype=" + btype;
	}
}

function CenterNewWnd(url,w,h,WndMenu,WndDir,WndStat,WndScroll)
{
/*--
 w     : Ã¢ ³ÐÀÌ
 h     : Ã¢ ³ôÀÌ
 url     : ÀÌµ¿ÇÒ ÁÖ¼Ò
 WndMenu  : ¸Þ´º¹Ù
 WndDir   : µð·ºÅä¸®¹Ù
 WndStat   : »óÅÂ¹Ù
 WndScroll  : ½ºÅ©·Ñ¹Ù
 --*/
 var WndLeft	= (screen.width - w) / 2;
 var WndTop		= (screen.height - h) / 2;

 window.open(url,'','width=' + w + ',height=' + h + ',left=' + WndLeft + ',top=' + WndTop + 'menubar=' + WndMenu + ',directories=' + WndDir + ',statusbar=' + WndStat + ',scrollbars=' + WndScroll);
}

