Prototype Slide Bar

Ok, im making a prototype slide bar and i need the math for the percentage of the slider on the slide bar so that when the slider is all the way to the left on the bar it equals 0 and all the way to the left on the bar would be 100. if you could post the math id be greatful.

here is the form i want if it helps at all:
var = Math.round(math);
or have it round another way

thx
Flash-matic