//*  png이미지 투명화 스크립트  *//
function setPng24(obj) {
	obj.width=obj.height=1;
	obj.className=obj.className.replace(/\bpng24\b/i,'');

	obj.style.filter =

	"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src=''; 
	return '';
}

//* 플래시 링크 *//
function render_flash(swf_name,swf_width,swf_height){
	var text ='';
	text ='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+swf_width+'" height="'+swf_height+'">';
	text +='<param name="movie" value="'+swf_name+'">';
	text +='<param name="allowScriptAccess" value="always">';
	text +='<param name="quality" value="high">';
	text +='<embed src="'+swf_name+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+swf_width+'" height="'+swf_height+'">';
	text +='<param name="wmode" value="transparent">';
    	text +='</embed>';
	text +='</object>';
	document.write(text);
}

//menu flash
function MenuFlash( id, flashUri, param, vWidth, vHeight, winMode ) {
	var _obj_ = "";
	_obj_ = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + vWidth + '" height="' + vHeight + '" id="' + id + '" align="middle">';
	_obj_ += '<param name="movie" value="' + flashUri + '" />';
	_obj_ += '<param name="quality" value="high" />';
	_obj_ += '<param name="wmode" value="' + winMode + '" />    ';
	_obj_ += '<param name="FlashVars" value="' + param + '" />    ';
	_obj_ += '<param name="bgcolor" value="#ffffff" />        ';
	_obj_ += '<embed src="' + flashUri + '" quality="high" wmode="' + winMode + '" bgcolor="#ffffff" width="' + vWidth +'" height="' + vHeight + '" id="' + id + '" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></embed>    ';
	_obj_ += '</object>';
	document.writeln( _obj_ );
}

//* 팝업 *//
function windowOpen(url, name, width, height, scrollbars, top, left){
	window.open(url,name,'width='+width+',height='+height+',scrollbars='+scrollbars+',top='+top+',left='+left+',history=no,resizable=no,status=no,menubar=no');
}

// 메인인 Family Site 09.01.01 반영
function actionBox(){
	siteBox = document.getElementById("familySite");
	if(siteBox.style.display == ''){
		siteBox.style.display = 'none';
	}else{
		siteBox.style.display = '';
	}
}

/* Family Site 영역 (속도문제로 잠시 보류)
var siteBox = "",siteSpeed = "",siteTimeSpeed = "",siteMaxY = "",siteMinY = "",siteMinPos = "",siteMinPos2 = "",siteFlag = false;
function actionBox(){
	try{
	siteBox = document.getElementById("familySite");
	siteSpeed = 0.4;
	siteTimeSpeed = 100;
	siteMaxY = 290;
	siteMinY = 0;
	siteMinPos = 3;
	siteMinPos2 = 10;
	var clintAgent = navigator.userAgent;
	var clintName = navigator.appName;
	if(document.all){
		objBody = document.body;
		contHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
	}
	if(clintName.indexOf("Microsoft")>-1&&!(clintAgent.indexOf("MSIE 7")>-1)) siteBox.style.bottom = 76;
	else if (clintName.indexOf("Netscape")>-1) siteBox.style.bottom = -(document.body.scrollHeight-76-document.body.clientHeight);
	else siteBox.style.bottom = document.body.clientHeight-(contHeight);
	siteFlag = !siteFlag;
	actionView();
	}catch(e){}
}

function actionView(){
	var siteYInt = parseInt(siteBox.style.height);
	if(siteFlag){
		siteBox.style.display="block";
		if(siteYInt < (siteMaxY)){
			siteBox.style.height = siteYInt+(siteSpeed*(siteMaxY-siteYInt));
			setTimeout(actionView,siteTimeSpeed);
		}else{
			siteBox.style.height = siteMaxY;
		}
	}else{
		if(siteYInt-siteMinPos2 > siteMinY){
			siteBox.style.height = siteYInt-(siteSpeed*siteYInt);
			setTimeout(actionView,siteTimeSpeed);
		}else{
			siteBox.style.display="none";
			siteBox.style.height = siteMinY;
		}
	}
}
*/
// *Family Site 영역

//*  퀵메뉴 ---------------------------------*//
var stmnRight = 40; // 왼쪽 여백 (메뉴가 왼쪽에서 10픽셀 떨어진 곳에 보여집니다) 
var stmnGAP1 = 10; // 위쪽 여백 (메뉴가 위에서 10픽셀 떨어진 곳에 보여집니다) 
var stmnGAP2 = 50; // 스크롤시 브라우저 위쪽과 떨어지는 거리 
var stmnBASE = 110; // 스크롤 시작위치 
var stmnActivateSpeed = 200; 
var stmnScrollSpeed = 10; 

var stmnTimer; 

function ReadCookie(name) { 
	var label = name + "="; 
	var labelLen = label.length; 
	var cLen = document.cookie.length; 
	var i = 0; 

	while (i < cLen) { 
	var j = i + labelLen; 
	if (document.cookie.substring(i, j) == label) { 
		var cEnd = document.cookie.indexOf(";", j); 
		if (cEnd == -1) cEnd = document.cookie.length; 
			return unescape(document.cookie.substring(j, cEnd)); 
		} 
		i++; 
	}	 
	return ""; 
}
function WriteCookie(name, value)
{
	 document.cookie = name + "=" + escape( value ) + "; path=/; ";
}



function RefreshStaticMenu() { 
	var stmnStartPoint, stmnEndPoint, stmnRefreshTimer; 

	stmnStartPoint = parseInt(document.getElementById("quicklink").style.top, 10); 

	stmnEndPoint =document.documentElement.scrollTop + stmnGAP2; 
	if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1; 
		
	stmnRefreshTimer = stmnActivateSpeed; 

	if ( stmnStartPoint != stmnEndPoint ) { 
		stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 ); 
        document.getElementById("quicklink").style.top = parseInt(document.getElementById("quicklink").style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount )+'px'; 
        stmnRefreshTimer = stmnScrollSpeed; 
	} 

	stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer); 

} 

function InitializeStaticMenu() { 
	var form = document.getElementById("quicklink");
	//form.style.right = stmnRight; 
	form.style.top = document.documentElement.scrollTop + stmnBASE+'px'; 
    RefreshStaticMenu(); 
} 
//*  //퀵메뉴 ---------------------------------*//
