/**
 * ATOM BOX Javascript
 * File Name : css.css
 * Description : 템플릿에 필요한 자바스크립트
 *               추가시에는 최하단  추가(2000, 00, 00) 부분에 년,월,일 순으로 입력후 추가된 스타일을 적용해주세요.
 * Author : 김재겸(ATOM BOX)
 * Email : sibak18@naver.com
 * Date : 2009.02.08
 * Copyright(c) 2008 ATOM BOX. All Rights Reserved.
 */

//-----------------------------------------------------------------------------
// MM_swapImgRestore
//-----------------------------------------------------------------------------

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
  document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
  if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
  obj.visibility=v; }
}



//-----------------------------------------------------------------------------
// onfocus
//-----------------------------------------------------------------------------
function allblur() {
  for (i = 0; i < document.links.length; i++)
    document.links[i].onfocus = document.links[i].blur;
}

function bluring(){
  if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
//document.onfocusin=bluring;


//-----------------------------------------------------------------------------
// after
//-----------------------------------------------------------------------------
function bt(id,after){
  var isIE = document.all;
  if(isIE){
    eval(id+'.filters.blendTrans.stop();');
    eval(id+'.filters.blendTrans.Apply();');
    eval(id+'.src="'+after+'";');
    eval(id+'.filters.blendTrans.Play();');
  }else{
    //eval(id+'.filters.blendTrans.stop();');
    //eval(id+'.filters.blendTrans.Apply();');
    //eval(id+'.src="'+after+'";');
    //eval(id+'.filters.blendTrans.Play();');

    //document.images[id].filters[0].stop();
    //document.images[id].filters[0].apply();
    document.images[id].src = after;
    //document.images[id].filters[0].play();
  }
}


//-----------------------------------------------------------------------------
// restore_img_src
//-----------------------------------------------------------------------------
function restore_img_src(name, nsdoc){
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
  return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  }
}

function preload_img(){
  var img_list = preload_img.arguments;
  if (document.preloadlist == null)
  document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length-1; i++) {
    document.preloadlist[top+i] = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  }
}

function change_img_src(name, nsdoc, rpath, preload){
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
  return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  }
}


//-----------------------------------------------------------------------------
// 셀렉트 팝업
//-----------------------------------------------------------------------------
function sw_goto_byselect(sel, targetstr){
  var index = sel.selectedIndex;
  if (sel.options[index].value != '') {
    if (targetstr == 'blank') {
      window.open(sel.options[index].value, 'win1');
    }else{
      var frameobj;
      if (targetstr == '') targetstr = 'self';
      if ((frameobj = eval(targetstr)) != null)
      frameobj.location = sel.options[index].value;
    }
  }
}



//-----------------------------------------------------------------------------
// 윈도우 오픈
//-----------------------------------------------------------------------------

function open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable){
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  cookie_str = document.cookie;
  cookie_str.toString();
  pos_start  = cookie_str.indexOf(name);
  pos_start  = cookie_str.indexOf('=', pos_start);
  pos_end    = cookie_str.indexOf(';', pos_start);
  if (pos_end <= 0) pos_end = cookie_str.length;
  cookie_val = cookie_str.substring(pos_start + 1, pos_end);
  if (cookie_val  == "done")
  return;
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}



//-----------------------------------------------------------------------------
// 메인에 탭메뉴(공지사항, 질문&답변)
//-----------------------------------------------------------------------------

function Timg_change(T,cnt){ // 공지탭 바꾸기
  for(var i = 1; i <= cnt; i++) {
    img = document.getElementById('T'+i);
    img.src = "/board/listSkin/default/tab_img/tab0"+i+"_off.gif";
    eval("document.getElementById('TAB"+i+"').style.display = 'none'");
    eval("document.getElementById('MORE"+i+"').style.display = 'none'");

    if ( T == i ) {
      img.src = "/board/listSkin/default/tab_img/tab0"+i+"_on.gif";
      eval("document.getElementById('TAB"+i+"').style.display = ''");
      eval("document.getElementById('MORE"+i+"').style.display = ''");
    }
  }
}

