function scaleItBright(v, originalWidth) {
  //var scalePhoto = $('theImage');
  v += originalWidth + 1;
  if(v>250) v=250;
  if(v<-250) v=-250;
  //$('resizeWidth').value = v;
 $('temp_brightness').value = Math.floor(v);
}

function saveBright() {
  var theWidth = $('temp_brightness').value;
  theWidth = theWidth;
  $('brightness').value = theWidth;
  xmlhttpPost('process.php?act=bright','bright');
  
}

function initBright() {
  new Control.Slider('resizeHandle','resizeTrack', { 
    axis:'horizontal', 
    range:$R(-250,250), 
    sliderValue:0.0001,
    onSlide: function(v) { scaleItBright(v, $('brightnessWidth').value); },
    onChange: function(v) { saveBright(); }      
  });
}

//Event.observe(window, 'load', function() { initSlider() });
