function scaleItContrast(v, originalWidth) {
  //var scalePhoto = $('theImage');
  v += originalWidth + 1;
  if(v>100) v=100;
  if(v<-100) v=-100;
  //$('resizeWidth').value = v;
 $('temp_contrast').value = Math.floor(v);
}

function saveContrast() {
  var theWidth = $('temp_contrast').value;
  theWidth = theWidth;
  $('contrast').value = theWidth;
  xmlhttpPost('process.php?act=bright','bright');
}

function initContrast() {
  new Control.Slider('resizeHandleb','resizeTrackb', { 
    axis:'horizontal', 
    range:$R(-100,100), 
    sliderValue:0.0001,
    onSlide: function(v) { scaleItContrast(v, $('contrastWidth').value); },
    onChange: function(v) { saveContrast(); }      
  });
}

//Event.observe(window, 'load', function() { initSlider() });
