StartSmartUpdate();

function pause(numberMillis) {
    var now = new Date();
    var exitTime = now.getTime() + numberMillis;
    while (true) {
         now = new Date();
         if (now.getTime() > exitTime)
             return;
    }
}

function payGate_S()
{
        var r_tel1 = document.getElementById("recv_tell1").value+"-"+document.getElementById("recv_tell2").value+"-"+document.getElementById("recv_tell3").value;
        var r_tel2 = document.getElementById("recv_cell1").value+"-"+document.getElementById("recv_cell2").value+"-"+document.getElementById("recv_cell3").value;
        var r_zipx = document.getElementById("recv_zip1").value+"-"+document.getElementById("recv_zip2").value;
        var r_add2 = document.getElementById("recv_addr2").value;
        var r_name = document.getElementById("recv_name").value;
        var r_msg  = document.getElementById("recv_msg").value;
	var r_zcode= document.getElementById("recv_zcode").value;

        var url = "./xml/set_order.php";
        var pars= "postseq="+r_zipx+"&address="+r_add2+"&comments="+r_msg+"&p_name="+r_name+"&p_htel="+r_tel1+"&p_ctel="+r_tel2+"&r_zcode="+r_zcode;
        var goodsAjax = new Ajax.Request(
                        url, {
                        method: 'post',
                        parameters: pars,
                        onFailure: showFail }
                        );

}

function cartConfirm(mcd)
{
	var url = "./xml/set_cart_confirm.php";
	var pars = "mcode="+mcd+"&o_mode="+document.getElementById("o_mode").value;
	var goodsAjax = new Ajax.Request(
			url, {
			method: 'post',
			parameters: pars,
			onFailure: showFail }
			);
}

function e_userLogin(mcd)
{
	if(mcd!='0000') {
		//userLogin();

		if(parseInt(document.getElementById('login_form').style.width)==900) open_div2('login_form','0','295','105','960',1);
		else open_div2('login_form','900','295','105','120',0.3);document.getElementById('m_id').focus();
	}
}

function usePoint(curpoint,goodsprice,addprice,deliprice)
{
	//alert(goodsprice+" "+addprice+" "+deliprice);
	//document.all.o_point.value = 0;
	document.getElementById('o_point').value = 0;
	//var sspoint = document.all.salepoint.value;
	var sspoint = document.getElementById('salepoint').value;
	var len = sspoint.length;
	var li_p = sspoint.substring( len-2, len );

	if( li_p > 0 ) {
		alert("100´ÜÀ§¸¸ ÀÔ·ÂÇÒ¼ö ÀÖ½À´Ï´Ù.");
		return;
	}

	if( parseInt(curpoint) < 20000) {
		alert("20,000Æ÷ÀÎÆ® ÀÌ»óºÎÅÍ »ç¿ëÇÒ¼ö ÀÖ½À´Ï´Ù.");
		return;
	}

	//if( parseInt(document.all.salepoint.value) > parseInt(curpoint) ) {
	if( parseInt(document.getElementById('salepoint').value) > parseInt(curpoint) ) {
		alert("Æ÷ÀÎÆ® ±Ý¾×ÀÌ ÃÊ°ú µÇ¾ú½À´Ï´Ù.");
		return;
	}

	//if( parseInt(document.all.salepoint.value) > parseInt(goodsprice) ) {
	if( parseInt(document.getElementById('salepoint').value) > parseInt(goodsprice) ) {
		alert("»óÇ° ±Ý¾×º¸´Ù Æ÷ÀÎÆ® »ç¿ë ±Ý¾×ÀÌ Å­´Ï´Ù.\n\nÃß°¡ ¹è¼Ûºñ´Â Æ÷ÀÎÆ®·Î °áÁ¦ ÇÒ ¼ö ¾ø½À´Ï´Ù.");
		return;
	}

	//if( parseInt(document.all.salepoint.value) > 0 && parseInt(document.all.salepoint.value) < 10000) {
	if( parseInt(document.getElementById('salepoint').value) > 0 && parseInt(document.getElementById('salepoint').value) < 10000) {
		alert("Æ÷ÀÎÆ®´Â 10,000Æ÷ÀÎÆ® ÀÌ»ó ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		return;
	}

	if( parseInt(document.all.salepoint.value) == 0) {
		//document.all.good_mny.value = parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice);
		//document.all.gdp.value = parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice);
		//document.all.o_point.value = parseInt(goodsprice);
		document.getElementById('good_mny').value = parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice);
		document.getElementById('gdp').value = parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice);
		document.getElementById('o_point').value = parseInt(goodsprice);
		alert("Æ÷ÀÎÆ® »ç¿ëÀÌ Ãë¼Ò µÇ¾ú½À´Ï´Ù.");
		return;
	}

	//document.all.gdp.value          = (parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice))-parseInt(document.all.salepoint.value);
	//document.all.o_price.value      = parseInt(document.all.realp.value) - parseInt(document.all.salepoint.value);
	//document.all.o_point.value      = document.all.salepoint.value;
	//document.all.o_delivery.value   = parseInt(addprice) + parseInt(deliprice);
	document.getElementById('gdp').value 	    = (parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice))-parseInt(document.getElementById('salepoint').value);
	document.getElementById('o_price').value    = parseInt(document.getElementById('realp').value) - parseInt(document.getElementById('salepoint').value);
	document.getElementById('o_point').value    = document.getElementById('salepoint').value;
	document.getElementById('o_delivery').value = parseInt(addprice) + parseInt(deliprice);

	//$("salpp").innerHtml = comma(parseInt(curpoint)-parseInt(document.all.salepoint.value));

	//if( parseInt(document.all.salepoint.value) >= 10000) {
	if( parseInt(document.getElementById('salepoint').value) >= 10000) {
		alert("Æ÷ÀÎÆ® "+comma(document.all.salepoint.value)+" »ç¿ëÇÕ´Ï´Ù.");
		return;
	}
}