function tab_change(T,cnt){ // 블로그탭 바꾸기
  for(var i = 1; i <= cnt; i++) {
    img = document.getElementById('T'+i);
    img.src = "/images/main/tab0"+i+"_off.gif";
    eval("document.getElementById('TAB"+i+"').style.display = 'none'");
    eval("document.getElementById('MORE"+i+"').style.display = 'none'");

    if ( T == i ) {
      img.src = "/images/main/tab0"+i+"_on.gif";
      eval("document.getElementById('TAB"+i+"').style.display = ''");
      eval("document.getElementById('MORE"+i+"').style.display = ''");
    }
  }
  if(T==1){
    document.getElementById("T2").src = "/images/main/tab02_off.gif";
    document.getElementById("T3").src = "/images/main/tab03_off.gif";
    eval("document.getElementById('TAB2').style.display = 'none'");
    eval("document.getElementById('MORE2').style.display = 'none'");
    eval("document.getElementById('TAB3').style.display = 'none'");
    eval("document.getElementById('MORE3').style.display = 'none'");
  }
}

function tab_blog_change(T,cnt){ // 블로그탭 바꾸기
  for(var i = 1; i <= cnt; i++) {
    img = document.getElementById('T'+i);
    img.src = "/images/main/tab_blog0"+i+"_off.gif";
    eval("document.getElementById('TAB"+i+"').style.display = 'none'");
    eval("document.getElementById('nextprev"+i+"').style.display = 'none'");
    eval("document.getElementById('MORE"+i+"').style.display = 'none'");

    if ( T == i ) {
      img.src = "/images/main/tab_blog0"+i+"_on.gif";
      eval("document.getElementById('TAB"+i+"').style.display = ''");
      eval("document.getElementById('nextprev"+i+"').style.display = ''");
      eval("document.getElementById('MORE"+i+"').style.display = ''");
    }
  }
  /*
  if(T==1){
    document.getElementById("T2").src = "/images/main/tab_blog02_off.gif";
    document.getElementById("T3").src = "/images/main/tab_blog03_off.gif";
    eval("document.getElementById('TAB2').style.display = 'none'");
    eval("document.getElementById('MORE2').style.display = 'none'");
    eval("document.getElementById('TAB3').style.display = 'none'");
    eval("document.getElementById('MORE3').style.display = 'none'");
  }
  */
}


//-----------------------------------------------------------------------------
// 하단 셀렉트 메뉴 및 마우스 오른쪽 클릭 제어
//-----------------------------------------------------------------------------

var workWin;
var TempTranCode = '';
//var secuCtlCheck = false;
var secuCtlCheck = true;

function nomenu(){
  return false;
}
function hidestatus(){
  window.status='';
  return true;
}
//document.oncontextmenu = nomenu;  //오른쪽마우스클릭
document.onmouseover=hidestatus;  //상태바제어
document.onmouseout=hidestatus;   //상태바제어

if(top.cibtop){
  if(top.cibtop.loginfo){
    if(top.cibtop.loginfo.length > 0){
      alert(top.cibtop.loginfo);
      top.cibtop.loginfo = "";
    }
  }
}


//-----------------------------------------------------------------------------
// 하단 셀렉트 메뉴 및 마우스 오른쪽 클릭 제어
//-----------------------------------------------------------------------------

//전체페이지 탑의 select(combo)
function showcombo(what){
  if (what.style.display=='')
    what.style.display='none';

  else if (what.style.display=='none')
    what.style.display='';
}


function showcombo2(what){
  if (what.style.display=='')
    what.style.display='none';

  else if (what.style.display=='none')
    what.style.display='';
}


//-----------------------------------------------------------------------------
// 탑으로&스크롤따라 움직이는 배너
//-----------------------------------------------------------------------------

