function su_check(checkform){
	var str1=checkform.value;
	for(var i=0; i < str1.length; i++) {
		
		if(str1.charAt(i) < '0' || str1.charAt(i) > '9') {
			if(str1.charAt(i)=='.' || str1.charAt(i)==',' || str1.charAt(i)=='-' ){

			}else{
				alert("¼ýÀÚ¸¸ ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù.");
				checkform.value="" ;
				checkform.focus() ;
				return false ;
			}
		}
	}
}

function clearField(field){
	if (field.value == field.defaultValue) {
		field.value = '';
	}
}

function checkField(field){ 
	if (field.value == '') {
		field.value = field.defaultValue;
	}
}


function doResize()
{ 
  document.all("myframe").height = myframe.document.body.scrollHeight+5; 
  document.all("myframe").width = myframe.document.body.scrollWidth; 
} 

function doResize1() 
{ 
  document.all("myframe1").height = myframe.document.body.scrollHeight+5; 
  document.all("myframe1").width = myframe.document.body.scrollWidth; 
} 


    function go(the)
	{
      if(the != "") window.open("http://" + the,"_blank")
      else retuen;
	}



function H_ImageSize(pic0) {
	pic = new Image();
	pic.src=pic0;
	eval(pic).height;
	eval(pic).width; 

	return eval(pic).height;
}

function W_ImageSize(pic0) {
	pic = new Image();
	pic.src=pic0;
	eval(pic).height;
	eval(pic).width; 

	return eval(pic).width;
}



//»çÁø ¹Ì¸® º¸¿©ÁÖ±â ////
var ImageOne = new Image();
function ChangeImage(objImg,showPic) {

//    myheight = 108;
//	mywidth  = 158;

    myheight = 90;
	mywidth  = 120;

	
	if(objImg.value.length > 1) {
		ImageOne.src = objImg.value;
			var f = objImg.value;

			if (f != "") {
					var r=f.match(/\.[^\.]*$/);
					if (r != ".jpg" && r != ".gif" && r != ".JPG" && r != ".GIF" && r != ".bmp" && r != ".BMP" && r != ".png" && r != ".PNG" )
					{
						alert("»çÁø¸¸ ¿Ã·ÁÁÖ¼¼¿ä");
						
					  return false;
					}
				} 


		document.all(showPic).src = ImageOne.src;

    }		
		
}

///////////////  »çÁø ¹Ì¸®º¸¿©ÁÖ±â ³¡ /////////////////////




////////////////////    ¾÷·Îµå½Ã º¸¿©ÁÜ Ã¢À» º¸¿©ÁÜ ÀÏ¹Ý..  ÆíÁý±â////////////////////////////
function send(myfile,myaction,myurl){
	strAppVersion = navigator.appVersion; 

			if (document.all(myfile).value != "") {
				if (strAppVersion.indexOf('MSIE')!=-1 && 
					strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) { 

					winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes"; 
					window.showModelessDialog(myurl + "/Progress/show_progress.asp?nav=ie", null, winstyle); 
				} 
				else { 
					winpos = "left=" + ((window.screen.width-380)/2)+",top=" +
								 ((window.screen.height-110)/2); 
					winstyle = "width=380,height=110,status=no,toolbar=no,menubar=no," + 
								 "location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos; 
					window.open(myurl + "/Progress/show_progress.asp?nav=ns",null,winstyle);				
				} 
		        
				//mySlen = document.upform.my_file.value.length()
				//alert(mySlen)
          } 
    document.upform.action = myaction;
	document.upform.submit();

}
///////////////////////////////////////


////////////////////    ¾÷·Îµå½Ã º¸¿©ÁÜ Ã¢À» º¸¿©ÁÜ HTML  ÆíÁý±â////////////////////////////
function nofile_send(myaction){

	    strAppVersion = navigator.appVersion; 
        document.all.editBox.editmode = "html";  //³»¿ëÀ» text·Î ¹Ù²Ù°í 
        content = document.all.editBox.text;
	    document.all.editBox.editmode = "text";  //³»¿ëÀ» html·Î ¹Ù²Ù°í
	    document.upform.Content.value = document.all.editBox.text;  //¸ÖÆ¼Å¸ÀÔÀ¸·Î ÀÐ°Ô ¸¸µçµÚ
		document.upform.action = myaction;

		document.upform.submit();

}
///////////////////////////////////////