function useCp(curpoint,goodsprice,addprice,deliprice)
{
	//alert(goodsprice+" "+addprice+" "+deliprice);
        //document.all.o_point.value = 0;
        document.getElementById('o_point').value = 0;
        //var sspoint = document.all.salepoint.value;
        var sspoint = document.getElementById('salepoint').value;
        var len = sspoint.length;
        var li_p = sspoint.substring( len-2, len );

        if( li_p > 0 ) {
                alert("100´ÜÀ§¸¸ ÀÔ·ÂÇÒ¼ö ÀÖ½À´Ï´Ù.");
                return;
        }

        if( parseInt(curpoint) < 20000) {
                alert("20,000Æ÷ÀÎÆ® ÀÌ»óºÎÅÍ »ç¿ëÇÒ¼ö ÀÖ½À´Ï´Ù.");
                return;
        }

        //if( parseInt(document.all.salepoint.value) > parseInt(curpoint) ) {
        if( parseInt(document.getElementById('salepoint').value) > parseInt(curpoint) ) {
                alert("Æ÷ÀÎÆ® ±Ý¾×ÀÌ ÃÊ°ú µÇ¾ú½À´Ï´Ù.");
                return;
        }

        //if( parseInt(document.all.salepoint.value) > parseInt(goodsprice) ) {
        if( parseInt(document.getElementById('salepoint').value) > parseInt(goodsprice) ) {
                alert("»óÇ° ±Ý¾×º¸´Ù Æ÷ÀÎÆ® »ç¿ë ±Ý¾×ÀÌ Å­´Ï´Ù.\n\nÃß°¡ ¹è¼Ûºñ´Â Æ÷ÀÎÆ®·Î °áÁ¦ ÇÒ ¼ö ¾ø½À´Ï´Ù.");
                return;
        }

        //if( parseInt(document.all.salepoint.value) > 0 && parseInt(document.all.salepoint.value) < 10000) {
        if( parseInt(document.getElementById('salepoint').value) > 0 && parseInt(document.getElementById('salepoint').value) < 10000) {
                alert("Æ÷ÀÎÆ®´Â 10,000Æ÷ÀÎÆ® ÀÌ»ó ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
                return;
        }

	if( parseInt(document.all.salepoint.value) == 0) {
		//document.all.good_mny.value = parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice);
		//document.all.gdp.value = parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice);
		//document.all.o_point.value = parseInt(goodsprice);
		document.getElementById('good_mny').value = parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice);
		document.getElementById('gdp').value = parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice);
		document.getElementById('o_point').value = parseInt(goodsprice);
		alert("Æ÷ÀÎÆ® »ç¿ëÀÌ Ãë¼Ò µÇ¾ú½À´Ï´Ù.");
		return;
	}

	//document.all.gdp.value          = (parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice))-parseInt(document.all.salepoint.value);
	//document.all.o_price.value      = parseInt(document.all.realp.value) - parseInt(document.all.salepoint.value);
	//document.all.o_point.value      = document.all.salepoint.value;
	//document.all.o_delivery.value   = parseInt(addprice) + parseInt(deliprice);
	document.getElementById('gdp').value            = (parseInt(goodsprice)+parseInt(addprice)+parseInt(deliprice))-parseInt(document.getElementById('salepoint').value);
	document.getElementById('o_price').value        = parseInt(document.getElementById('realp').value) - parseInt(document.getElementById('salepoint').value);
	document.getElementById('o_point').value        = document.getElementById('salepoint').value;
	document.getElementById('o_delivery').value     = parseInt(addprice) + parseInt(deliprice);

	//$("salpp").innerHtml = comma(parseInt(curpoint)-parseInt(document.all.salepoint.value));

}

