	function ttotal_copy()
	{
		tot1 = Math.round(document.frm.tsupply1.value);
		tot2 = Math.round(document.frm.tsupply2.value);
		tot3 = Math.round(document.frm.tsupply3.value);
		tot4 = Math.round(document.frm.tsupply4.value);
		tot5 = Math.round(document.frm.tsupply5.value);
		tot6 = Math.round(document.frm.tsupply6.value);
		tot7 = Math.round(document.frm.tsupply7.value);

		document.frm.total_price.value = tot1 + tot2 + tot3 + tot4 + tot5 + tot6 + tot7;
		tot_all = document.frm.total_price.value;
		len = tot_all.length;
		document.frm.il.value = tot_all.substring(len-1,len);
		document.frm.sip.value = tot_all.substring(len-2,len-1);
		document.frm.bak.value = tot_all.substring(len-3,len-2);
		document.frm.cheon.value = tot_all.substring(len-4,len-3);
		document.frm.tenthou.value = tot_all.substring(len-5,len-4);
		document.frm.grant.value = tot_all.substring(len-6,len-5);
		document.frm.hund.value = tot_all.substring(len-7,len-6);
		document.frm.thou.value = tot_all.substring(len-8,len-7);
		document.frm.yeok.value = tot_all.substring(len-9,len-8);

		tax1 = Math.round(document.frm.ttax1.value);
		tax2 = Math.round(document.frm.ttax2.value);
		tax3 = Math.round(document.frm.ttax3.value);
		tax4 = Math.round(document.frm.ttax4.value);
		tax5 = Math.round(document.frm.ttax5.value);
		tax6 = Math.round(document.frm.ttax6.value);
		tax7 = Math.round(document.frm.ttax7.value);

		document.frm.str.value = tax1 + tax2 + tax3 + tax4 + tax5 + tax6 + tax7;
		tax_all = document.frm.str.value;
		lensize = tax_all.length;
		//document.frm.til.value = len_size;
		document.frm.til.value = tax_all.substring(lensize-1,lensize);
		document.frm.tsip.value = tax_all.substring(lensize-2,lensize-1);
		document.frm.tbak.value = tax_all.substring(lensize-3,lensize-2);
		document.frm.tcheon.value = tax_all.substring(lensize-4,lensize-3);
		document.frm.ttenthou.value = tax_all.substring(lensize-5,lensize-4);
		document.frm.tgrant.value = tax_all.substring(lensize-6,lensize-5);
		document.frm.thund.value = tax_all.substring(lensize-7,lensize-6);
		document.frm.tyeok.value = tax_all.substring(lensize-8,lensize-7);

	}
	function tprice1_copy() 
	{
		aprice = Math.round(document.frm.tprice1.value);
		acnt = Math.round(document.frm.tcnt1.value);
		apay = document.frm.tsupply1.value = aprice * acnt;

		document.frm.ttax1.value = apay * 0.1;
	}
	function tprice2_copy() 
	{
		aprice2 = Math.round(document.frm.tprice2.value);
		acnt2 = Math.round(document.frm.tcnt2.value);
		apay2 = document.frm.tsupply2.value = aprice2 * acnt2;

		document.frm.ttax2.value = apay2 * 0.1;
	}
	function tprice3_copy() 
	{
		aprice3 = Math.round(document.frm.tprice3.value);
		acnt3 = Math.round(document.frm.tcnt3.value);
		apay3 = document.frm.tsupply3.value = aprice3 * acnt3;

		document.frm.ttax3.value = apay3 * 0.1;
	}
	function tprice4_copy() 
	{
		aprice4 = Math.round(document.frm.tprice4.value);
		acnt4 = Math.round(document.frm.tcnt4.value);
		apay4 = document.frm.tsupply4.value = aprice4 * acnt4;

		document.frm.ttax4.value = apay4 * 0.1;
	}
	function tprice5_copy() 
	{
		aprice5 = Math.round(document.frm.tprice5.value);
		acnt5 = Math.round(document.frm.tcnt5.value);
		apay5 = document.frm.tsupply5.value = aprice5 * acnt5;

		document.frm.ttax5.value = apay5 * 0.1;
	}
	function tprice6_copy() 
	{
		aprice6 = Math.round(document.frm.tprice6.value);
		acnt6 = Math.round(document.frm.tcnt6.value);
		apay6 = document.frm.tsupply6.value = aprice6 * acnt6;

		document.frm.ttax6.value = apay6 * 0.1;
	}
	function tprice7_copy() 
	{
		aprice7 = Math.round(document.frm.tprice7.value);
		acnt7 = Math.round(document.frm.tcnt7.value);
		apay7 = document.frm.tsupply7.value = aprice7 * acnt7;

		document.frm.ttax7.value = apay7 * 0.1;
	}

	function insday1()
	{
		calendar = new Date();
		month = calendar.getMonth() + 1;
		if( month < 10 )
			month = "0"+month;

		day = calendar.getDate();
		if( day < 10 )
			day = "0"+day;

		document.frm.tmonth1.value = month;
		document.frm.tday1.value = day;
	}
	function insday2()
	{
		calendar = new Date();
		month = calendar.getMonth() + 1;
		if( month < 10 )
			month = "0"+month;

		day = calendar.getDate();
		if( day < 10 )
			day = "0"+day;

		document.frm.tmonth2.value = month;
		document.frm.tday2.value = day;
	}
	function insday3()
	{
		calendar = new Date();
		month = calendar.getMonth() + 1;
		if( month < 10 )
			month = "0"+month;

		day = calendar.getDate();
		if( day < 10 )
			day = "0"+day;

		document.frm.tmonth3.value = month;
		document.frm.tday3.value = day;
	}
	function insday4()
	{
		calendar = new Date();
		month = calendar.getMonth() + 1;
		if( month < 10 )
			month = "0"+month;

		day = calendar.getDate();
		if( day < 10 )
			day = "0"+day;

		document.frm.tmonth4.value = month;
		document.frm.tday4.value = day;
	}
	function insday5()
	{
		calendar = new Date();
		month = calendar.getMonth() + 1;
		if( month < 10 )
			month = "0"+month;

		day = calendar.getDate();
		if( day < 10 )
			day = "0"+day;

		document.frm.tmonth5.value = month;
		document.frm.tday5.value = day;
	}
	function insday6()
	{
		calendar = new Date();
		month = calendar.getMonth() + 1;
		if( month < 10 )
			month = "0"+month;

		day = calendar.getDate();
		if( day < 10 )
			day = "0"+day;

		document.frm.tmonth6.value = month;
		document.frm.tday6.value = day;
	}
	function insday7()
	{
		calendar = new Date();
		month = calendar.getMonth() + 1;
		if( month < 10 )
			month = "0"+month;

		day = calendar.getDate();
		if( day < 10 )
			day = "0"+day;

		document.frm.tmonth7.value = month;
		document.frm.tday7.value = day;
	}
