function qty($ii,$jj){
  var elm = document.frmGoods["fldQty["+$ii+"]"];
  if(elm){
   $nn=eval(elm.value)+eval($jj);
   if($nn <= 1){
     elm.value=1;	
   }else{	
     elm.value=$nn;
   }    
  }
}
function qty2($ii,$jj){
  var elm = document.frmÎrderSend["fldQty["+$ii+"]"];
  if(elm){
   $nn=eval(elm.value)+eval($jj);
   if($nn <=0){
     elm.value=0;	
   }else{	
     elm.value=$nn;
   }    
  }
}
function recalcdoc(){
//¯¥à¥áç¨â âì
   if (document.all||document.getElementById){
	iselm=document.getElementById? document.getElementById("maginfo"):document.all.maginfo;
	//iselm='<b>'+magoos+':</b> 0 <b>'+magtotal+'</b>: '+qtysum+' ';
	iselm.innerHTML='<b>'+magoos+':</b> '+qtytotal+' <b>'+magtotal+'</b>: '+sumtotal+' ';
   }else if (document.layers){
	document.maginfo.document.write('<b>'+magoos+':</b> '+qtytotal+' <b>'+magtotal+'</b>: '+sumtotal+' ')
	document.maginfo.document.close()
   }
   if($syscls_=='feedback'){
        frmbyfly('/i/'+$syslang_+'/fbfrm.'+$syslang_+'.jsi');
        if($sysmsg_!=""){ alert($sysmsg_)};	
   }
   if($syscls_=='address'){
        if($sysmsg_!=""){ alert($sysmsg_)};	
   }
}

function frmbyfly( filename ) {    // The include() statement includes and evaluates the specified file.
    // 
    // +   original by: mdsjack (http://www.mdsjack.bo.it)
    // +   improved by: Legaev Andrey
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Michael White (http://crestidg.com)
    // %        note 1: Force Javascript execution to pause until the file is loaded. Usually causes failure if the file never loads. ( Use sparingly! )
 
    var js = document.createElement('script');
    js.setAttribute('type', 'text/javascript');
    js.setAttribute('src', filename);
    js.setAttribute('defer', 'defer');
    document.getElementsByTagName('HEAD')[0].appendChild(js);
 
    // save include state for reference by include_once
    var cur_file = {};
    cur_file[window.location.href] = 1;
 
    if (!window.php_js) window.php_js = {};
    if (!window.php_js.includes) window.php_js.includes = cur_file;
    if (!window.php_js.includes[filename]) {
        window.php_js.includes[filename] = 1;
    } else {
        window.php_js.includes[filename]++;
    }
 
    return window.php_js.includes[filename];
}
