/* ¸µÅ© Á¡¼± Á¦°Å */

function bluring(){
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
//document.onfocusin=bluring;




// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö, À©µµ¿ì¸ðµå) 
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='wmode' value='opaque'>"+  
 "<param name='menu' value='false' />"+ 
 "<param name='quality' value='high' />"+ 
 "<param name='bgcolor' value='"+bg+"' />"+ 
 "<param name='wmode' value='transparent'>"+
 "<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' value='opaque' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+ 
 "</object>"; 

 // ÇÃ·¡½Ã ÄÚµå Ãâ·Â 
 document.writeln(flashStr); 

} 
//µ¿¿µ»ó 
function aviPlay(src,w,h) { 
document.writeln('<embed src="'+src+'" width='+w+' height='+h+' style="FILTER:xray">') 
} 

//¿¹½Ã <script>flashWrite('./image/swf/sub1.swf','100%','300','sub1','#ffffff','','transparent')</script>



//ÆË¾÷ ÄÚµå ¸µÅ©½Ã ¿¹½Ã href="javascript:new_window('win', 'ÆÄÀÏ¸í', ÁÂ, »ó, °¡·Î, ¼¼·Î, 0, 0, 0, 0, 0);"

function newWin(page,name,w,h,scroll) { 

	LeftPosition	= (screen.width)?(screen.width-w)/2:100;
	TopPosition		= (screen.height)?(screen.height-h)/2:100;

	settings		= 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status=no'; 

	mywin = window.open(page,name,settings); 
	mywin.self.focus();

} 


/* ·¹ÀÌ¾î ÆË¾÷ */
function popupLayer(s,w,h){
	if (!w) w = 600;
	if (!h) h = 400;

	var pixelBorder = 6;
	var titleHeight = 6;
	w += pixelBorder * 2;
	h += pixelBorder * 2 + titleHeight;

	var bodyW = document.body.clientWidth;
	var bodyH = document.body.clientHeight;

	var posX = (bodyW - w) / 2;
	var posY = (bodyH - h) / 2;

	hiddenSelectBox('hidden');

/* ¹é±×¶ó¿îµå ·¹ÀÌ¾î */
	var obj = document.createElement("div");
	with (obj.style){
		position = "absolute";
		zIndex =2;
		left = 0;
		top = 0;
		height = document.body.scrollHeight;
		width= document.body.clientWidth;
		backgroundColor = "#000000";
		filter = "Alpha(Opacity=90)";
		opacity = "0.5";
	}
	obj.id = "objPopupLayerBg";
	document.body.appendChild(obj);

/* ³»¿ë */
	var obj = document.createElement("div");
	with (obj.style){
		position = "absolute";
		zIndex = 3;
		left = posX + document.body.scrollLeft;
		top = posY + document.body.scrollTop;
		width = w;
		height = h;
		backgroundColor = "#000000";
		border = "5px solid #000000";
	}
	obj.id = "objPopupLayer";
	document.body.appendChild(obj);

/* ´Ý±â¹öÆ° ·¹ÀÌ¾î */
	var bottom = document.createElement("div");
	with (bottom.style){
		position = "absolute";
		zIndex = 2;
		width = w - pixelBorder * 2+7;
		height = titleHeight;
		left = 0;
		top =0;
		padding = "3px 0 2px 0";
		textAlign = "right";
		backgroundColor = "#000000";
		color = "#000000";
	}
	bottom.innerHTML = "<a href='javascript:closeLayer()'><img src='images/gall_close.gif' border='0'/></a>&nbsp;&nbsp;&nbsp;";
	obj.appendChild(bottom);

/* ¾ÆÀÌÇÁ·¹ÀÓ */
	var ifrm = document.createElement("iframe");
	with (ifrm.style){
		width = w - 6;
		height = h - pixelBorder * 2 - titleHeight+8;
		border = "0 solid #000000";
	}
	ifrm.frameBorder = 0;
	ifrm.src = s;
	ifrm.className = "scroll";
	obj.appendChild(ifrm);
}

function _ID(obj){
	return document.getElementById(obj)
}

function hiddenSelectBox(mode){
	var obj = document.getElementsByTagName('select');
	for (i=0;i<obj.length;i++){
		obj[i].style.visibility = mode;
	}
}

function closeLayer(){
	hiddenSelectBox('visible');
	_ID('objPopupLayer').parentNode.removeChild( _ID('objPopupLayer') );
	_ID('objPopupLayerBg').parentNode.removeChild( _ID('objPopupLayerBg') );
}



function linkS54(){
	popupLayer("http://toppension.staywith.net/m_member/", 1000, 600);
}


function PlayBgm()
{
	top.frames[0].WMPlay.Play();
}

// BGM Player Stop
function StopBgm()
{
	top.frames[0].WMPlay.Stop();
}
//music
