
/*
Highlight Image Script II- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

function borderit(which,color){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
which.style.borderColor=color
}
}

function hesapla()
{
fiyat=document.hesap.fiyat.value;
taksit=document.hesap.taksit.value;
faiz=document.hesap.faiz.value;

var errorMsg="";
if (isNaN(document.hesap.fiyat.value)==true){errorMsg += "\n> Fiyatı Sayı Olarak Giriniz";	}
if (isNaN(document.hesap.taksit.value)==true){errorMsg += "\n> Taksiti Sayı Olarak Giriniz";	}
if (isNaN(document.hesap.fiyat.value)==true){errorMsg += "\n> Faiz Oranını Sayı Olarak Giriniz";	}

if (errorMsg != "")
{
	msg = "";
	errorMsg += alert(msg + errorMsg + "\n\n");
}
else
{
	
	aylik_odeme=Math.round((fiyat*(Math.pow((1+faiz*1.05/100),taksit)*(faiz*1.05/100))/(Math.pow((1+(faiz*1.05/100)),taksit)-1)),0);
 document.hesap.odenecek.value=aylik_odeme+" YTL";
 }


}