var stmnLEFT = 860;     // 스크롤메뉴의 좌측 위치
var stmnGAP1 = 378;     // 페이지 헤더부분의 여백
var stmnGAP2 = 50;      // 스크롤시 브라우저 상단과 약간 띄움. 필요없으면 0으로 세팅
var stmnBASE = 281;     // 스크롤메뉴 초기 시작위치 (아무렇게나 해도 상관은 없지만 stmnGAP1과 약간 차이를 주는게 보기 좋음)
var stmnActivateSpeed = 1;  // 움직임을 감지하는 속도 (숫자가 클수록 늦게 알아차림)
var stmnScrollSpeed = 1;  // 스크롤되는 속도 (클수록 늦게 움직임)

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 SaveCookie(name, value, expire) {
  var eDate = new Date();
  eDate.setDate(eDate.getDate() + expire);
  document.cookie = name + "=" + value + "; expires=" + eDate.toGMTString()+ "; path=/";
}
function RefreshStaticMenu() {
  var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;
  stmnStartPoint = parseInt(STATICMENU.style.top, 10);
  stmnEndPoint = document.body.scrollTop + stmnGAP2;
  if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;
  stmnRefreshTimer = stmnActivateSpeed;
  if ( stmnStartPoint != stmnEndPoint ) {
    stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
    STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
    stmnRefreshTimer = stmnScrollSpeed;
  }
  stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
}
function InitializeStaticMenu() {
  STATICMENU.style.left = stmnLEFT;
  STATICMENU.style.top = document.body.scrollTop + stmnBASE;
  RefreshStaticMenu();
}

function gotop() {
  window.scrollTo(0,0);
}

function gotop_Call() {
  document.body.ondblclick = Top;
}

var Xpos = 0;
var Ypos = 0;
var Ygravity = 0.85;
var scrollPos = 0;
var oldScrollPos = 0;


function FloatMenu(){
  docWidth = document.body.clientWidth; // Update document width
  docHeight = document.body.clientHeight; // Update document height
  oldScrollPos = scrollPos;
  scrollPos = document.body.scrollTop; // Update scrollbar position

  //Xpos = 860;
  //Xpos = (docWidth - floater.offsetWidth) - 10; //오른쪽 여백 배너가 오른쪽에 붙을경우
  Xpos = (docWidth / 2) + 438; // 중앙정렬일경우. " + 410 은 테이블 크기 / 2 "
  Yboundary = ((scrollPos + docHeight) - floater.offsetHeight) - 41; //하단여백

  if(floater.offsetTop < Yboundary - 1){ // Object is behind boundary
    Ypos += 2;
  }

  if(floater.offsetTop > Yboundary + 1){ // Object is past boundary
    Ypos -= 1;
  }

  Ypos *= Ygravity; // Slow object down

  floater.style.pixelLeft = Xpos;
  floater.style.pixelTop += Ypos; // Make object bounce
}


//-----------------------------------------------------------------------------
// 인풋 자동넘김
//-----------------------------------------------------------------------------

var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
  var keyCode = (isNN) ? e.which : e.keyCode;
  var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
  if(input.value.length >= len && !containsElement(filter,keyCode)) {
    input.value = input.value.slice(0, len);
    input.form[(getIndex(input)+1) % input.form.length].focus();
  }
  function containsElement(arr, ele) {
    var found = false, index = 0;
    while(!found && index < arr.length)
    if(arr[index] == ele)
    found = true;
    else
    index++;
    return found;
  }
  function getIndex(input) {
    var index = -1, i = 0, found = false;
    while (i < input.form.length && index == -1)
    if (input.form[i] == input)index = i;
    else i++;
    return index;
  }
  return true;
}


/* 추가(2000. 00. 00) */

/****** 메인 메뉴 링크 *****************/
function menu1() { location.href = "/company/company1.php"; }
function menu2() { location.href = "/consul/consul1.php"; }
function menu3() { location.href = "/cran/cran1.php"; }
function menu4() { location.href = "/pine/pine1.php"; }
function menu5() { location.href = "/customer/customer1.php"; }


/******* 회사소개 링크 *****************/
function menu1sub1() { location.href = "/company/company1.php"; }
function menu1sub2() { location.href = "/company/company2.php"; }
function menu1sub3() { location.href = "/company/company3.php"; }
function menu1sub4() { location.href = "/company/company4.php"; }
function menu1sub5() { location.href = "/company/company5.php"; }

/******* 컨설팅 링크 *****************/
function menu2sub1() { location.href = "/consul/consul1.php"; }
function menu2sub2() { location.href = "/consul/consul2.php"; }
function menu2sub3() { location.href = "/consul/consul3.php"; }
function menu2sub4() { location.href = "/consul/consul4.php"; }

