IE Specific Error

IE Specific Error

Hey,

I am trying to get a div to shunt across when a button is clicked. What I have is a 1600px wide div. I then have a small box overlaying it. When the button is clicked the box remains stationary and the wide background div moves to the left / right displaying something new.

This works on Firefox / Safari but on IE the buttons move and disappear when they reach the end but the div doesn't. Can anyone see what is going wrong. There are no errors in IE.

.client-left / right are the buttons
.frame is the 1600px div that moves.

function clientRight() {
      var viewable = 800;
      var maximum = 1600;
      $(".client-left").css('display', 'block');
      
      var margin = $(".frame").css("margin-left");
      margin = margin.substr(0, (margin.length-2));
      if (margin != 0)
         margin = margin.substr(1);
         
      var difference = maximum - viewable;
      if (difference > margin) {
         margin = (0 - margin)-100; // Make number negative
         
         $(".frame").css('margin-left', margin);
      }               
      
      if (difference == margin)
         $(".client-right").css('display', 'none');
   }