function payGate()
{

	var f = document.all;
	var fg= document.order_info;

	//addAddress();
	document.order_info.good_name.value = document.all.gds.value;
	document.order_info.good_mny.value = document.all.gdp.value;


	if(document.getElementById("ordr_name").value=="") {
		alert("ÁÖ¹®ÀÚ ÀÌ¸§À» ³Ö¾îÁÖ¼¼¿ä");
		document.getElementById("ordr_name").focus();
		return;
	}

	if(document.getElementById("ordr_cell1").value=="" || document.getElementById("ordr_cell1").value=="00") {
		alert("È¸¿øÁ¤º¸¿¡¼­  ÈÞ´ëÆù ¹øÈ£¸¦ ³Ö¾îÁÖ¼¼¿ä");
		document.getElementById("ordr_cell1").focus();
		return;
	}
        if(document.getElementById("ordr_cell2").value=="" || document.getElementById("ordr_cell2").value=="0000") {
                alert("È¸¿øÁ¤º¸¿¡¼­ ÈÞ´ëÆù ¹øÈ£¸¦ ³Ö¾îÁÖ¼¼¿ä");
                document.getElementById("ordr_cell2").focus();
                return;
        }
        if(document.getElementById("ordr_cell3").value=="" || document.getElementById("ordr_cell3").value=="0000") {
                alert("È¸¿øÁ¤º¸¿¡¼­ ÈÞ´ëÆù ¹øÈ£¸¦ ³Ö¾îÁÖ¼¼¿ä");
                document.getElementById("ordr_cell3").focus();
                return;
        }
        if(document.getElementById("ordr_tell1").value=="" || document.getElementById("ordr_tell1").value=="00") {
                alert("È¸¿øÁ¤º¸¿¡¼­  ÀüÈ­¹øÈ£¸¦ ³Ö¾îÁÖ¼¼¿ä");
                document.getElementById("ordr_tell1").focus();
                return;
        }
        if(document.getElementById("ordr_tell2").value=="" || document.getElementById("ordr_tell2").value=="0000") {
                alert("È¸¿øÁ¤º¸¿¡¼­ ÀüÈ­¹øÈ£¸¦ ³Ö¾îÁÖ¼¼¿ä");
                document.getElementById("ordr_tell2").focus();
                return;
        }
        if(document.getElementById("ordr_tell3").value=="" || document.getElementById("ordr_tell3").value=="0000") {
                alert("È¸¿øÁ¤º¸¿¡¼­ ÀüÈ­¹øÈ£¸¦ ³Ö¾îÁÖ¼¼¿ä");
                document.getElementById("ordr_tell3").focus();
                return;
        }
	
	if(document.all.recv_name.value=="") {
		alert("¹Þ´Â»ç¶÷ ÀÌ¸§À» ³Ö¾îÁÖ¼¼¿ä");
		document.all.recv_name.focus();
		return;
	}

        if(document.all.recv_tell1.value=="" || document.all.recv_tell1.value=="00") {
                alert("¹Þ´Â»ç¶÷ ÀüÈ­¹øÈ£ ±¹¹øÀ» ³Ö¾îÁÖ¼¼¿ä");
                document.all.recv_tell1.focus();
                return;
        }
        if(document.all.recv_tell2.value=="" || document.all.recv_tell2.value=="0000") {
                alert("¹Þ´Â»ç¶÷ ÀüÈ­¹øÈ£¸¦ ³Ö¾îÁÖ¼¼¿ä");
                document.all.recv_tell2.focus();
                return;
        }
        if(document.all.recv_tell3.value=="" || document.all.recv_tell3.value=="0000") {
                alert("¹Þ´Â»ç¶÷ ÀüÈ­¹øÈ£¸¦ ³Ö¾îÁÖ¼¼¿ä");
                document.all.recv_tell3.focus();
                return;
        }
        if(document.all.recv_cell1.value=="" || document.all.recv_cell1.value=="00") {
                alert("ÈÞ´ëÆù ¹øÈ£¸¦ ³Ö¾îÁÖ¼¼¿ä");
                document.all.recv_cell1.focus();
                return;
        }
        if(document.all.recv_cell2.value=="" || document.all.recv_cell2.value=="0000") {
                alert("ÈÞ´ëÆù ¹øÈ£¸¦ ³Ö¾îÁÖ¼¼¿ä");
                document.all.recv_cell2.focus();
                return;
        }
        if(document.all.recv_cell3.value=="" || document.all.recv_cell3.value=="0000") {
                alert("ÈÞ´ëÆù ¹øÈ£¸¦ ³Ö¾îÁÖ¼¼¿ä");
                document.all.recv_cell3.focus();
                return;
        }

	if(document.all.recv_zip1.value=="") {
		alert("¿ìÆí¹øÈ£¸¦ °Ë»öÇØ¿© ÁÖ¼¼¿ä");
		return;
	}
	if(document.all.recv_zip2.value=="") {
		alert("¿ìÆí¹øÈ£¸¦ °Ë»öÇÏ¿© ÁÖ¼¼¿ä");
		return;
	}
	if(document.all.recv_addr1.value=="") {
		alert("¿ìÆí¹øÈ£¸¦ °Ë»öÇÏ¿© ÁÖ¼¼¿ä");
		return;	
	}
	if(document.all.recv_addr2.value=="") {
		alert("¹Þ´Â»ç¶÷ »ó¼¼ ÁÖ¼Ò¸¦ ³Ö¾îÁÖ¼¼¿ä");
		document.all.recv_addr2.focus();
		return;
	}

        if( parseInt(document.all.salepoint.value)>0 && document.all.o_point.value ==0 ) {
                alert("Æ÷ÀÎÆ® »ç¿ë ¹öÆ°À» Å¬¸¯ÇØ ÁÖ¼¼¿ä.");
                return;
        }

	var pm;
	var gn = document.all.good_name.value;
	var gm = document.all.good_mny.value;
	var bn = document.all.ordr_name.value;
	var bm = document.all.ordr_email.value;
	var bt1= document.all.ordr_tell1.value+"-"+document.all.ordr_tell2.value+"-"+document.all.ordr_tell3.value;
	var bt2= document.all.ordr_cell1.value+"-"+document.all.ordr_cell2.value+"-"+document.all.ordr_cell3.value;
	var o_gdcode = (document.all.o_gdcode.value=="")?"NULL" : document.all.o_gdcode.value;
	var o_size = (document.all.o_size.value=="")?"NULL" : document.all.o_size.value;
	var o_count= (document.all.o_count.value=="")?"NULL" : document.all.o_count.value;
	var o_price=parseInt(document.all.realp.value) - parseInt(document.all.salepoint.value) - parseInt(document.all.o_cpprice.value);

//alert(o_price+ " " +document.all.realp.value+ " " +document.all.salepoint.value+" "+gm+" "+document.all.good_mny.value+" "+document.all.o_cpprice.value);

	if( (document.all.salepoint.value=="0") || (document.all.salepoint.value=="")) var o_point=0;
	else var o_point=document.all.salepoint.value;

	if(document.all.o_delivery.value == "") var o_delivery=0;
	else var o_delivery=document.all.o_delivery.value;

	var bask_cntx = document.all.gdsu.value;
	var good_info = document.all.gdi.value;
	var recv_name = document.all.recv_name.value;
	var recv_tel1 = document.all.recv_tell1.value+"-"+document.all.recv_tell2.value+"-"+document.all.recv_tell3.value;
	var recv_tel2 = document.all.recv_cell1.value+"-"+document.all.recv_cell2.value+"-"+document.all.recv_cell3.value;
	var recv_mail = document.all.ordr_email.value;
	var recv_zipx = document.all.recv_zip1.value+"-"+document.all.recv_zip2.value;
	var recv_add1 = document.all.recv_addr1.value;
	var recv_add2 = document.all.recv_addr2.value;
	var o_cpnum="";
	var o_cpprice = document.all.o_cpprice.value;

	//Æ÷ÀÎÆ® °áÁ¦ÀÌ¸é °áÁ¦¹æ¹ý ¾øÀ½.
	if( (parseInt(gm) > 0) ) {
        	for(var i=0;i < document.all.pay_m.length;i++)
        	{
        	    if(document.all.pay_m[i].checked) {pm=document.all.pay_m[i].value;break;}
        	    }
        	    if(i == document.all.pay_m.length){
        	        alert("°áÁ¦¹æ¹ýÀ» ¼±ÅÃÇÏ¼¼¿ä.");
        	    return;
        	}
	}

	fg.pay_method.value 	= pm;
	fg.buyr_name.value 	= document.all.ordr_name.value;
	fg.buyr_mail.value	= recv_mail;
	fg.buyr_tel1.value	= document.all.ordr_tell1.value+"-"+document.all.ordr_tell2.value+"-"+document.all.ordr_tell3.value;
	fg.buyr_tel2.value	= document.all.ordr_cell1.value+"-"+document.all.ordr_cell2.value+"-"+document.all.ordr_cell3.value;
	fg.rcvr_name.value	= recv_name;
	fg.rcvr_tel1.value	= recv_tel1;
	fg.rcvr_tel2.value	= recv_tel2;
	fg.rcvr_mail.value	= recv_mail;
	fg.rcvr_zipx.value	= recv_zipx;
	fg.rcvr_add1.value	= recv_add1;
	fg.rcvr_add2.value	= recv_add2;


//alert('pm:'+pm+' gn:'+gn+' gm:'+gm+' bn:'+bn+' bm:'+bm);
	ordr__pay(pm, gn, gm, bn, bm, bt1, bt2, o_gdcode, o_size, o_count, o_price, o_point, o_delivery, bask_cntx, good_info, recv_name, recv_tel1, recv_tel2, recv_mail, recv_zipx, recv_add1, recv_add2, o_cpnum, o_cpprice)
}

