
function fakor(){
//get all of the div heights
var tot = document.getElementById('content').offsetHeight;
var dis = document.getElementById('disDiv').offsetHeight;
var con = document.getElementById('conDiv').offsetHeight;

//because the calculations are not accurate for offsetHeight, we need to interpret a little
//gets the difference between the total height, and the con div
var difo1 = tot - con;
//gets the difference between the total height, and the dis div
var difo2 = tot - dis;
//gets half of the difference between the dis height, and the con div 
var difo3 = (difo2 - difo1)/2;
//adds the split difference to the conDiv to get a better idea as to how much space it takes up
var difo = tot - con - difo3;
//convert the ratio of location:height (less the height of the div - drag height)
var perc = (tot-185)/difo;
//set the position of the content Div (ie. the text)
document.getElementById('content').style.top =  '-' + difo + 'px';
//get the height of the mask area
var trako = document.getElementById('track').offsetHeight;
//calculate the position of the "drag" using that ration form before
var poso = Math.round(trako/perc);
//set the "drag" position
document.getElementById('drag').style.top =  poso +'px';
}
