// /segio/segio.js // 자바스크립트를 모아둡니다. // 이올라스와 MS의 특허분쟁에 의한 MSIE 패치에 따른 대응책으로 작성된 dwrite 함수가 // 이곳에 위치하고 있습니다. // 각각의 알맹이 문서에서 로딩하도록 합니다 포함대상 각 알맹이 문서. // 게시판의 목록, 읽기, 편집 기능의 필터에 의무적으로 포함시켜야 할 자바스크립트를 // 모아두고 있습니다. // // update: 2007.11.26 image_resize 및 함수의 지역변수 var 선언(익스플로러 window frame name 오류) // update: 2007.08.31 _put_flash_show 함수 추가(플래쉬 메뉴를 포함시키는 자바스크립트) // update: 2007.04.11 _window_view 함수 추가(게시판, 웹메일에서 사용됨, 웹메일 필터수정요망) // update: 2006.08.17 _div_visible 함수 수정(나타났다가 5초후 자동 소멸 기능) // update: 2006.08.11 _div_visible 함수 추가(게시판, 웹메일 에서 사용됨) // update: 2006.08.03 segio.js, board.js -> segio.js 파일로 통합. // update: 2005.04.12 // 이미지 사이즈 체크 기능 추가. body onLoad="_imagesize_check(); // update: 2005.04.05 segio.js, board.js 파일 최초 작성 var image_count=1, sstyle=""; // flash 메뉴를 삽입할 때 사용한다. 2007년 8월 31일 신규 추가 function _put_flash_show(url, width, height,quality, menu, wmode) { var str=''; dwrite(str); } var w_counter =10; function _window_view(url, mtype) { var pop=false; _div_visible(null); if(mtype!=null){ if(mtype.indexOf('image/')==0)pop=true; if(mtype.indexOf('text/')==0)pop=true; } if(!pop)return true; window.open(url,'window_view_'+w_counter++,'width=380,height=320,resizable=1,scrollbars=1'); return false; } function _resize(img,width,height) { if(img.width>width){ img.height=(img.height*width) / img.width; img.width=width; } if(img.height>height){ img.width =(img.width * height) / img.height; img.height=height; } return; } function dwrite(str) { document.write(str); return 0; } var shown_divstyle=null; function _div_visible(divid){ var ds=null; //alert('div_visible call'); if(divid!=null){ d=document.getElementById(divid); if(d)ds=d.style; } if(shown_divstyle==ds)ds=null; if(shown_divstyle!=null){ shown_divstyle.visibility='hidden'; shown_divstyle=null; } if(ds!=null){ ds.visibility='visible'; shown_divstyle=ds; setTimeout("_div_visible(null);", 5000 ); } return; } document.write('
'); function flush_style() { var ddiv=document.getElementById("flush_style_div"); if(ddiv==null)return; ddiv.innerHTML=('\n\n'); } function image_resize(img) { var sopt, name, i, w, width, h, height; sopt=0; name=img.name; if(name.length<3)return; i=name.indexOf('x'); if(i<1)return; width=name.substring(0,i); height=name.substring(i+1); w=img.width; h=img.height; if(w>width){ sopt++; h=(h*width)/w; w=width;} if(h>height){sopt++; w=(w*height)/h;h=height;} if(sopt>0){ img.width=w; img.height=h; sstyle+=("."+img.id+" {width:"+w+";height:"+h+";}\n"); } flush_style(); } function popup_image(width,height, img) { var result, dd, src; var _left=(screen.width-width)/2; var _top=(screen.height-height)/2; result=window.open('', 'img', 'resizable=yes, scrollbars=yes, left='+_left+', top='+_top+',width=0, height=0' ); dd = result.document.getElementById("view_div"); src='