<!--
var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;

function hidelayer(lay) {
	if (ie4) {parent.document.all[lay].style.visibility = "hidden";}
	if (ns4) {parent.document.layers[lay].visibility = "hide";}
	if (ns6) {parent.document.getElementById([lay]).style.display = "none";}
}

function showlayer(lay) {
	if (ie4) {document.all[lay].style.visibility = "visible";}
	if (ns4) {document.layers[lay].visibility = "show";}
	if (ns6) {document.getElementById([lay]).style.display = "block";}
}

function writetolayer(lay,txt) {
	if (ie4) {
		document.all[lay].innerHTML = txt;
	}
	if (ns4) {
		document[lay].document.write(txt);
		document[lay].document.close();
	}
	if(ns6) {
	 over = document.getElementById([lay]);
	 range = document.createRange();
	 range.setStartBefore(over);
	 domfrag = range.createContextualFragment(txt);
	 while (over.hasChildNodes()) {
	  over.removeChild(over.lastChild);
	 }
	 over.appendChild(domfrag);
	 }
}

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_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<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_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; }
}

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_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_openBrWindow(theURL,winName,features) { //v2.0 
  window.open(theURL,winName,features); 
} 

function openwin(url,w,h) {
	var winWidth	= w;
	var winHeight	= h;
	var winLeft		= ((screen.width - winWidth) / 2) - 10;
	var winTop		= ((screen.height - winHeight) / 2) - 20;
	var winAttr		= "width="+ winWidth +",height="+ winHeight +",left="+ winLeft +",top="+ winTop +",status=no,menubar=no,scrollbars=auto,resizable=no";
	window.open(url, "", winAttr);
}

// open_window('reservation', '', 0, 0, 637, 500, 0, 0, 0, 1, 0)
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';
  var winLeft	= ((screen.width - width) / 2) - 10;
  var winTop	= ((screen.height - height) / 2) - 20;  
  window.open(url, name, 'left='+winLeft+',top='+winTop+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function image_open(id, idx, img){
	window.open('http://www.anmyondo.com/board/execute/image.asp?id='+id+'&idx='+idx+'&img='+img,'image','scrollbars=yes,resizable=yes,width=100,height=50');
}

function image_open(id, idx, img){
	//window.open('/board/execute/image.asp?id='+id+'&idx='+idx+'&img='+img,'image','scrollbars=no,resizable=yes,width=100,height=50');
	window.open('http://www.anmyondo.com/board/execute/image_viewer.asp?id='+id+'&idx='+idx+'&img='+img,'image','scrollbars=yes,resizable=yes,width=680,height=650');
}

function image_open2(id, idx, img){
	window.open('http://www.anmyondo.com/board/execute/image_viewer.asp?id='+id+'&idx='+idx+'&img='+img,'image','scrollbars=auto,resizable=yes,width=680,height=650');
}

function image_open3(id, idx, img){
	window.open('http://www.anmyondo.com/board/execute/image_viewer_bthumb.asp?id='+ id +'&img='+ img, 'thumb', 'width=800, height=600');	
}

function newopen(url,id,scr,sta,res,fulls,width,height,name){
	var url_value=url+id;
	nopen=window.open(url_value,name,'scrollbars='+scr+',status='+sta+',resizable='+res+',fullscreen='+fulls+',width='+width+',height='+height+',left=0,top=0');
}

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 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, dom) { 
	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
} 

// ¹°¶§Á¶È¸
function channelwater(){ 
	window.open('http://www.anmyondo.com/services/tide.aspx','tide','height=500, width=500,scrollbars=yes');
} 

 function hidestatus() {
	window.status=''
	return true
 }
	
function previewset(str) { 
	var text;
	text ='<table align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="" style="font-size:9pt; border-width:0; border-color:black; border-style:solid; word-break:break-all;">';
	text += '<tr><td align=center><img src="'+str+'"></td></tr></table>';
 	preview.innerHTML=text;
}

function previewposit(wid, hei) { 
	preview.style.posLeft = event.x - wid + document.body.scrollLeft;
	preview.style.posTop = event.y - hei + document.body.scrollTop;
}

function previewhide() { 
	preview.innerHTML='';
}

function msgposit_list2(wid, hei) { 
	thumbnail_list.style.posLeft = event.x - wid + document.body.scrollLeft;
	thumbnail_list.style.posTop = event.y - hei + document.body.scrollTop;	
} 

function msgset_list2(str,str2) { 
	var text 
	text ='<table align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="" style="font-size:9pt; border-width:0; border-color:black; border-style:solid; word-break:break-all;">'
	text += '<tr><td align=center>'+str+'</td><td>'+str2+'</td></tr></table>'
	thumbnail_list.innerHTML=text 
} 

function msghide_list2() { 
	thumbnail_list.innerHTML='' 
}

function image_viewer_thumb(board_id) {
	var img_name = document.all.img_name.value;
	window.open('./execute/image_viewer_bthumb.asp?id='+board_id+'&img='+ img_name, 'thumb', 'width=800, height=600');	
}

function image_viewer_org(board_id) {
	var img_name = document.all.img_name.value;
	window.open('./execute/image_viewer_org.asp?id='+board_id+'&img='+ img_name, 'thumb');	
}	

function image_viewer_org2(board_id) {
	var img_name = document.all.img_name.value;
	window.open('./execute/image_viewer_org2.asp?id='+board_id+'&img='+ img_name, 'thumb', 'width=800, height=600');	
}	

// »ç¿ë¹ý -- onkeypress="num_check()" onkeyup="this.value=FormatNumber3(this.value)" --//
function num_check() {  // ie¿¡¼­¸¸ ÀÛµ¿
      var keyCode = event.keyCode
      if (keyCode < 48 || keyCode > 57) {
        alert("¹®ÀÚ´Â »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù."+"["+keyCode+"]");
        event.returnValue=false;
      }
}	

function FormatNumber2(num) {
      fl=""
      if(isNaN(num)) { alert("¹®ÀÚ´Â »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.");return 0}
      if(num==0) return num
      
      if(num<0){ 
              num=num*(-1)
              fl="-"
      } else {
              num=num*1 //Ã³À½ ÀÔ·Â°ªÀÌ 0ºÎÅÍ ½ÃÀÛÇÒ¶§ ÀÌ°ÍÀ» Á¦°ÅÇÑ´Ù.
      }
      num = new String(num)
      temp=""
      co=3
      num_len=num.length
      while (num_len>0) {
        num_len=num_len-co
        if(num_len<0){co=num_len+co;num_len=0}
        temp=","+num.substr(num_len,co)+temp
      }
      return fl+temp.substr(1)
}

function FormatNumber3(num) {
    num=new String(num)
    num=num.replace(/,/gi,"")
    return FormatNumber2(num)
}	

function boardResize(height_) {
	document.getElementById('rzBoard').style.height=height_;
}
//-->