//플래시 ActiveX 오브젝트
function viewFlash(sURL, sName, sFeatures,sTitle)
{
var FLASHCAB = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab";
var FLASHCID = "CLSID:D27CDB6E-AE6D-11CF-96B8-444553540000";
var FLASHVER = "7,0,19,0";
var sFeature;
var sWidth = "100%";
var sHeight = "100%";
var sTitle = "";
var pmBoolean = "false";
var sTempArray;
var sParamTag = "";
var sParamTag2 = "";
sFeature = sFeatures.split(/\s*,\s*/);
for (var i=0; i< sFeature.length ; i++)
{
sTempArray = sFeature[i].split(/\s*=\s*/);
if (sTempArray[0].toLowerCase() == "width")
{
//넓이
sWidth = sTempArray[1];
}
else if (sTempArray[0].toLowerCase() == "height")
{
//높이
sHeight = sTempArray[1];
}
else
{
//기타 파라메터 처리
if (sTempArray[1].toLowerCase() == "yes" || sTempArray[1] == "1" || sTempArray[1].toLowerCase() == "true"){
pmBoolean = "true";
}else if (sTempArray[1].toLowerCase() == "no" || sTempArray[1] == "0" || sTempArray[1].toLowerCase() == "false"){
pmBoolean = "false";
}else{
pmBoolean = sTempArray[1];
}
sParamTag = "\n"+sParamTag;
sParamTag2 = " " + sTempArray[0] +"='"+pmBoolean +"' "+ sParamTag2;
}
}
document.write("");
}
//플래시 스크립트
function embedFlash(src, width, height, id, alt, img)
{
var content ="";
content="";
document.write(content);
}
//미디어 플레이어 오브젝트를 뿌려줍니다.
//미디어 플레이어 버전은 7~10 버전에 호환되는 오브젝트ID를 사용합니다.
function viewMediaPlayer(sURL, sName, sFeatures)
{
var WMPCID = "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6";
var sFeature;
var sWidth = "100%";
var sHeight = "100%";
var pmBoolean;
var sTempArray;
var sParamTag = "";
sFeature = sFeatures.split(/\s*,\s*/);
for (var i=0; i< sFeature.length ; i++)
{
sTempArray = sFeature[i].split(/\s*=\s*/);
if (sTempArray[0].toLowerCase() == "width")
{
//넓이
sWidth = sTempArray[1];
}
else if (sTempArray[0].toLowerCase() == "height")
{
//높이
sHeight = sTempArray[1];
}
else
{
//기타 파라메터 처리
if (sTempArray[1].toLowerCase() == "yes" || sTempArray[1] == "1" || sTempArray[1].toLowerCase() == "true"){
pmBoolean = "true";
}else if (sTempArray[1].toLowerCase() == "no" || sTempArray[1] == "0" || sTempArray[1].toLowerCase() == "false"){
pmBoolean = "false";
}else{
pmBoolean = sTempArray[1];
}
sParamTag = "\n"+sParamTag;
}
}
document.write("");
}
////////////////////// default
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_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문자 byte체크
function nets_check(Obj,lsMax)
{
var tmpStr;
var temp=0;
var onechar;
var tcount;
var utf_count;
tcount = 0;
utf_count=0;
var aquery = Obj.value;
tmpStr = new String(aquery);
temp = tmpStr.length;
for(k=0;k 4)
{
tcount += 2;
utf_count+=3;
//utf_count+=2;
}
else if(onechar!='\r')
{
if ( onechar.charCodeAt() == 10 ){
tcount += 2;
utf_count+=2;
}
else
{
tcount++;
utf_count++;
}
}
//if(tcount>lsMax)
if(utf_count>lsMax)
{
tmpStr = tmpStr.substring(0,k);
break;
}
}
Obj.focus();
Obj.value = tmpStr;
}
var cmtMax = 400;
var cmtAlert='덧글은 영문 400자,한글 200자까지 가능합니다.';
//-->문자 byte체크 호출
function doTextByteCheck(Obj, VMax, ObjName)
{
var tmpStr;
var temp=0;
var onechar;
var tcount;
var utf_count;
tcount = 0;
utf_count=0;
var crnr_chk=0;
var aquery = Obj.value;
tmpStr = new String(aquery);
temp = tmpStr.length;
for (k=0;k 4)
{
tcount += 2;
//utf_count +=2;
utf_count +=3;
}
else if (onechar!='\r')
{
if ( onechar.charCodeAt() == 10 )
{
tcount += 2;
utf_count +=2;
}
else
{
tcount++;
utf_count ++;
}
}
}
//if(tcount>VMax)
if(utf_count>VMax)
{
reserve = tcount-VMax;
reserve = utf_count-VMax;
alert(" "+ObjName+"은(는) "+VMax+"바이트 이상은 입력하실수 없습니다.\r\n 입력한 내용이 "+reserve+"바이트 초과되었습니다.\r\n 초과된 부분은 자동으로 삭제됩니다.");
nets_check(Obj, VMax);
return;
}
}
/*TopMenu -submenu 보기: 현재메뉴활성*/
var preNaviID = "";
var preOver = "";
var preSub = "";
function showTopSub(naviID) {
var subMn = document.getElementById("sub_navi"+naviID);
if(preNaviID != naviID || preNaviID == "") {
if(preNaviID != "") {
document.getElementById("sub_navi"+preNaviID).style.display = "none";
}
subMn.style.display = "block";
preNaviID = naviID;
}
}
//로그인div
function fn_showLoginSheet(show,mnu_siteid){
if (show == 1)
{
var pntMouseY;
var pntMouseX;
var obj = document.getElementById("LinkLoginWrite");
var posX=0;
var posY=0;
if(typeof(obj.offsetParent) != "undefined")
{
for(var x=0, y=0;obj; obj=obj.offsetParent)
{
x += obj.offsetLeft;
y += obj.offsetTop;
}
pntMouseX=x;
pntMouseY=y;
}
else{
pntMouseX=obj.offsetLeft;
pntMouseY=obj.offsetTop;
}
document.getElementById('LoginHTML').style.position = 'absolute';
document.getElementById('LoginHTML').style.zIndex = 1;
document.getElementById('LoginHTML').style.left = '250px';
document.getElementById('LoginHTML').style.top = (pntMouseY-300)+'px';
document.getElementById('LoginHTML').style.display = 'block';
}else {
document.getElementById("LoginHTML").style.display = 'none';
}
}
/* */
//실명인증 Open 창
function fnPopup(path)
{
window.open('/message/certnc_main.php?ret='+path, 'popup','width=410, height=590');
//document.frmVar.var_path.value = path;
//document.frmVar.target = "popup";
//document.frmVar.action = "/message/vname_Input.php";
//document.frmVar.submit();
}
// G-PIN 인증창 Open
function fn_GPinAuth(path) {
var sThisURL = document.location +'';
var arrayURL = sThisURL.split('/');
var sNewURL = '';
var sExp = '';
if (arrayURL[2]!='www.ulleung.go.kr' ) {
if( confirm('G-PIN 인증 도메인으로 이동하시겠습니까? 이동후 다시 글쓰기를 눌러주세요') )
{
for(var i=0;i 0) {
valueW = valueW;
valueH = valueH + 21;
} else {
valueW = valueW;
valueH = valueH - 1;
}
var height = screen.height;
var width = screen.width;
var leftpos = width / 2 - valueW / 2;
var toppos = height / 2 - valueH / 2;
self.resizeTo(valueW, valueH);
self.moveTo(leftpos, toppos);
self.resizeTo(valueW, valueH); // 이유없다 resize잘안되어서 한번더 call
}
//font-size
function getFontCookie() {
var fontSize = getCookie("font_size");
try {
if ( fontSize == null ) return 12;
if ( fontSize.length ) return parseInt(fontSize); else return 16;
} catch (e) {
return 16;
}
}
var fontSize = getFontCookie();
function scaleFont(val) {
var content, lineHeight;
var oldContent = document.getElementById("oldCnt");
content = document.getElementById("wrap");
if (oldContent != null)
content = oldContent;
if(val == 12){
fontSize = val;
lineHeight = fontSize+Math.round(1.1*fontSize);
content.style.fontSize = fontSize + "px";
}else if (val > 0) {
if (fontSize <= 18) {
fontSize = fontSize + val;
lineHeight = fontSize+Math.round(1.1*fontSize);
content.style.fontSize = fontSize + "px";
}
} else {
if (fontSize > 8) {
fontSize = fontSize + val;
lineHeight = fontSize+Math.round(1.1*fontSize);
content.style.fontSize = fontSize + "px";
} else {
lineHeight = fontSize+Math.round(1.1*fontSize);
content.style.fontSize = fontSize + "px";
}
}
var mydate = new Date; mydate.setDate(mydate.getDate()+1000);
setCookie("font_size", fontSize, mydate);
}
//수동 탭메뉴 처리
var preNavipage = "";
function showNaviPage(tabID) {
var NaviPage = document.getElementById(tabID);
if(preNavipage != NaviPage) {
if(preNavipage != "") {
preNavipage.style.display = "none"; //.style.visibility = "hidden"
}
NaviPage.style.display = "block";
preNavipage = NaviPage;
}
/*
else{
preNavipage.style.display = "none";
preNavipage = "";
}
*/
}
function getWindow(url,w,h)
{
var position = "width="+w+",height="+h+",left=100,top=100,toolbar=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0";
window.open( url, '', position);
}
function fn_zipsearch(frmName,zip1,zip2,addr1,addr2)
{
var i_url = "/message/member_zipcode_search.php?fm="+frmName+"&zip1="+zip1+"&zip2="+zip2+"&addr1="+addr1+"&addr2="+addr2;
window.open(i_url,'openZipWindow','width=450,height=350,top=10,left=10,resizable=no,menubar=no,scrollbars=no');
return;
}
var old = "";
function viewMenu(e)
{
if(old != e)
{
if(old != "")
{
document.getElementById(old).style.display = "none";
}
document.getElementById(e).style.display = "block";
old = e;
}
else
{
document.getElementById(e).style.display = "none";
old = "";
}
}
// iframe auto resize
function resizeIFrame(ifrName) {
var min_h = 250;
var oIFrame = document.getElementById(ifrName);
try {
var oDoc = oIFrame.contentDocument || oIFrame.contentWindow.document;
if (/MSIE/.test(navigator.userAgent)) {
var frmHeight = oDoc.body.scrollHeight;
} else {
var s = oDoc.body.appendChild(document.createElement('DIV'))
s.style.clear = 'both';
var frmHeight = s.offsetTop;
s.parentNode.removeChild(s);
}
if (frmHeight < min_h)
frmHeight = min_h;
oIFrame.style.height = frmHeight+"px";
} catch (e) { }
}
function checkLogData(frmObj)
{
var sUserId = frmObj.mem_id.value;
var sUerPass = frmObj.mem_pass.value;
if(sUserId == "") {
alert("[아이디]는 필수 입력 사항입니다.");
frmObj.mem_id.focus();
return false;
}
if(sUerPass == "") {
alert("[비밀번호]는 필수 입력 사항입니다");
frmObj.mem_pass.focus();
return false;
}
}
function checkLogSubmit(frmObj)
{
if(checkLogData(frmObj))
frmObj.submit();
}
/* 통합검색 */
function chechSearchData (f) {
if(f.searchStr.value.length==0){
alert("검색어를 입력해주세요");
f.searchStr.focus();
return false;
}
return true;
}
/* 게시판 검색 */
function msgSearchDt(f) {
if( f.se_text ){
if( f.se_text.value.length == 0 ){
alert("검색어를 입력해주세요");
f.se_text.focus();
return false;
}
}
return true;
}
function changeList(ca)
{
document.chList.msg_ca_no.value=ca;
document.chList.submit();
}
function fn_chYear()
{
document.frmsearch.submit();
}
/* 직원검색 */
function checkMemSearch(f){
if(f.seek_text.value.length==0){
alert("검색어를 입력해주세요");
f.seek_text.focus();
return false;
}
return true;
}
/*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 '';
}
var old = "";
function viewMenu(e)
{
if(old != e)
{
if(old != "")
{
old.style.display = "none";
}
e.style.display = "block";
old = e;
}
else
{
e.style.display = "none";
old = "";
}
}
/*
사용중 : 우측베너용
*/
var _initTop = 0;
var _layerID = "";
function FlowBanner ( id, initTop )
{
//alert(navigator.appName);
var ns = (navigator.appName.indexOf("Netscape") != -1);
if (ns) initTop = initTop
var layer = document.getElementById(id);
layer.style.top = initTop+"px";;
_layerID = id;
_initTop = initTop;
_FlowBanner ();
}
function _FlowBanner ()
{
var layer = document.getElementById(_layerID);
var ns = (navigator.appName.indexOf("Netscape") != -1);
if (ns){
num = (layer.style.top.length);
var currentTop = layer.style.top.substring(0,(num-2));
currentTop = parseInt(currentTop);
}else{
var currentTop = parseInt ( layer.style.top );
}
//alert( currentTop );
if (ns){
var baseTop = parseInt ( document.documentElement.scrollTop );
}else{
var baseTop = parseInt ( document.documentElement.scrollTop );
}
//alert( baseTop );
var nextTop = baseTop + _initTop;
var distance = ( nextTop - currentTop ) / 15;
if ( distance > 10 )
distance = 10;
else if ( distance < -10 )
distance = -10;
if (ns){
layer.style.top = (currentTop + distance)+"px";
}else{
layer.style.top = currentTop + distance;
}
setTimeout ( "_FlowBanner()", 1 );
}
function sample_layout()
{
FlowBanner ( "scrollB", 0 );
}
// 사용중 ( 이미지버튼 on/off )
var old='';
function menu(name)
{
var obj = document.getElementById(name);
submenu=obj.style;
if ( old && old==submenu ) return false;
if(old!=submenu)
{
if(old!='') old.display='none';
submenu.display='block';
old=submenu;
}
else
{
submenu.display='none';
old='';
}
}
// 사용중 : 폰트 사이즈 조정
var fntSize = 9;
function wdSetFontSize(objName,ca)
{
var NextSize = 0;
var cssObj;
var ObjCnt = document.getElementById(objName);
if ( !ObjCnt ) ObjCnt = document.getElementById('main_ctn');
if ( ca == 0 )
{
ObjCnt.style.fontSize = "9pt";
setFontsizeToObject(ObjCnt,"table",9);
setFontsizeToObject(ObjCnt,"p",9);
setFontsizeToObject(ObjCnt,"dt",9);
setFontsizeToObject(ObjCnt,"dd",9);
//for (i=0; i< document.styleSheets.length;i++){
//cssObj = document.styleSheets[i];
//alert( cssObj.href );
// loadjscssfile(cssObj.href, 'css' ) ;
//}
return false;
}
else
{
NextSize = fntSize + parseInt(ca);
//alert( NextSize );
if ( NextSize < 10 || NextSize > 20 ) {
alert('기준이상 조절은 불가합니다');
return false;
}
fntSize = NextSize;
ObjCnt.style.fontSize = NextSize+"pt";
setFontsizeToObject(ObjCnt,"table",NextSize);
setFontsizeToObject(ObjCnt,"p",NextSize);
setFontsizeToObject(ObjCnt,"dt",NextSize);
setFontsizeToObject(ObjCnt,"dd",NextSize);
}
}
// 해당 obj 내의 객체내부 font size 지정
function setFontsizeToObject(obj,tag,fntSize)
{
var tObj,sObj;
sObj = obj.getElementsByTagName(tag);
for(var i=0;i< sObj.length;i++){
tObj = sObj[i];
if ( fntSize > 0 )
tObj.style.fontSize = fntSize + "pt";
else
tObj.style.fontSize = "";
}
}
function loadjscssfile(filename, filetype){
if (filetype=="js"){ //if filename is a external JavaScript file
var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src", filename)
}
else if (filetype=="css"){ //if filename is an external CSS file
var fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet")
fileref.setAttribute("type", "text/css")
fileref.setAttribute("href", filename)
}
if (typeof fileref!="undefined")
document.getElementsByTagName("head")[0].appendChild(fileref)
}
// 사용중 : 내용 메일보내기
function sendPage(ctn,pURL)
{
pURL = pURL +'&ctn='+ctn;
window.open(pURL,'','width=450,height=250,toolbar=no, status=no, menubar=no, scrollbars=yes, resizable=yes'); return false;
}
// 사용중 : 내용 인쇄하기
function printPage(ctn,pURL)
{
pURL = pURL +'&ctn='+ctn;
window.open(pURL,'','width=650,height=600,toolbar=no, status=no, menubar=no, scrollbars=yes, resizable=yes'); return false;
}
// 사용중 : 숫자관련 함수
function isNumber(fld)
{
if (fld.value.length > 0)
{
for (i = 0; i < fld.value.length; i++)
{
var chr = fld.value.substr(i,1);
if (chr < '0' || chr > '9') return false;
}
return true;
}
else
{
return false;
}
}
function fn_download(fileName)
{
//document.frmDocDownload.file_name.value = fileName;
//document.frmDocDownload.submit();
//return;
window.open('/message/document_download_action.php?file_name='+fileName,'_parent','');
}
function fn_download1(fileName,pdir,pname)
{
//document.frmDocDownload.file_name.value = fileName;
//document.frmDocDownload.physical_name.value = pname;
//document.frmDocDownload.physical_dir.value = pdir;
//document.frmDocDownload.submit();
window.open('/message/document_download_action.php?physical_dir='+pdir+'&physical_name='+pname+'&file_name='+fileName,'_parent','');
return;
}
function encode_utf8( s ){ return unescape( encodeURIComponent( s ) );}
function decode_utf8( s ){ return decodeURIComponent( escape( s ) );}
/*동영상관련*/
/*
function showOnOff(tabid,Num, tot) {
for (i=1;i<=tot;i++) {
if(i < 10){no="0"+i;}else {no =i;}
tabImg = document.getElementById(tabid+"_tab"+no);
tabContent = document.getElementById(tabid+"_ctn"+no);
if (tabImg) { //객체가존재하면
if (tabImg.tagName=="IMG") { tabImg.src = tabImg.src.replace("_on", "_off"); } //이미지일때
}
if (tabContent) { tabContent.style.visibility="hidden"; }
}
if(Num < 10){Num="0"+Num;}
tabImg = document.getElementById(tabid+"_tab"+Num);
tabContent = document.getElementById(tabid+"_ctn"+Num);
if (tabImg) { //객체가존재하면
if (tabImg.tagName=="IMG") { tabImg.src = tabImg.src.replace("_off", "_on"); } //이미지일때
}
if (tabContent) { tabContent.style.visibility="visible"; }
}
*/
// 독도홍보영상
var swf_no = 1;
function showMovieOnOff(no)
{
var dataUrl='';
if ( no == swf_no ) return false;
swf_no = no;
switch(no ){
case 1: dataUrl='/swf/vr/dokdo-kor.swf'; break;
case 2: dataUrl='/swf/vr/dokdo-eng.swf'; break;
}
var ObjFlvPlayer = "";
document.getElementById('fla_video_01').innerHTML = '';
document.getElementById('fla_video_01').innerHTML = ObjFlvPlayer;
}
function printFlashObject(flash_src,name,width,height,option_param_tag){
obj_html = "\
\
\
\
\
\
";
obj_html = obj_html + option_param_tag;
obj_html = obj_html + "\
";
document.write(obj_html);
}
//레이어 펼쳤다 숨기기
var oldMenuID = null;
function showSubMenu(menuID)
{
var menuID = document.getElementById(menuID);
if (menuID.style.display == "" || menuID.style.display == "none")
{
if (oldMenuID != null)
{
oldMenuID.style.display = "none";
}
menuID.style.display = "block";
oldMenuID = menuID;
}
else
{
menuID.style.display = "none";
}
}
function wjRollOver(obj,img_id,img)
{
var image_id = document.getElementById(img_id);
//기본이미지 저장
var ori_img = image_id.src;
var info_img = ori_img.split("/");
info_img[(info_img.length-1)] = img;
//변경이미지 저장
var che_img = info_img.join("/");
//첨 마우스 업했을때 변경
image_id.src = che_img;
//롤아울시 변경
//obj_id.onmouseout = new Function("this.src='"+ori_img+"'");
obj.onmouseout = new Function("document.getElementById('"+img_id+"').src='"+ori_img+"'");
obj.onblur = new Function("document.getElementById('"+img_id+"').src='"+ori_img+"'");
}
//수동 탭메뉴 처리
var preTabpage = "";
function showTabPage(tabID) {
var tabPage = document.getElementById("tab_"+tabID);
if(preTabpage != tabPage) {
if(preTabpage != "") {
preTabpage.style.display = "none";
}else{
document.getElementById("tab_1").style.display = "none";
}
tabPage.style.display = "block";
preTabpage = tabPage;
}
/*
else{
preTabpage.style.display = "none";
preTabpage = "";
}
*/
}
function ci(ele)
{
for(var i=1;i < 4;i++)
{
if(ele == i) {
document.getElementById("ciView"+i).style.display = "";
document.getElementById("ciCate"+i).src = "/design/img/sub/03/altabon_0"+i+".gif";
}else {
document.getElementById("ciView"+i).style.display = "none";
document.getElementById("ciCate"+i).src = "/design/img/sub/03/altaboff_0"+i+".gif";
}
}
}
function ag(ele)
{
for(var i=1;i < 5;i++)
{
if(ele == i) {
document.getElementById("agView"+i).style.display = "";
document.getElementById("agCate"+i).src = "/design/img/sub/07/agencyon_0"+i+".gif";
}else {
document.getElementById("agView"+i).style.display = "none";
document.getElementById("agCate"+i).src = "/design/img/sub/07/agencyoff_0"+i+".gif";
}
}
}
//팝업
function openWindow(URL,windowName, width, height, resize, scroll, others)
{
var newWin =null;
var centerWidth = 0;
var centerHeight = 0;
var windowFeatures = "width=" + width + "px, height=" + height + "px";
if(resize)
{
windowFeatures += ",resizable=1";
}
if(scroll)
{
windowFeatures += ",scrollbars=1";
}
if(others == 'center')
{
centerWidth = (window.screen.width - width) / 2;
centerHeight = (window.screen.height - height) / 2;
windowFeatures += "left=" + centerWidth + ",top=" + centerHeight;
}
newWin = window.open(URL,windowName,windowFeatures);
return newWin;
}
//그룹웨어
function goGW()
{
window.open('http://gw.mtecheng.co.kr','_blank','');
}
//관리자
function goIntra()
{
window.open('/main/?mode=index','_blank','');
}