/******* 크랜베리 링크 *****************/
function menu3sub1() { location.href = "/cran/cran1.php"; }
function menu3sub2() { location.href = "/cran/cran2.php"; }


/******* 송침유 링크 *****************/
function menu4sub1() { location.href = "/pine/pine1.php"; }
function menu4sub2() { location.href = "/pine/pine2.php"; }

/******* 고객센터 링크 *****************/
function menu5sub1() { location.href = "/customer/customer1.php"; }
function menu5sub2() { location.href = "/customer/customer2.php"; }


function FlashMainbody(Ftrans,wid,hei,m) {
  mainbody = "<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='"+ wid +"' height='"+ hei +"'>";
  mainbody += "<param name='movie' value='/swf/"+ Ftrans +"'>";
  mainbody += "<param name='quality' value='high'>";
  mainbody += "<param name='wmode' value='transparent'>";
  mainbody += "<param name='menu' value='false'>";
  //mainbody += "<param name='FlashVars' value='m="+m+"'>";
  mainbody += "<embed src='/swf/"+ Ftrans +"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent' width='"+ wid +"' height='"+ hei +"'></embed>"
  mainbody += "</object>";

  //document.body.innerHTML = mainbody;
  document.write(mainbody);
  return;
}


/* 추가(2008. 09. 20) */

//-----------------------------------------------------------------------------
// 코멘트 접기,펴기-펼침
//-----------------------------------------------------------------------------

function folder(commentObject){
  img = document.getElementById('commmentFolder');
  if(commentObject.style.display != "none"){
    img.src = "/board/images/emo/spread_icon.gif";
    commentObject.style.display = "none";
  }
  else{
    img.src = "/board/images/emo/fold_icon.gif";
    commentObject.style.display = "";
  }
}


//-----------------------------------------------------------------------------
// 팝업 - 새창 중앙으로 띄우기
//-----------------------------------------------------------------------------

function popup_center(name, url, width, height, scrollbar, resizeble, menubars){
  x = (screen.availWidth - width) / 2;
  y = (screen.availHeight - height) / 2;
  window.open(url, name, 'width='+width+', height='+height+', left='+x+', top='+y+',scrollbars='+scrollbar+',resizable='+resizeble+',menubars='+menubars);
}


//-----------------------------------------------------------------------------
// 드롭 메뉴
//-----------------------------------------------------------------------------
//1차메뉴
function msover(menu,num,topMenuType) {
  if(topMenuType=="4"){
    var id = "mainMenu"+menu;
    var after = "/images/menu/main"+num+"_on.gif";
    eval(id+'.filters.blendTrans.stop();');
    eval(id+'.filters.blendTrans.Apply();');
    eval(id+'.src="'+after+'";');
    eval(id+'.filters.blendTrans.Play();');
  }else if(topMenuType=="3"){
    document.all['mainMenu' + menu].src = '/images/menu/main'+num+'_on.gif';
  }
  Tmenu1 = menu;
  Tnum1 = num;
}
function msout(menu,num) {
  document.all['mainMenu' + menu].src = '/images/menu/main'+num+'_off.gif';
  Tmenu1 = menu;
  Tnum1 = num;
}
function divmsover() {
  document.all['mainMenu' + Tmenu1].src = '/images/menu/main'+Tnum1+'_on.gif';
  Tmenu2 = Tmenu1;
  Tnum2 = Tnum1;
}
function divmsout() {
  document.all['mainMenu' + Tmenu2].src = '/images/menu/main'+Tnum2+'_off.gif';
}
//2차메뉴
function subover(submenu,subnum,tableName) {
  if(tableName){
    document.all['Image' + submenu].src = '/images/menu/layer'+subnum+'_'+tableName+'_on.gif';
  }else{
    document.all['Image' + submenu].src = '/images/menu/layer'+subnum+'_on.gif';
  }
  Smenu1 = submenu;
  Snum1 = subnum;
  TableName1 = tableName;
}
function subout(submenu,subnum,tableName) {
  if(tableName){
    document.all['Image' + submenu].src = '/images/menu/layer'+subnum+'_'+tableName+'_off.gif';
  }else{
    document.all['Image' + submenu].src = '/images/menu/layer'+subnum+'_off.gif';
  }
  Smenu1 = submenu;
  Snum1 = subnum;
  TableName1 = tableName;
}
function divsubover() {
  if(TableName1){
    document.all['Image' + Smenu1].src = '/images/menu/layer'+Snum1+'_'+TableName1+'_on.gif';
  }else{
    document.all['Image' + Smenu1].src = '/images/menu/layer'+Snum1+'_on.gif';
  }
  Smenu2 = Smenu1;
  Snum2 = Snum1;
  TableName2 = TableName1;
}
function divsubout() {
  if(TableName2){
    document.all['Image' + Smenu2].src = '/images/menu/layer'+Snum2+'_'+TableName2+'_off.gif';
  }else{
    document.all['Image' + Smenu2].src = '/images/menu/layer'+Snum2+'_off.gif';
  }
}


