var mouse_x=0; var mouse_y=0; function save_mc() { mouse_x=event.x; mouse_y=event.y; } var timer1; Ret_el_id=null; function show_calc() { if(self.gfPop)gfPop.fPopCalendar(document.getElementById(Ret_el_id)); return false; } function panel_hv(id) { el=document.getElementById(id).style.display; if (el=="none") { document.getElementById(id).style.display="inline"; } else { document.getElementById(id).style.display="none"; } } function panel_show(id) { el=document.getElementById(id).style.display; document.getElementById(id).style.display="inline"; } function panel_hide(id) { el=document.getElementById(id).style.display; document.getElementById(id).style.display="none"; } var g_obj=""; var g_obj2=""; function sm(obj,obj2,t) { g_obj=obj; g_obj2=obj2; if (t==0) ret=window.open("../main/search.php?text="+obj+"&val="+obj2,"","status=no,scrollbars=yes,width=700,height=500"); else if (t==1) ret=window.open("../main/search_org.php?text="+obj+"&val="+obj2,"","status=no,scrollbars=yes,width=700,height=500"); if (t==2) ret=window.open("../main/search_verst.php?text="+obj+"&val="+obj2,"","status=no,scrollbars=yes,width=700,height=500"); } function setvalue(p1,p2) { document.getElementById(g_obj).value=p2; document.getElementById(g_obj2).value=p1; } function select_all(ids) { for (i=0;i-1;i++) { if (document.getElementById("deliv_isp["+a+"]["+i+"]")==null) break; if (document.getElementById("deliv_isp["+a+"]["+i+"]").checked) s+= parseFloat(document.getElementById("deliv_isp["+a+"]["+i+"]").alt); } document.getElementById("d_t_["+a+"]").value=s.toFixed(2); //расчет процентов s=0; for (var i=0;i>-1;i++) { if (document.getElementById("deliv_ord["+a+"]["+i+"]")==null) break; if (document.getElementById("deliv_ord["+a+"]["+i+"]").checked) s+= parseFloat(document.getElementById("deliv_ord["+a+"]["+i+"]").alt)*0.02; } document.getElementById("d_m_["+a+"]").value=s.toFixed(2); //разбиение на карты var f=0,fc=0,c=0,n=0,ct=0; f=parseFloat(document.getElementById("d_f_["+a+"]").value)+parseFloat(document.getElementById("d_t_["+a+"]").value)+parseFloat(document.getElementById("d_m_["+a+"]").value); document.getElementById("d_s_["+a+"]").value=f.toFixed(2); for (i=1;iparseFloat(document.getElementById("d_f_["+a+"]").value)) ct=parseFloat(document.getElementById("d_f_["+a+"]").value); c+=ct; // n+= parseFloat(document.getElementById("d_f_["+a+"]").value)-c; ct=0; if (p[i][4]==0) c+= p[i][3]; else c+= parseFloat(document.getElementById("d_m_["+a+"]").value)*(p[i][3]/100); if (ct>parseFloat(document.getElementById("d_m_["+a+"]").value)) ct=parseFloat(document.getElementById("d_m_["+a+"]").value); c+=ct; // n+= parseFloat(document.getElementById("d_t_["+a+"]").value)-c; ct=0; if (p[i][6]==0) c+= p[i][5]; else c+= parseFloat(document.getElementById("d_t_["+a+"]").value)*(p[i][5]/100); if (ct>parseFloat(document.getElementById("d_t_["+a+"]").value)) ct=parseFloat(document.getElementById("d_t_["+a+"]").value); c+=ct; fc+=c; document.getElementById("d_c_["+a+"]["+p[i][0]+"]").value=c.toFixed(2); } n=f-fc; document.getElementById("d_n_["+a+"]").value=n.toFixed(2); deliv_resum(); } function deliv_findpar(chel) { var i=0; for(i=0;i