﻿var IE = false ;
if (window.navigator.appName.indexOf("Explorer") !=-1)
{
	IE = true;
}


/* 상단그림 모션 함수 */

function diplayDynamicObjectforSkin(_objPath_)
{
	var _object_ = "";
	
	_object_= '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="955" height="200">';
	_object_ += '<param name="movie" value="'+_objPath_+'">';
	_object_ += '<param name="quality" value="high">';
	_object_ += '<param name="wmode" value="transparent">';
	_object_ += '<embed src="'+_objPath_+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="955" height="250"></embed>';
	_object_ += '</object>';
	
	document.write(_object_);
}


/* 왼쪽 최상위메뉴 바로가기 버튼 활성화 시켜주는 함수 */

var firstGoOpen = false;

function openDirectly()
{
	var o = document.getElementById("Directlydiv");
	var img = document.getElementById("goimage");
	var ch = o.style.visibility;
	if (ch=='hidden')
	{
		if(!firstGoOpen)
		{
        		firstGoOpen = true;
		}
		o.style.visibility = "visible";
		img.className ="nhnAlphaLoader_up";
	}	
	else
	{
		o.style.visibility = "hidden";
		img.className ="nhnAlphaLoader_down";
	}
}


/* 쿼리스트링으로 넘어오는 변수를 받는 함수 */

function getVar(mode)
{
	var str = '';
	tmp = window.location;
	tmp = String(tmp).split('?');
	if(tmp.length > 1)
	{
		tmp = tmp[1].split('&');
		for(i in tmp)
		{
			tmp2 = tmp[i].split('=');
			if(tmp2[0] == mode)	 str = tmp2[1];
		}
		if(str.length > 0) return str;
		else return null;
	}
	else
	{
		return null;
	}
}









//focus를 없애줌
function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring; 

/* 달력, 아카이브 토글 */
function toggle_cal() {
	if (document.all.t_calendar.style.display == 'none') {
		document.all.t_archive.style.display = 'none';
		document.all.t_calendar.style.display = '';
	}
	else {
		document.all.t_calendar.style.display = 'none';
		document.all.t_archive.style.display = '';
	}
}



					function visitlist_viewmore(){
					    if (document.all["visitlist_close"].style.display == "none")
					    {
						   document.all["visitlist"].style.height = "100px";
						   document.all["visitlist_open"].style.display = "none";
						   document.all["visitlist_close"].style.display = "";
						}
						else{
						   document.all["visitlist"].style.height = "55px";
						   document.all["visitlist_open"].style.display = "";
						   document.all["visitlist_close"].style.display = "none";
						}
					}
					function recentlist_viewmore(){

					    if (document.all["recentlist_close"].style.display == "none")
					    {
						   document.all["recentlist"].style.height = "230px";
						   document.all["recentlist_open"].style.display = "none";
						   document.all["recentlist_close"].style.display = "";
						}
						else{
						   document.all["recentlist"].style.height = "125px";
						   document.all["recentlist_open"].style.display = "";
						   document.all["recentlist_close"].style.display = "none";
						}
					}
					function archivelist_viewmore(){

					    if (document.all["archivelist_close"].style.display == "none")
					    {
						   document.all["archivelist"].style.height = "110px";
						   document.all["archivelist_open"].style.display = "none";
						   document.all["archivelist_close"].style.display = "";
						}
						else{
						   document.all["archivelist"].style.height = "33px";
						   document.all["archivelist_open"].style.display = "";
						   document.all["archivelist_close"].style.display = "none";
						}
					}
					function rcttblist_viewmore(){

					    if (document.all["rcttblist_close"].style.display == "none")
					    {
						   document.all["rcttblist"].style.height = "240px";
						   document.all["rcttblist_open"].style.display = "none";
						   document.all["rcttblist_close"].style.display = "";
						}
						else{
						   document.all["rcttblist"].style.height = "127px";
						   document.all["rcttblist_open"].style.display = "";
						   document.all["rcttblist_close"].style.display = "none";
						}
					}
function selectall(s){ 
    var doc = document.body.createTextRange(); 
    doc.moveToElementText(document.all(s)); 
    doc.select(); 
    doc.execCommand('copy'); 
    alert('트랙백주소가 자동복사되었습니다. ctrl+v로 붙여쓰세요..'); 
}
 var favoriteurl="http://yonghees.oranc.co.kr";
 var favoritetitle="YONGHEE'S BLOG";
 function addfavorites(){
  if (document.all)
   window.external.AddFavorite(favoriteurl,favoritetitle);
 }//end function

//Object Tag for ActiveX
function diplayDynamicObjectforSkin(_objPath_)
{
	var _object_ = "";
	
	_object_= '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="955" height="200">';
	_object_ += '<param name="movie" value="'+_objPath_+'">';
	_object_ += '<param name="quality" value="high">';
	_object_ += '<param name="wmode" value="transparent">';
	_object_ += '<embed src="'+_objPath_+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="955" height="200"></embed>';
	_object_ += '</object>';
	
	document.write(_object_);			
}

