
function vca()
{

document.write("<table border=1>");

document.write("<tr><td>Visitors this Month <input type=text id=ecv title=Add current website visitors for month:></td></tr>");

document.write("<tr><td>Conversion Rate to Sales (%) <input type=text id=per1 title=Enter your websites conversion rate to sales:></td></tr>");


document.write("<tr><td>Each Sales Worth ($) <input type=text id=salev title=Enter how much each sale is worth to you (on average):></td></tr>");


document.write("<tr><td>Visitors Increased (%) <input type=text id=vinc title=Enter how much each sale is worth to you (on average):></td></tr>");

document.write("<tr><td><input type=button id=btnCalc onclick=calculate() value=Calculate> </tr></td>");
document.write("</table>"); 




}


function calculate()
{
var cv= eval(document.getElementById("ecv").value);
var p1= eval(document.getElementById("per1").value);
var sv= eval(document.getElementById("salev").value);
var vi =eval(document.getElementById("vinc").value);

 
var result= ((cv * p1/100)*sv);
var incincome= (cv * (vi/100))* sv;



/*document.getElementById("fres").value="Your website's current income is $" + Math.round(result) +"per month.With an increase of "+ vi +"% your website will make another $"+ Math.round(incincome) +" per month";*/


alert("Your website's current income is $" + Math.round(result) +"per month.With an increase of "+ vi +"% your website will make another $"+ Math.round(incincome) +" per month");
/*
document.write("<table border=1>");
document.write("<tr><td>");
document.write("Your website's current income is $" + Math.round(result) +"per month.With an increase of "+ vi +"% your website will make another $"+ Math.round(incincome) +" per month");
document.write("</td></tr>");
document.write("</table>");*/
	
}