function Html_send(myfile,myaction,myurl){

	strAppVersion = navigator.appVersion; 

			if (document.all(myfile).value != "") {
				if (strAppVersion.indexOf('MSIE')!=-1 && 
					strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) { 

					winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes"; 
					window.showModelessDialog(myurl + "/Progress/show_progress.asp?nav=ie", null, winstyle); 
				} 
				else { 
					winpos = "left=" + ((window.screen.width-380)/2)+",top=" +
								 ((window.screen.height-110)/2); 
					winstyle = "width=380,height=110,status=no,toolbar=no,menubar=no," + 
								 "location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos; 
					window.open(myurl + "/Progress/show_progress.asp?nav=ns",null,winstyle);				
				} 
		        
				//mySlen = document.upform.my_file.value.length()
				//alert(mySlen)
          } 
        document.all.editBox.editmode = "html";  //³»¿ëÀ» text·Î ¹Ù²Ù°í 
        content = document.all.editBox.text;
	    document.all.editBox.editmode = "text";  //³»¿ëÀ» html·Î ¹Ù²Ù°í
	    document.upform.Content.value = document.all.editBox.text;  //¸ÖÆ¼Å¸ÀÔÀ¸·Î ÀÐ°Ô ¸¸µçµÚ
		document.upform.action = myaction;

		document.upform.submit();

}
///////////////////////////////////////

   

////////////////////    ¾÷·Îµå½Ã º¸¿©ÁÜ Ã¢À» º¸¿©ÁÜ HTML  2°³ ÆÄÀÏ µ¿½Ã ÆíÁý±â////////////////////////////
function Html2send(myfile1,myfile2,myaction,myurl){
	strAppVersion = navigator.appVersion; 

			if (document.all(myfile1).value != "") {
				if (strAppVersion.indexOf('MSIE')!=-1 && 
					strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) { 

					winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes"; 
					window.showModelessDialog(myurl + "/Progress/show_progress.asp?nav=ie", null, winstyle); 
				} 
				else { 
					winpos = "left=" + ((window.screen.width-380)/2)+",top=" +
								 ((window.screen.height-110)/2); 
					winstyle = "width=380,height=110,status=no,toolbar=no,menubar=no," + 
								 "location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos; 
					window.open(myurl + "/Progress/show_progress.asp?nav=ns",null,winstyle);				
				} 
		        
				//mySlen = document.upform.my_file.value.length()
				//alert(mySlen)
          } 

			if (document.all(myfile2).value != "") {
				if (strAppVersion.indexOf('MSIE')!=-1 && 
					strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) { 

					winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes"; 
					window.showModelessDialog(myurl + "/Progress/show_progress.asp?nav=ie", null, winstyle); 
				} 
				else { 
					winpos = "left=" + ((window.screen.width-380)/2)+",top=" +
								 ((window.screen.height-110)/2); 
					winstyle = "width=380,height=110,status=no,toolbar=no,menubar=no," + 
								 "location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos; 
					window.open(myurl + "/Progress/show_progress.asp?nav=ns",null,winstyle);				
				} 
		        
				//mySlen = document.upform.my_file.value.length()
				//alert(mySlen)
          } 


		document.all.editBox.editmode = "html";  //³»¿ëÀ» text·Î ¹Ù²Ù°í 

//        content = document.all.editBox.text;
		document.all.editBox.editmode = "html";  //³»¿ëÀ» text·Î ¹Ù²Ù°í 
	    document.all.editBox.editmode = "text";  //³»¿ëÀ» html·Î ¹Ù²Ù°í
	    document.upform.Content.value = document.all.editBox.text;  //¸ÖÆ¼Å¸ÀÔÀ¸·Î ÀÐ°Ô ¸¸µçµÚ
		document.upform.action = myaction;
		document.upform.submit();

}
///////////////////////////////////////
function isNumeric( inStr ) 
{
	if (inStr.length > 0) 
	{ 
		for (i=0; i < inStr.length; i++) {
		
			if (!(inStr.charAt(i) >= '0' && inStr.charAt(i) <= '9'))  {
			return false;
		
			}
		}
		return true;
		}
	else { return false; }		    
}


