 var Cost, GST, Grand_Total, foto_conv, dias;
function tally()
 {
 Cost = 0;

 if (document.orderform.fotografo.value == "não"){ Cost = Cost + 0;}
 if (document.orderform.fotografo.value == "1 fotografo"){ Cost = Cost + 475;}
 if (document.orderform.fotografo.value == "2 fotografos"){ Cost = Cost + 712.5;}

 if (document.orderform.video.value == "não"){ Cost = Cost + 0;}
 if (document.orderform.video.value == "1 câmara"){ Cost = Cost + 400;}
 if (document.orderform.video.value == "2 câmaras"){ Cost = Cost + 600;}

 if (document.orderform.dvd_foto.value == "não"){ Cost = Cost + 0;}
 if (document.orderform.dvd_foto.value == "1 - DVD Foto"){ Cost = Cost + 25;}
 if (document.orderform.dvd_foto.value == "2 - DVD Foto"){ Cost = Cost + 35;}
 if (document.orderform.dvd_foto.value == "3 - DVD Foto"){ Cost = Cost + 45;}
 if (document.orderform.dvd_foto.value == "4 - DVD Foto"){ Cost = Cost + 55;}
 if (document.orderform.dvd_foto.value == "5 - DVD Foto"){ Cost = Cost + 65;}

 if (document.orderform.dvd_video.value == "não"){ Cost = Cost + 0;}
 if (document.orderform.dvd_video.value == "1 - DVD Vídeo"){ Cost = Cost + 50;}
 if (document.orderform.dvd_video.value == "2 - DVD Vídeo"){ Cost = Cost + 75;}
 if (document.orderform.dvd_video.value == "3 - DVD Vídeo"){ Cost = Cost + 100;}
 if (document.orderform.dvd_video.value == "4 - DVD Vídeo"){ Cost = Cost + 125;}
 if (document.orderform.dvd_video.value == "5 - DVD Vídeo"){ Cost = Cost + 150;}

 if (document.orderform.album.value == "não"){ Cost = Cost + 0;}
 if (document.orderform.album.value == "1 Album"){ Cost = Cost + 95;}
 if (document.orderform.album.value == "2 Albuns"){ Cost = Cost + 190;}

 if (document.orderform.album_digital.value == "não"){ Cost = Cost + 0;}1
 if (document.orderform.album_digital.value == "1 - 30 Páginas"){ Cost = Cost + 410;}
 if (document.orderform.album_digital.value == "1 - 40 Páginas"){ Cost = Cost + 560;}
 if (document.orderform.album_digital.value == "1 - 50 Páginas"){ Cost = Cost + 710;}
 if (document.orderform.album_digital.value == "1 - 60 Páginas"){ Cost = Cost + 860;}

 if (document.orderform.foto_noivos.value == "não"){ Cost = Cost + 0;}
 if (document.orderform.foto_noivos.value == "100"){ Cost = Cost + 100;}
 if (document.orderform.foto_noivos.value == "150"){ Cost = Cost + 150;}
 if (document.orderform.foto_noivos.value == "200"){ Cost = Cost + 200;}
 if (document.orderform.foto_noivos.value == "250"){ Cost = Cost + 250;}
 if (document.orderform.foto_noivos.value == "300"){ Cost = Cost + 300;}
 if (document.orderform.foto_noivos.value == "350"){ Cost = Cost + 350;}
 if (document.orderform.foto_noivos.value == "400"){ Cost = Cost + 400;}
 if (document.orderform.foto_noivos.value == "450"){ Cost = Cost + 450;}

 if (document.orderform.foto_pais_noiva.value == "não"){ Cost = Cost + 0;}
 if (document.orderform.foto_pais_noiva.value == "15"){ Cost = Cost + 22.5;}
 if (document.orderform.foto_pais_noiva.value == "20"){ Cost = Cost + 30;}
 if (document.orderform.foto_pais_noiva.value == "30"){ Cost = Cost + 45;}
 if (document.orderform.foto_pais_noiva.value == "40"){ Cost = Cost + 60;}
 if (document.orderform.foto_pais_noiva.value == "50"){ Cost = Cost + 75;}

 if (document.orderform.foto_pais_noivo.value == "não"){ Cost = Cost + 0;}
 if (document.orderform.foto_pais_noivo.value == "15"){ Cost = Cost + 22.5;}
 if (document.orderform.foto_pais_noivo.value == "20"){ Cost = Cost + 30;}
 if (document.orderform.foto_pais_noivo.value == "30"){ Cost = Cost + 45;}
 if (document.orderform.foto_pais_noivo.value == "40"){ Cost = Cost + 60;}
 if (document.orderform.foto_pais_noivo.value == "50"){ Cost = Cost + 75;}

 foto_conv = document.orderform.foto_convidados.value * 1.75;

 if (document.orderform.deslocacao.value == "não"){ Cost = Cost + 0;}
 if (document.orderform.deslocacao.value == "50 - 100 km's"){ Cost = Cost + 37.00;}
 if (document.orderform.deslocacao.value == "100 - 150 km's"){ Cost = Cost + 55.50;}
 if (document.orderform.deslocacao.value == "150 - 200 km's"){ Cost = Cost + 74.00;}
 if (document.orderform.deslocacao.value == "200 - 250 km's"){ Cost = Cost + 92.50;}
 if (document.orderform.deslocacao.value == "250 - 300 km's"){ Cost = Cost + 111.00;}
 if (document.orderform.deslocacao.value == "300 - 400 km's"){ Cost = Cost + 148.00;}
 if (document.orderform.deslocacao.value == "400 - 500 km's"){ Cost = Cost + 185.00;}
 if (document.orderform.deslocacao.value == "500 - 600 km's"){ Cost = Cost + 222.00;}
 if (document.orderform.deslocacao.value == "600 - 800 km's"){ Cost = Cost + 346.00;}
 if (document.orderform.deslocacao.value == "800 - 1000 km's"){ Cost = Cost + 420.00;}
 if (document.orderform.deslocacao.value == "1000 - 1200 km's"){ Cost = Cost + 494.00;}

 GST = (Cost * 1.50);
 Cost = euro(Cost + foto_conv);

GST = (Cost * 0.10);
 Cost = euro(Cost);
 GST = euro(GST);
 Grand_Total = parseFloat(Cost) - parseFloat(GST)
 Grand_Total = euro(Grand_Total);
 document.orderform.Total.value = "" + Cost;
 document.orderform.GST.value = "" + GST;
 document.orderform.GrandTotal.value = "" + Grand_Total;
 }
function euro (amount)
{
 amount = parseInt(amount * 100);
 amount = parseFloat(amount/100);
 if (((amount) == Math.floor(amount)) && ((amount - Math.floor (amount)) == 0))
 {
 amount = amount + ".00"
 return amount;
 }
 if ( ((amount * 10) - Math.floor(amount * 10)) == 0)
 {
 amount = amount + "0";
 return amount;
 }
 if ( ((amount * 100) - Math.floor(amount * 100)) == 0)
 {
 amount = amount;
 return amount;
 }
 return amount;
}