// ÁÖ¹®¹øÈ£ »ý¼º ¿¹Á¦
function init_orderid()
{
	var today = new Date();
	var year  = today.getFullYear();
	var month = today.getMonth() + 1;
	var date  = today.getDate();
	var time  = today.getTime();
	if(parseInt(month) < 10)
	{
		month = "0" + month;
	}
	var order_idxx = year + "" + month + "" + date + "" + time;
	document.order_info.ordr_idxx.value = order_idxx;
	//centerWindow() ;
}
//
function ordr__pay(pm, gn, gm, bn, bm, bt1, bt2, o_gdcode, o_size, o_count, o_price, o_point, o_delivery, bask_cntx, good_info, rcvr_name, rcvr_tel1, rcvr_tel2, rcvr_mail, rcvr_zipx, rcvr_add1, rcvr_add2, o_cpnum, o_cpprice)
{

	onclick = function () { 
    		opener.focus(); 
	} 
	//payGate_S();

	init_orderid();
//alert('pm:'+pm+' gn:'+gn+' gm:'+gm+' bn:'+bn+' bm:'+bm+' bt1 :'+bt1+' bt2:'+bt2);
//alert('o_gdcode:'+o_gdcode+' o_size:'+o_size+' o_count:'+o_count+' o_price:'+o_price+' o+point:'+o_point+' o_del:'+o_delivery+' bask:'+bask_cntx);
//alert('g_info:'+good_info+' rname:'+rcvr_name+' r_tel:'+rcvr_tel1+' r_tel2:'+rcvr_tel2+' r_mail:'+rcvr_mail+' r_zipx:'+rcvr_zipx);
	if(o_price<0)
	{
		o_price=0;
	}
	form = 	document.order_info;
	document.order_info.pay_method.value		= pm;
	document.order_info.good_name.value		= gn;
	document.order_info.good_mny.value		= gm;
	document.order_info.buyr_name.value		= bn;
	document.order_info.buyr_mail.value		= bm;
	document.order_info.buyr_tel1.value		= bt1;
	document.order_info.buyr_tel2.value		= bt2;
	document.order_info.o_gdcode.value		= o_gdcode;
	document.order_info.o_size.value		= o_size;
	document.order_info.o_count.value		= o_count;
	document.order_info.o_price.value		= o_price;
	document.order_info.o_point.value		= o_point;
	document.order_info.o_delivery.value		= o_delivery;
	document.order_info.o_cpnum.value		= o_cpnum;
	document.order_info.o_cpprice.value		= o_cpprice;

        // »óÇ°±Ç»ç¿ë 50,000¿ø ÀÌ»óºÎ¼­ »ç¿ë °¡´É
        if( ((o_price+o_cpprice) < 50000) && (o_cpprice > 0) )
        {
                alert("ÃÑ ±¸¸Å ±Ý¾×50,000¿ø ÀÌ»ó ºÎÅÍ »ç¿ë °¡´ÉÇÕ´Ï´Ù.");
                return;
        }

	if(bask_cntx) document.order_info.bask_cntx.value	= bask_cntx;
	if(good_info) 
	{
		var good_info_temp = "";
		good_info_array1 = good_info.split("|");
		for(i=0;i<good_info_array1.length;i++)
		{
			tmp = good_info_array1.length - 1;
			if(i==tmp)
			{
				good_info_temp += good_info_array1[i];
			}
			else
			{
				good_info_temp += good_info_array1[i]+String.fromCharCode(30);
			}
		}

		good_info_array2 = good_info_temp.split("&");

		good_info_temp = "";

		for(i=0;i<good_info_array2.length;i++)
		{
			tmp = good_info_array2.length - 1;
			if(i==tmp)
			{
				good_info_temp += good_info_array2[i];
			}
			else
			{
				good_info_temp += good_info_array2[i]+String.fromCharCode(31);
			}
		}
		document.order_info.good_info.value = good_info_temp;
	}

	if(rcvr_name) document.order_info.rcvr_name.value	= rcvr_name;
	if(rcvr_tel1) document.order_info.rcvr_tel1.value	= rcvr_tel1;
	if(rcvr_tel2) document.order_info.rcvr_tel2.value	= rcvr_tel2;
	if(rcvr_mail) document.order_info.rcvr_mail.value	= rcvr_mail;
	if(rcvr_zipx) document.order_info.rcvr_zipx.value	= rcvr_zipx;
	if(rcvr_add1) document.order_info.rcvr_add1.value	= rcvr_add1;
	if(rcvr_add2) document.order_info.rcvr_add2.value	= rcvr_add2;


	if(gm>0)
	{
        	payGate_S();
        	cartConfirm(memInfo['scode']);

		document.order_info.action='orderProc.php';
		if( document.Payplus.object == null )
		{
			openwin = window.open( 'chk_plugin.html', 'chk_plugin', 'width=420, height=100, top=300, left=300' );
		}
		if ( MakePayMessage( form ) == true )
		{
			openwin = window.open( 'proc_win.html', 'proc_win', 'width=449, height=209, top=300, left=300' );
			document.order_info.submit.click();
		}
		else
		{
		}
	}
	else
	{
        	payGate_S();
        	cartConfirm(memInfo['scode']);

		pause(2);

		document.order_info.action='pp_ax_hub_point.php';
		document.order_info.submit.click();
	}

	input_goodInfo();
}
// 2007.03.07 -> myzizzy
function jasToFlash()
{
	//alert('Ãë¼Ò -> ÇÃ·¡½Ã·Î °ªÀü´Þ') ;
	//document.getElementById('filaShop').jasToFlash(types);
}