function su_check(checkform){
	var str1=checkform.value;
	for(var i=0; i < str1.length; i++) {
		
		if(str1.charAt(i) < '0' || str1.charAt(i) > '9') {
			if(str1.charAt(i)=='.' || str1.charAt(i)==',' || str1.charAt(i)=='-' ){

			}else{
				alert("¼ýÀÚ¸¸ ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù.");
				checkform.value="" ;
				checkform.focus() ;
				return false ;
			}
		}
	}
}


function CheckStrLength(the,maxrow,maxchar)
{

 var temp;
 var f = the.value.length;
 var msglen = maxchar; //ÃÖ´ë ±æÀÌ
 var tmpstr = "";
 var enter = 0;
 var strlen;

 if(f == 0);
 else
 {
  for(k=0;k<f;k++)
  {
   temp = the.value.charAt(k);
   
   if(temp == '\n')
   {
    enter++;
   }

   if(escape(temp).length > maxrow)
    msglen -= 2;
   else
    msglen--;


   if(msglen < 0)
   {
    alert("ÃÑ ¿µ¹® " + maxchar + "ÀÚ ÇÑ±Û " + (maxchar/2) + "ÀÚ ±îÁö ¾²½Ç ¼ö ÀÖ½À´Ï´Ù.");
    the.value = tmpstr;
    break;
   }
   else if(enter > (maxrow-1) )
   {
    alert("¶óÀÎ¼ö " + maxrow + "¶óÀÎÀ» ³ÑÀ»¼ö ¾ø½À´Ï´Ù.");
    enter = 0;
    strlen = tmpstr.length - 1;
    //alert(strlen);
    the.value = tmpstr.substring(0,strlen);
    break;
   }
   else
   {

    tmpstr += temp;
   }
  }
 }
}





function clearField(field){
	if (field.value == field.defaultValue) {
		field.value = '';
	}
}

function checkField(field){ 
	if (field.value == '') {
		field.value = field.defaultValue;
	}
}


function doResize() 
{ 
  document.all("myframe").height = myframe.document.body.scrollHeight+5; 
  document.all("myframe").width = myframe.document.body.scrollWidth; 
} 



    function go(the)
	{
	  window.open("http://" + the,"_blank");
	}



function H_ImageSize(pic0) {
	pic = new Image();
	pic.src=pic0;
	eval(pic).height;
	eval(pic).width; 

	return eval(pic).height;
}

function W_ImageSize(pic0) {
	pic = new Image();
	pic.src=pic0;
	eval(pic).height;
	eval(pic).width; 

	return eval(pic).width;
}



//»çÁø ¹Ì¸® º¸¿©ÁÖ±â ////
var ImageOne = new Image();
function ChangeImage(objImg,showPic) {

//    myheight = 108;
//	mywidth  = 158;

    myheight = 90;
	mywidth  = 120;

	
	if(objImg.value.length > 1) {
		ImageOne.src = objImg.value;
			var f = objImg.value;

			if (f != "") {
					var r=f.match(/\.[^\.]*$/);
					if (r != ".jpg" && r != ".gif" && r != ".JPG" && r != ".GIF" && r != ".bmp" && r != ".BMP"  && r != ".png" && r != ".PNG")
					{
						alert("»çÁø¸¸ ¿Ã·ÁÁÖ¼¼¿ä");
						
					  return false;
					}
				} 


		document.all(showPic).src = ImageOne.src;

    }		
		
}

///////////////  »çÁø ¹Ì¸®º¸¿©ÁÖ±â ³¡ /////////////////////