function IsNumber(formname) {
     var form=eval("document.frm." + formname);

     for(var i=0; i < form.value.length; i++) {
         var chr = form.value.substr(i,1);
         if((chr < '0' || chr > '9')) {
            return false;
         }
     }
     return true;
  }
function tax_form()
{
	var frm = document.frm;
	if( !frm.tsubject1.value )
	{
		alert("Ç°¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		frm.tsubject1.focus();
		return false;
	}
	if( !frm.tsize1.value )
	{
		alert("±Ô°ÝÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		frm.tsize1.focus();
		return false;
	}
	if( !frm.tcnt1.value )
	{
		alert("¼ö·®À» ÀÔ·ÂÇÏ¼¼¿ä");
		frm.tcnt1.focus();
		return false;
	}
	if( frm.tcnt1.value )
	{
		if( !IsNumber(frm.tcnt1.name ))
		{
			alert("¼ö·®À» ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù");
			frm.tcnt1.focus();
			return false;
		}
	}
	if( !frm.tprice1.value )
	{
		alert("´Ü°¡¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		frm.tprice1.focus();
		return false;
	}
	if( frm.tprice1.value )
	{
		if( !IsNumber(frm.tprice1.name ))
		{
			alert("´Ü°¡´Â ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù");
			frm.tprice1.focus();
			return false;
		}
	}
	frm.action="taxform.php?mode=cnt&action=taxdo";
	frm.submit();
}

//////////////////////////////////////////////////////////////////iframe size controll!!
	function iframe_autoresize(arg) { arg.height = eval(arg.name+".document.body.scrollHeight"); }

function _OpenTax(ref)
{
	window.open(ref,"OpenTax",'width=640,height=200,status=no,scrollbars=yes');
}