function centerWindow()
{
	var xMax = document.body.clientWidth;
	var yMax = document.body.clientHeight;
	if ( xMax <= 1000 )
	{
		document.getElementById('filaShop').style.width = 1000 ;
	}
	else
	{
		document.getElementById('filaShop').style.width = xMax ;
	}
	if ( yMax <= 1100 )
	{
		document.getElementById('filaShop').style.height = 1100 ;
	}
	else
	{
		document.getElementById('filaShop').style.height = yMax ;
	}
}

function scroll(delta)
{
	scrollspeed=delta*20;
	setTimeout('scrollspeed=0',50);
}

var speed, currentpos=curpos1=0,alt=1,curpos2=-1

function initialize()
{
	if (window.scrollspeed!=0)
	{
		speed=window.scrollspeed
		scrollwindow()
	}
}

function scrollwindow()
{
	temp=(document.all)? document.body.scrollTop : window.pageYOffset
	alt=(alt==0)? 1 : 0
	if (alt==0)
		curpos1=temp
	else
		curpos2=temp
	window.scrollBy(0,speed)
}

function input_goodInfo()
{
	with(order_info)
	{
		good_info_temp = good_info.value.replace("&", String.fromCharCode(30));
		good_info_temp = good_info_temp.replace("|", String.fromCharCode(31));
		good_info.value = good_info_temp;
	}
}

setInterval("initialize()",5);