////////////////////    ¾÷·Îµå½Ã º¸¿©ÁÜ Ã¢À» º¸¿©ÁÜ ÀÏ¹Ý..  ÆíÁý±â////////////////////////////
function send(myfile,myaction,myurl){
	strAppVersion = navigator.appVersion; 

			if (document.all(myfile).value != "") {
				if (strAppVersion.indexOf('MSIE')!=-1 && 
					strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) { 

					winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes"; 
					window.showModelessDialog(myurl + "/Progress/show_progress.asp?nav=ie", null, winstyle); 
				} 
				else { 
					winpos = "left=" + ((window.screen.width-380)/2)+",top=" +
								 ((window.screen.height-110)/2); 
					winstyle = "width=380,height=110,status=no,toolbar=no,menubar=no," + 
								 "location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos; 
					window.open(myurl + "/Progress/show_progress.asp?nav=ns",null,winstyle);				
				} 
		        
				//mySlen = document.upform.my_file.value.length()
				//alert(mySlen)
          } 
    document.upform.action = myaction;
	document.upform.submit();

}
///////////////////////////////////////


////////////////////    ¾÷·Îµå½Ã º¸¿©ÁÜ Ã¢À» º¸¿©ÁÜ HTML  ÆíÁý±â////////////////////////////
function nofile_send(myaction){

	    strAppVersion = navigator.appVersion; 
        document.all.editBox.editmode = "html";  //³»¿ëÀ» text·Î ¹Ù²Ù°í 
        content = document.all.editBox.text;
	    document.all.editBox.editmode = "text";  //³»¿ëÀ» html·Î ¹Ù²Ù°í
	    document.upform.Content.value = document.all.editBox.text;  //¸ÖÆ¼Å¸ÀÔÀ¸·Î ÀÐ°Ô ¸¸µçµÚ
		document.upform.action = myaction;

		document.upform.submit();

}
///////////////////////////////////////


function Html_send(myfile,myaction,myurl){

	strAppVersion = navigator.appVersion; 

			if (document.all(myfile).value != "") {
				if (strAppVersion.indexOf('MSIE')!=-1 && 
					strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) { 

					winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes"; 
					window.showModelessDialog(myurl + "/Progress/show_progress.asp?nav=ie", null, winstyle); 
				} 
				else { 
					winpos = "left=" + ((window.screen.width-380)/2)+",top=" +
								 ((window.screen.height-110)/2); 
					winstyle = "width=380,height=110,status=no,toolbar=no,menubar=no," + 
								 "location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos; 
					window.open(myurl + "/Progress/show_progress.asp?nav=ns",null,winstyle);				
				} 
		        
				//mySlen = document.upform.my_file.value.length()
				//alert(mySlen)
          } 
        document.all.editBox.editmode = "html";  //³»¿ëÀ» text·Î ¹Ù²Ù°í 
        content = document.all.editBox.text;
	    document.all.editBox.editmode = "text";  //³»¿ëÀ» html·Î ¹Ù²Ù°í
	    document.upform.Content.value = document.all.editBox.text;  //¸ÖÆ¼Å¸ÀÔÀ¸·Î ÀÐ°Ô ¸¸µçµÚ
		document.upform.action = myaction;

		document.upform.submit();

}
///////////////////////////////////////

   

