izmir escort escort izmir porno porno izle
TL - YTL çevirici (tr) - IRCForumları - IRC ve mIRC Yardım ve Destek Platformu
User Tag List

Arrow TL - YTL çevirici (tr) #1
Üyelik Tarihi: 10 Eylül 2012
Mesajlar: 3.858
Aldığı Beğeni: 1
Beğendikleri: 0
23 Ekim 2012 , 18:49
Alıntı ile Cevapla
Kod:
<script language="JavaScript">
<!--
function replaceAll2(str,from,to) {
    var idx = str.indexOf(from);
    while(idx > -1) {
        str = str.replace(from,to); 
        idx = str.indexOf(from);
    }
    return str;
}

function round2(number,X) {
	X = (!X ? 2 : X);
	return Math.round(number*Math.pow(10,X))/Math.pow(10,X);
}

function virgul_duzelt(formname,fieldname){
	var ys = "";
	var ks = "";
	ti = ********.forms[formname].elements[fieldname].value;
	tv = replaceAll2(ti,'','','''');
	tv = round2(tv,2);
	tv = ""+tv+"";
	var idx = tv.indexOf(''.'');
	if(idx > 0){
		ks = tv.substring(idx, tv.length);
		tv = tv.substring(0, idx);
	}	
	if(tv.length>3){
		for(var i=tv.length-3; i>0; i-=3){
			yp = tv.substring(i, i+3);
			ys = "," + yp + ys;
			if(i<=3){
				sp = tv.substring(0, i);
				ys = sp +  ys;
			}
		}
		if(ks){ ys = ys + ks};
		********.forms[formname].elements[fieldname].value = ys;		
	}
	else{
		if(ks){ tv = tv + ks};
		********.forms[formname].elements[fieldname].value = tv;	
	}
}

function lira2ytl(formname){
  lira = ********.forms[formname].elements[''TL''].value;
  lira = replaceAll2(lira,'','','''');  
  if (isNaN(lira)){
    ********.forms[formname].elements[''TL''].value = 0;
    alert("Lütfen sadece rakam giriniz giriniz.");
	return false;
  }
  
  ylira = lira / 1000000;
  ylira = Math.floor(Math.round((lira / 10000),2) /100);
  ykurus = Math.round(((Math.round((lira / 10000),2) /100)-Math.floor(Math.round((lira / 10000),2) /100))*100);
  ********.forms[formname].elements[''YTL''].value = ylira;
  ********.forms[formname].elements[''YKR''].value = ykurus;
  virgul_duzelt(formname,''TL'');  
  virgul_duzelt(formname,''YTL'');
}

function ytl2lira(formname){
  ylira  = ********.forms[formname].elements[''YTL''].value;
  ylira  = replaceAll2(ylira,'','','''');
  ykurus = ********.forms[formname].elements[''YKR''].value;
  
  if (isNaN(ylira)){
    ********.forms[formname].elements[''YTL''].value = 0;
    alert("Lütfen sadece rakam giriniz giriniz.");
	return false;
  }
  if (isNaN(ykurus)){
    ********.forms[formname].elements[''YKR''].value = 0;
    alert("Lütfen sadece rakam giriniz giriniz.");
	return false;
  }
  
  lira = ylira * 1000000+ ykurus *10000 ;
  ********.forms[formname].elements[''TL''].value = lira;
  virgul_duzelt(formname,''YTL'');
  virgul_duzelt(formname,''TL'');
}

//-->
</script>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="2"> </td><td width="155" align="right" height="16" bgcolor="#24334D"><strong><font color="#FFFFFF"> TL - YTL Çevir</font></strong>  </td>
<td width="2"> </td></tr><tr><td height="5" colspan="3"></td></tr></table>
<table width="150" cellpadding="0" cellspacing="0" align="center">
<form name="hesapytl">
<tr>
	<td valign="top"><strong>TL</strong></td>
	<td valign="top"><strong> : </strong></td>
	<td valign="top"><input type="text" name="TL" size="14" onkeyup="lira2ytl(this.form.name)" value="0">Lira</td>
</tr>
<tr>
	<td valign="top"><strong><font color="#FF0000">YTL</font></strong></td>
	<td valign="top"><strong> : </strong></td>
	<td valign="top"> <input type="text" name="YTL" size="6" onkeyup="ytl2lira(this.form.name)" value="0"> Yeni Lira<br>
<input type="text" name="YKR" size="2" onkeyup="ytl2lira(this.form.name)" maxlength="2" value="0"> Yeni Kuruş</td>
</tr>
</form>
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


« Önceki Konu Sonraki Konu »

Şu an bu konuyu okuyan kişi sayısı: 1 (0 üye ve 1 misafir)