//-----------------------------------------------------------------------------
// 게시판 글씨기 암호
//-----------------------------------------------------------------------------
function onFocus_info(){
  document.write_form.focusInfo.value = "yes";
}

function cmt_onFocus_info(){
  document.commentForm.focusInfo.value = "yes";
}

function cmt_onFocus_info2(){
  document.commentForm2.focusInfo.value = "yes";
}

function est_onFocus_info(){
  document.orderForm.focusInfo.value = "yes";
}


//-----------------------------------------------------------------------------
// 미니블로그 팝업 - 새창 중앙으로 띄우기
//-----------------------------------------------------------------------------

function miniBlog_popup(name, userID, width, height, scrollbar, resizeble, menubars){
  x = (screen.availWidth - width) / 2;
  y = (screen.availHeight - height) / 2;
  window.open('/board/member/miniBlog.php?userID='+userID, name, 'width='+width+', height='+height+', left='+x+', top='+y+',scrollbars='+scrollbar+',resizable='+resizeble+',menubars='+menubars);
}


//-----------------------------------------------------------------------------
// 미니블로그 링크
//-----------------------------------------------------------------------------
function miniBlog_link(mode){
  miniBlog.location.href = "miniBlog_mode.php?mode="+mode;
}

//-----------------------------------------------------------------------------
// 숫자만체크 onkeypress="only_num(this);" onkeyon="only_num(this);"
//-----------------------------------------------------------------------------
function only_num(this_s){
  temp_value = this_s.value.toString();
  regexp = /[^0-9]/g;
  repexp = '';
  temp_value = temp_value.replace(regexp,repexp);
  this_s.value = temp_value;
}

//-----------------------------------------------------------------------------
// 프린트 영역지정
//-----------------------------------------------------------------------------
function printDiv () {
  if (document.all && window.print) {
    window.onbeforeprint = beforeDivs;
    window.onafterprint = afterDivs;
  }
  window.print();
}
function beforeDivs () {
  document.getElementById("container-outer").style.display = "none";
  objSelection.innerHTML = document.getElementById("content-body").innerHTML; // 이곳에서 ID를 지정
}
function afterDivs () {
  document.getElementById("container-outer").style.display = "block";
  objSelection.innerHTML = "";
}


//------------------------------------------------------------------------------
// 팝업관련
//------------------------------------------------------------------------------
function popup_tab(k){
  if(k == 1){
    document.getElementById("popup_tab2").style.display = "none";
    document.getElementById("popup_tab1").style.display = "block";
  }else{
    document.getElementById("popup_tab1").style.display = "none";
    document.getElementById("popup_tab2").style.display = "block";
  }
}

function popup_img_view(v){
  window.open('/board/include/img_view_popup.php?imgSrc='+v, 'popup_img', scrollbars=0,resizable=0,menubars=0);
}

function popup_print(){
  width = '900';
  height = '641';
  x = (screen.availWidth - width) / 2;
  y = (screen.availHeight - height) / 2;
  window.open('/board/include/popup_print.php', name, 'width='+width+', height='+height+', left='+x+', top='+y+',scrollbars=0,resizable=0,menubars=0');
}