////////////////////    ¾÷·Îµå½Ã º¸¿©ÁÜ Ã¢À» º¸¿©ÁÜ HTML  2°³ ÆÄÀÏ µ¿½Ã ÆíÁý±â////////////////////////////
function Html2send(myfile1,myfile2,myaction,myurl){
	strAppVersion = navigator.appVersion; 

			if (document.all(myfile1).value != "") {
				if (strAppVersion.indexOf('MSIE')!=-1 && 
					strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) { 

					winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes"; 
					window.showModelessDialog(myurl + "/Progress/show_progress.asp?nav=ie", null, winstyle); 
				} 
				else { 
					winpos = "left=" + ((window.screen.width-380)/2)+",top=" +
								 ((window.screen.height-110)/2); 
					winstyle = "width=380,height=110,status=no,toolbar=no,menubar=no," + 
								 "location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos; 
					window.open(myurl + "/Progress/show_progress.asp?nav=ns",null,winstyle);				
				} 
		        
				//mySlen = document.upform.my_file.value.length()
				//alert(mySlen)
          } 

			if (document.all(myfile2).value != "") {
				if (strAppVersion.indexOf('MSIE')!=-1 && 
					strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) { 

					winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes"; 
					window.showModelessDialog(myurl + "/Progress/show_progress.asp?nav=ie", null, winstyle); 
				} 
				else { 
					winpos = "left=" + ((window.screen.width-380)/2)+",top=" +
								 ((window.screen.height-110)/2); 
					winstyle = "width=380,height=110,status=no,toolbar=no,menubar=no," + 
								 "location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos; 
					window.open(myurl + "/Progress/show_progress.asp?nav=ns",null,winstyle);				
				} 
		        
				//mySlen = document.upform.my_file.value.length()
				//alert(mySlen)
          } 


		document.all.editBox.editmode = "html";  //³»¿ëÀ» text·Î ¹Ù²Ù°í 

//        content = document.all.editBox.text;
		document.all.editBox.editmode = "html";  //³»¿ëÀ» text·Î ¹Ù²Ù°í 
	    document.all.editBox.editmode = "text";  //³»¿ëÀ» html·Î ¹Ù²Ù°í
	    document.upform.Content.value = document.all.editBox.text;  //¸ÖÆ¼Å¸ÀÔÀ¸·Î ÀÐ°Ô ¸¸µçµÚ
		document.upform.action = myaction;
		document.upform.submit();

}
///////////////////////////////////////
function isNumeric( inStr ) 
{
	if (inStr.length > 0) 
	{ 
		for (i=0; i < inStr.length; i++) {
		
			if (!(inStr.charAt(i) >= '0' && inStr.charAt(i) <= '9'))  {
			return false;
		
			}
		}
		return true;
		}
	else { return false; }		    
}



// µÕ±Ù Å×ÀÌºí ¸¸µé±â
function roundTable(objID) {
   var obj = document.getElementById(objID);
   var Parent, objTmp, Table, TBody, TR, TD;
   var bdcolor, bgcolor, Space;
   var trIDX, tdIDX, MAX;
   var styleWidth, styleHeight;

   Parent = obj.parentNode;
   objTmp = document.createElement('SPAN');
   Parent.insertBefore(objTmp, obj);
   Parent.removeChild(obj);

   bdcolor = obj.getAttribute('rborder');
   bgcolor = obj.getAttribute('rbgcolor');
   radius = parseInt(obj.getAttribute('radius'));
   if (radius == null || radius < 1) radius = 1;
   else if (radius > 6) radius = 6;

   MAX = radius * 2 + 1;

   Table = document.createElement('TABLE');
   TBody = document.createElement('TBODY');

   Table.cellSpacing = 0;
   Table.cellPadding = 0;

   for (trIDX=0; trIDX < MAX; trIDX++) {
          TR = document.createElement('TR');
          Space = Math.abs(trIDX - parseInt(radius));
          for (tdIDX=0; tdIDX < MAX; tdIDX++) {
                 TD = document.createElement('TD');
                 
                 styleWidth = '1px'; styleHeight = '1px';
                 if (tdIDX == 0 || tdIDX == MAX - 1) styleHeight = null;
                 else if (trIDX == 0 || trIDX == MAX - 1) styleWidth = null;
                 else if (radius > 2) {
                        if (Math.abs(tdIDX - radius) == 1) styleWidth = '2px';
                        if (Math.abs(trIDX - radius) == 1) styleHeight = '2px';
                 }

                 if (styleWidth != null) TD.style.width = styleWidth;
                 if (styleHeight != null) TD.style.height = styleHeight;

                 if (Space == tdIDX || Space == MAX - tdIDX - 1) TD.style.backgroundColor = bdcolor;
                 else if (tdIDX > Space && Space < MAX - tdIDX - 1)  TD.style.backgroundColor = bgcolor;
                 
                 if (Space == 0 && tdIDX == radius) TD.appendChild(obj);
                 TR.appendChild(TD);
          }
          TBody.appendChild(TR);
   }
   Table.appendChild(TBody);
   Parent.insertBefore(Table, objTmp);
}



