function mod2(){
var myForm = document.model2;
var c=eval(myForm.c.value);
r= (c * 0.625 ) .toFixed(2);
s= (c * r * 3.14).toFixed(2);
var number_string = (s*1500000).toString(),
split = number_string.split('.'),
sisa = split[0].length % 3,
rupiah = split[0].substr(0, sisa),
ribuan = split[0].substr(sisa).match(/\d{1,3}/gi);
if (ribuan) {
separator = sisa ? '.' : '';
rupiah += separator + ribuan.join('.');
}
var number_string = (s*1450000).toString(),
split = number_string.split('.'),
sisa = split[0].length % 3,
rupiah1 = split[0].substr(0, sisa),
ribuan = split[0].substr(sisa).match(/\d{1,3}/gi);
if (ribuan) {
separator = sisa ? '.' : '';
rupiah1 += separator + ribuan.join('.');
}
var number_string = (s*950000).toString(),
split = number_string.split('.'),
sisa = split[0].length % 3,
rupiah2 = split[0].substr(0, sisa),
ribuan = split[0].substr(sisa).match(/\d{1,3}/gi);
if (ribuan) {
separator = sisa ? '.' : '';
rupiah2 += separator + ribuan.join('.');
}
var number_string = (s*600000).toString(),
split = number_string.split('.'),
sisa = split[0].length % 3,
rupiah3 = split[0].substr(0, sisa),
ribuan = split[0].substr(sisa).match(/\d{1,3}/gi);
if (ribuan) {
separator = sisa ? '.' : '';
rupiah3 += separator + ribuan.join('.');
}
var number_string = (s*750000).toString(),
split = number_string.split('.'),
sisa = split[0].length % 3,
rupiah4 = split[0].substr(0, sisa),
ribuan = split[0].substr(sisa).match(/\d{1,3}/gi);
if (ribuan) {
separator = sisa ? '.' : '';
rupiah4 += separator + ribuan.join('.');
}
myForm.f.value = r +' meter ';
myForm.luas.value = s +' meter persegi';
myForm.harga.value = 'Rp ' + rupiah;
myForm.harga1.value = 'Rp ' + rupiah1;
myForm.harga2.value = 'Rp ' + rupiah2;
myForm.harga3.value = 'Rp ' + rupiah3;
myForm.harga4.value = 'Rp ' + rupiah4;
}
function resmod2(){
document.model2.reset();
}
function mod3(){
var myForm = document.model3;
var c=eval(myForm.c.value);
r= (c * 1.125 ) .toFixed(2);
g= (c / 1.25 ) .toFixed(2);
s= (c * r * 3.14).toFixed(2);
var number_string = (s*1500000).toString(),
split = number_string.split('.'),
sisa = split[0].length % 3,
rupiah5 = split[0].substr(0, sisa),
ribuan = split[0].substr(sisa).match(/\d{1,3}/gi);
if (ribuan) {
separator = sisa ? '.' : '';
rupiah5 += separator + ribuan.join('.');
}
var number_string = (s*1450000).toString(),
split = number_string.split('.'),
sisa = split[0].length % 3,
rupiah6 = split[0].substr(0, sisa),
ribuan = split[0].substr(sisa).match(/\d{1,3}/gi);
if (ribuan) {
separator = sisa ? '.' : '';
rupiah6 += separator + ribuan.join('.');
}
var number_string = (s*1000000).toString(),
split = number_string.split('.'),
sisa = split[0].length % 3,
rupiah7 = split[0].substr(0, sisa),
ribuan = split[0].substr(sisa).match(/\d{1,3}/gi);
if (ribuan) {
separator = sisa ? '.' : '';
rupiah7 += separator + ribuan.join('.');
}
var number_string = (s*600000).toString(),
split = number_string.split('.'),
sisa = split[0].length % 3,
rupiah8 = split[0].substr(0, sisa),
ribuan = split[0].substr(sisa).match(/\d{1,3}/gi);
if (ribuan) {
separator = sisa ? '.' : '';
rupiah8 += separator + ribuan.join('.');
}
var number_string = (s*750000).toString(),
split = number_string.split('.'),
sisa = split[0].length % 3,
rupiah9 = split[0].substr(0, sisa),
ribuan = split[0].substr(sisa).match(/\d{1,3}/gi);
if (ribuan) {
separator = sisa ? '.' : '';
rupiah9 += separator + ribuan.join('.');
}
myForm.gh.value = g +' meter ';
myForm.f.value = r +' meter ';
myForm.luas.value = s +' meter persegi';
myForm.harga5.value = 'Rp ' + rupiah5;
myForm.harga6.value = 'Rp ' + rupiah6;
myForm.harga7.value = 'Rp ' + rupiah7;
myForm.harga8.value = 'Rp ' + rupiah8;
myForm.harga9.value = 'Rp ' + rupiah9;
}
function resmod3(){
document.model3.reset();
}