//FILE TIME : 1970-01-01 04:00:00 //SYSTEM TIME : 2024-03-29 08:34:33 //REFERER : http://lari.ge/get.js.php?t=3&n=4737750 // JavaScript Document function loadCss(url) { // adding the script tag to the head as suggested before var head = document.getElementsByTagName('head')[0]; var css = document.createElement('link'); css.rel="stylesheet"; css.href=url; // then bind the event to the callback function // there are several events for cross browser compatibility // fire the loading head.appendChild(css); } // JavaScript Document var VConverter1=function(owner,params,currencyList) { var container=document.createElement("div"); var title=document.createElement("div"); var list=document.createElement("div"); var bottom=document.createElement("div"); var items=[]; //CONTAINER container.style.width=params["width"]; container.style.backgroundColor=params["bg_color"]; container.style.border="1px solid "+params["border_color"]; //TITLE title.style.fontSize=params["title_font_size"]; title.style.fontWeight="bold"; title.style.color=params["title_color"]; title.style.borderBottom="1px solid "+params["title_color"]; title.style.padding="5px"; title.style.textAlign=params["title_text_align"]; title.style.backgroundColor=params["title_bg_color"]; title.innerHTML=params["title_text"]; container.appendChild(title); //LIST list.style.fontSize="14px"; list.style.color=params["text_color"]; list.style.fontWeight="bold"; list.style.padding="5px"; list.style.textAlign="center"; //ITEMS for(var i=0;i 0) { res = select[2].value*res/1000 + res; } res = Math.round(res*10000)/10000; input[1].value = res; } } }; var VConverter3=function(owner,params) { var container=document.createElement("div"); var title=document.createElement("div"); var list=document.createElement("div"); var bottom=document.createElement("div"); var popup=document.createElement("div"); var items=[]; //CONTAINER container.style.width=params["width"]; container.style.backgroundColor=params["bg_color"]; container.style.border="1px solid "+params["border_color"]; //TITLE title.style.fontSize=params["title_font_size"]; title.style.fontWeight="bold"; title.style.color=params["title_color"]; title.style.borderBottom="1px solid "+params["title_color"]; title.style.padding="5px"; title.style.textAlign=params["title_text_align"]; title.style.backgroundColor=params["title_bg_color"]; title.innerHTML=params["title_text"]; container.appendChild(title); //LIST list.style.fontSize="14px"; list.style.color=params["text_color"]; list.style.fontWeight="bold"; list.style.padding="5px"; list.style.textAlign="center"; //ITEMS items.push(document.createElement("div")); items.push(document.createElement("div")); items.push(document.createElement("div")); items.push(document.createElement("div")); items[0].style.margin="5px"; items[0].style.textAlign="left"; items[1].style.margin="5px"; items[1].style.textAlign="left"; items[2].style.margin="5px"; items[2].style.textAlign="left"; items[3].style.margin="5px"; items[3].style.textAlign="left"; var code=[]; var input=[]; code.push(document.createElement("span")); code.push(document.createElement("span")); code.push(document.createElement("span")); code[0].style.fontSize="80%"; code[0].style.display="block"; code[0].innerHTML="კრედიტის თანხა"; input.push(document.createElement("input")); input.push(document.createElement("input")); input.push(document.createElement("input")); input.push(document.createElement("input")); input[0].type="text"; input[1].type="text"; input[2].type="text"; input[3].type="button"; input[3].value="გამოთვლა"; input[3].style.fontSize="12px"; input[0].style.width="98%"; input[0].style.fontSize="12px"; input[1].style.width="95%"; input[1].style.fontSize="12px"; input[2].style.width="98%"; input[2].style.fontSize="12px"; code[1].style.fontSize="80%"; code[1].style.display="block"; code[1].innerHTML="წლიური პროცენტი"; code[2].style.fontSize="80%"; code[2].style.display="block"; code[2].innerHTML="ვადა (თვეების რაოდენობა)"; items[0].appendChild(code[0]); items[0].appendChild(input[0]); items[1].appendChild(code[1]); items[1].appendChild(input[1]); items[2].appendChild(code[2]); items[2].appendChild(input[2]); var percent=document.createElement("span"); percent.style.fontSize="12px"; percent.innerHTML="%"; items[1].appendChild(percent); items[3].appendChild(input[3]); list.appendChild(items[0]); list.appendChild(items[1]); list.appendChild(items[2]); list.appendChild(items[3]); bottom.style.textAlign="right"; bottom.style.padding="2px"; bottom.style.backgroundColor="#FFF"; var url=document.createElement("a"); url.href="http://www.lari.ge"; url.innerHTML="www.lari.ge"; url.style.fontFamily="Arial, Helvetica, sans-serif"; url.style.fontSize="12px"; url.style.color="#CCC"; url.style.textDecoration="none"; url.onmouseover="this.style.textDecoration='underline';"; url.onmouseout="this.style.textDecoration='none';"; bottom.appendChild(url); container.appendChild(list); container.appendChild(bottom); owner.appendChild(container); input[3].onclick=Calculation; function Calculation() { if(!input[0].value || !input[1].value || !input[2].value) return; popup.style.width="500px"; popup.style.height="500px"; popup.style.overflow="auto"; popup.style.zIndex=10000000; popup.style.display="none"; popup.style.backgroundColor="#fff"; popup.style.border="1px solid #CCC"; popup.style.padding="10px"; popup.style.position="fixed"; popup.style.fontSize="12px"; centerVertically(popup); centerHorizontally(popup); owner.appendChild(popup); document.onclick=check; calculateLoan(); } function centerVertically(objectID) { var thisObj = objectID; var height = (window.innerHeight) ? window.innerHeight: document.documentElement.clientHeight; var objectHeight = parseInt(thisObj.style.height); var newLocation = (height - objectHeight) / 2; thisObj.style.top = newLocation+'px'; } function centerHorizontally(objectID) { var thisObj = objectID; var width = (window.innerWidth) ? window.innerWidth : document.body.clientWidth; var objectWidth = parseInt(thisObj.style.width); var newLocation = (width - objectWidth) / 2; thisObj.style.left = newLocation +'px'; } function check(e) { if(checkParent(e.target)) { if(popup.style.display=="block") { owner.removeChild(popup); popup.style.display="none"; } else popup.style.display="block"; } } function checkParent(t) { while(t.parentNode) { if(t==popup) { return false } t=t.parentNode } return true } function monthlyPaymentLoan(a,per,t){ var p,x,y; p=per/1200; k=1; for (var i=1; i0){ a=a-(m-a*p); x++; } return x; } function ammountLoan(per,t,m){ var p,x,y; p=per/1200; k=1; for (var i=1; i360)) error=1; if (m && (!parseFloat(m) || parseFloat(m)<=0)) error=1; if (error){ return 0; } if (a && t && !m){ m=monthlyPaymentLoan(a,p,t); e=1; } if (a && !t && m){ t=monthsLoan(a,p,m,t); e=1; } if (!a && t && m){ a=ammountLoan(p,t,m); e=1; } if (!e){ return 0; } input[0].value=(a); input[2].value=t; showTable(a,p,t,m); } function showTable(a,per,t,m){ var cx,p,i,j,str,am; var u=new Array(); var total=new Array(); total[0]=0; total[1]=0; p=per/1200; am=a; if (t>600){ alert('Too many months!'); return; } cx=''; cx=cx+''; cx=cx+''; cx=cx+''; cx=cx+''; cx=cx+''; cx=cx+''; cx=cx+''; cx=cx+''; for (i=1; i<=t; i++){ total[1]+=a*p; u[0]=i; u[1]=(a); u[2]=(m); u[3]=(a*p); u[4]=(m-a*p); a=a-u[4]; u[5]=(a); if (u[1]+u[3]'+''; var u2=Array(); u2[0]=roundMoney(u[0]); u2[1]=roundMoney(u[1]); u2[2]=roundMoney(u[2]); u2[3]=roundMoney(u[3]); u2[4]=roundMoney(u[4]); u2[5]=roundMoney(u[5]); for(j=1; j'+str+''; } cx=cx+''; } total[0]=makeString(roundMoney(total[0])); total[1]=makeString(roundMoney(total[1])); am=makeString((am)); cx=cx+'
თვეებისაწყისი ბალანსითვიური გადახდაპროცენტიძირინარჩენი კრედიტი
'+u[0]+'
'; var totalResult='\ \ \ \ \ \ \ \ \ \ \ \ \
ყოველთვიური გადახდა :'+u2[2]+'
სრულად გადასახდელი თანხა :'+total[0]+'
პროცენტის საერთო ჯამი :'+total[1]+'
'; popup.innerHTML=totalResult+cx; } function roundMoney(x){ var newnumber = Math.round(x*Math.pow(10,2))/Math.pow(10,2); return newnumber; } function makeString(i){ var str,ind; str=i+""; ind=str.indexOf("."); if (ind==-1) str=str+".00"; if (ind==str.length-2) str=str+"0"; return addCommas(str); } function addCommas(nStr) { nStr += ''; x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } return x1 + x2; } }; loadCss("https://lari.ge/css/cstyle.css"); var owner_4737750=document.getElementById("lari_ge_cb_4737750"); var params_text_4737750=owner_4737750.getAttribute("_params").split("|"); var params_4737750={width:params_text_4737750[4],bg_color:"#"+params_text_4737750[1],text_color:"#"+params_text_4737750[2],border_color:"#"+params_text_4737750[3],title_bg_color:"#"+params_text_4737750[5],title_font_size:params_text_4737750[7],title_border_color:"#"+params_text_4737750[8],title_color:"#"+params_text_4737750[6],title_text_align:params_text_4737750[9],title_text:params_text_4737750[0]}; var c_4737750=new VConverter3(owner_4737750,params_4737750);