<!--
/*
function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
*/

function setCookie(name,value,expiredays) 
{ 
	var todayDate = new Date(); //현재시간 구하고 
	if (expiredays==0)
	{
		document.cookie = name + "=" + escape( value ) + "; path=/;"  //쿠키 설정값    
	} else {
		todayDate.setDate( todayDate.getDate() + expiredays ); // 기간 설정하고 
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"  //쿠키 설정값    
	}
} 
function getCookie_fun( name )
{ 
	var nameOfCookie = name + "="; 
  var x = 0; 
  while ( x <= document.cookie.length ){ 
		var y = (x+nameOfCookie.length); 
		if ( document.cookie.substring( x, y ) == nameOfCookie ) { 
			  if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) 
			  endOfCookie = document.cookie.length; 
			  return unescape( document.cookie.substring( y, endOfCookie ) ); 
		} 
		x = document.cookie.indexOf( " ", x ) + 1; 
		if ( x == 0 ) 
		break; 
  } 
  return ""; 
}





//기사리스트 태그필터
function setTagType(lType){
	setCookie("tag_type", lType , 365);
	//self.document.location.reload();
	document.GetPageFrm.tag_type.value	= lType;
	document.GetPageFrm.submit();

}

//기사리스트 소트정렬
function setSortType(lType){
	setCookie("sort_type", lType , 365);
	///self.document.location.reload();
	document.GetPageFrm.page.value	= 1;
	document.GetPageFrm.sort_type.value	= lType;   /// ??
	document.GetPageFrm.submit();
}

//기사리스트 목록타입
function setListType(lType){
	setCookie("list_type", lType , 365);
	//self.document.location.reload();
	document.GetPageFrm.list_type.value	= lType;
	document.GetPageFrm.submit();

}

function setListType1(lType1){
	setCookie("list_type1", lType1 , 36);
	//self.document.location.reload();
	document.GetPageFrm.list_type.value	= lType;
	document.GetPageFrm.submit();

}

//페이징
function setPage(page){
	document.GetPageFrm.page.value	= page;
	document.GetPageFrm.submit();

}


function del_really(){
	if( confirm('삭제하시겠습니까?') ){
		return true;
	}else{
		return false;
	}
}



// 게시판리스트 소트정렬
function setBoardSortType(lType){
	setCookie("sort_type", lType , 365);
	document.GetPageFrm.page.value	= 1;
	document.GetPageFrm.sort_type.value	= lType;
	document.GetPageFrm.action = '/board/board.html';
	document.GetPageFrm.submit();
}

// 게시판리스트 목록타입
function setBoardListType(lType){
	setCookie("list_type", lType , 365);
	document.GetPageFrm.list_type.value	= lType;
	document.GetPageFrm.action = '/board/board.html';
	document.GetPageFrm.submit();
}




//마우스오른쪽방지
function mouseClick(){
	if( event.button == 2 )
	{
		alert('컨텐츠 무단도용방지를 위하여\n마우스 오른쪽 버튼은 사용하실 수 없습니다');
	}
}
//document.onmousedown = mouseClick;




//이미지오류
function img_error(obj){
	obj.src = "http://abroad.co.kr/img/common/thumb_non_img.gif";
}




// 플래쉬 오픈타입
function setFlashOpenType(lType){
	//alert(lType);
	setCookie("fopen_type", lType , 365);
	//document.GetPageFrm.fopen_type.value = lType;
	//document.GetPageFrm.submit();
}


//즐겨찾기 추가
function bookmarksite(title,url){
  if(window.opera && window.print){ // opera
    var elem = document.createElement('a');
    elem.setAttribute('href',url);
    elem.setAttribute('title',title);
    elem.setAttribute('rel','sidebar');
    elem.click();
  }
  else if(document.all)// ie
    window.external.AddFavorite(url, title);
  else if (window.sidebar) // firefox
    window.sidebar.addPanel(title, url, "");
}



function f_setPageSize()
{
	if((obj=MM_findObj('pageBottom'))==null) return;
	pageBottom.style.display	= 'none';
	left						= f_getMaxHeight(pageLeftT);
	//right						= f_getMaxHeight(pageRightT);
	//pageRight.height			= (left > right ? left : right);
	pageLeft.height				= left;
	pageBottom.style.display	= 'block';
	bottom						= pageTop.offsetHeight + pageLeft.offsetHeight + f_getMaxHeight(pageBottomT);

	if(bottom < document.body.clientHeight){
		pageLeft.height = pageLeft.offsetHeight + document.body.clientHeight - bottom;
	}
}

//태그클릭시,태그자동검색
function gotoTagSearch(val){
	document.GetPageFrm.article_area4.value	= val;
	//alert(document.tsForm.article_area4.value);
	document.GetPageFrm.return_url.value		= '/content/news_search_list.html';
	document.GetPageFrm.action					= "/content/common/news_search_list.php";
	document.GetPageFrm.submit();
}
 
//태그클릭시,태그자동검색(카운터제외)
function gotoTagSearchNoCnt(mid,val){
	//search_type=st3

	document.GetPageFrm.article_area4.value	= val;
	document.GetPageFrm.m_id.value	= mid;
	document.GetPageFrm.return_url.value		= '/content/news_search_list.html';
	document.GetPageFrm.action					= "/content/common/news_search_list.php";
	document.GetPageFrm.submit();
}
 


// -->
