function controlImage(img_id)
{
	var maxWidth = 570;
	var w = document.getElementById(img_id).width;
	if(w <= 0) 
		time_id = window.setTimeOut("controlImage('" + img_id + "')", 10);
	else
	{
		if(w > maxWidth)
		{
			document.getElementById(img_id).width = maxWidth;
		}
		document.getElementById('image_area').style.visibility = 'visible';
	}
}

// flashLoad(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö, À©µµ¿ì¸ðµå)
	function flashLoad(url,w,h,id,bg,vars,win) {
		
		var flashStr=
		"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
		"<param name='allowScriptAccess' value='sameDomain' />"+
		"<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+"' />"+
		"<param name='base' value='.'>"+
		"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
		"</object>";	
		// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
		document.write(flashStr);		
		//FlashÀÇ ExternalInterface°¡ Form Tag³»¿¡¼­ ¿À·ù³ª´Â ¹ö±×¸¦ ÇØ°áÇÏ´Â ÄÚµå     
		//eval("window." + id + " = document.getElementById('" + id + "');");	
	}
	
// ÀÌ¹ÌÁö on off
function imgOn(imgEl) {
		imgEl.src = imgEl.src.replace("_off.gif", "_on.gif");
	}

	function imgOut(imgEl) {
		imgEl.src = imgEl.src.replace("_on.gif", "_off.gif");
	}

/*
// ÇÃ·¡½Ã »ó´Ü ³×ºñ
function windowopen(){
	//alert("open")
	//var contentsIdx = document.getElementById("wrap");
	var contentsIdx = document.body;
	var topNav = document.getElementById("flashtopnav");
	ctsHeight = contentsIdx.offsetHeight;
	topNav.style.height = (ctsHeight + "px");
	var test = function(){
		contentsIdx.style.overflow = "hidden";
		clearTimeout(spaceTime);
	}
	var spaceTime = setTimeout(test,1200)
	spaceTime();
}
function windowclose(){
	//alert("close")
	var contentsIdx = document.body;
	var topNav = document.getElementById("flashtopnav");
	var minHeight = 150;
	contentsIdx.style.overflow = "auto";
	topNav.style.height = (minHeight + "px");
	
}
*/

// µ¿¿µ»ó ÇÃ·¹ÀÌ¸¦ À§ÇØ ÇÃ·Î±×·¥¿¡¼­ ³ÖÀº ÇÔ¼ö ÀÔ´Ï´Ù.
function mediaLoad(init_movieUrl,w,h) {
	document.write("<object id=MediaPlayer name=MediaPlayer1 width='"+w+"' height='"+h+"' classid=CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95 codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,05,0809' standby=Loading Microsoft Windows Media Player components... type='application/x-oleobject' VIEWASTEXT>");
	document.write("    <param name='transparentAtStart' value='true'>");
	document.write("    <param name='transparentAtStop' value='false'>");
	document.write("    <param name='AnimationAtStart' value='False'>");
	document.write("    <param name='AutoStart' value='True'>");
	document.write("    <param name='AutoRewind' value='false'>");
	document.write("    <param name='SendMouseClickEvents' value='True'>");
	document.write("    <param name='DisplaySize' value='0'>");
	document.write("    <param name='AutoSize' value='False'>");
	document.write("    <param name='ShowDisplay' value='False'>");
	document.write("    <param name='ShowStatusBar' value='False'>");
	document.write("    <param name='ShowControls' value='True'>");
	document.write("    <param name='ShowTracker' value='True'>");
	document.write("    <param name='FileName' value="+init_movieUrl+">");
	document.write("    <param name='Enabled' value='1'>");
	document.write("    <param name='EnableContextMenu' value='0'>");
	document.write("    <param name='EnablePositionControls' value='1'>");
	document.write("    <param name='EnableFullScreenControls' value='1'>");
	document.write("    <param name='ShowPositionControls' value='1'>");
	document.write("    <param name='Mute' value='0'>");
	document.write("    <param name='Rate' value='1'>");
	document.write("    <param name='SAMILang' value=''>");
	document.write("    <param name='SAMIStyle' value=''>");
	document.write("    <param name='SAMIFileName' value=''>");
	document.write("    <param name='ClickToPlay' value='0'>");
	document.write("    <param name='CursorType' value='1'>");
	document.write("    <param name='Loop' value='0'>");
	document.write("</object>");
}	

function popReject()
{
	var newWin = window.open('/footer/emreject.html','emreject','width=400,height=260,scrollbars=no');
	newWin.focus();
}

function popDisclaimer()
{
	var newWin = window.open('/footer/disclaimer.html','disclaimer','width=468,height=650,scrollbars=no');
	newWin.focus();
}

function popPrivacy()
{
	var newWin = window.open('/footer/privacy.html','privacy','width=664,height=650,scrollbars=no');
	newWin.focus();
}

function popRule()
{
	var newWin = window.open('/footer/rules.html','rules','width=664,height=650,scrollbars=no');
	newWin.focus();
}

// ÆË¾÷Ã¢ ¶ç¿ì±â(°¡¿îµ¥)
var win = null;
function win_pop(mypage,myname,w,h,scroll) {
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no';
  win = window.open(mypage,myname,settings);
}